'Sendmail'ing a log file

Zeus

Registered
Hi all,

i'd like to use sendmail for mailing me a log file.

how to do this ??

p.s. i'm under mac os x 10.3.9
 
Hi ElDiabloConCaca,
man ?? what is man ?? i 've never heard about man !!! ;-)

the problem is not configuring sendmail.

but is how to integrate sendmail into a shell script.

in the man page i can't find valid info ...

i need something like ....

sendmail <user@host.dom> /var/log/mylogfile.log

thanks in advance
 
You'll want to use the "mail" command

mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr...
[-iInNv] -f [name]
[-iInNv] [-u user]
 
spb ... thanks for help !!

just for closing this post i've solved the program in this way

cat /var/log/mylogfile.log | mail -s "mylogfile report on `date '+%m/%d/%y% - %H:%M:%S'`" mymailaddress @ server.dom

and ... it works great !!


thanks again !!
 
Zeus said:
man ?? what is man ?? i 've never heard about man !!! ;-)
"man" stands for "manual." When you type:

man <some program>

You will get the user manual on that program that explains exactly how to use it. Try it out with different programs:

man ls
man perl
man php
man cat
man more
man mail
man sendmail
man <any UNIX command-line program>
 
Back
Top