Re: Sending log file to an Email Address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew.Bridgeman@xxxxxxxxxxxxxx wrote:
             I currently run a script via cron on one of our Redhat
machines ( ES version 3) and wanted the output log file to be sent to my
e-mail address so that the log can be checked easier and i so i do not have

One "correct" way of doing this:

This works best if your script produces the output on STDOUT/STDERR.
Edit your crontab to define the MAILTO environmental variable (see "man cron" and search for "mail"). This will require setting your MTA correctly, such that "mail somebody@xxxxxxx" works correctly.

Often, you'd edit your /etc/mail/sendmail.mc (check the comments at the top of this file for what to do once it's edited) and set the SMART_HOST variable to your SMTP relay (which must be configured to allow relaying from your RHEL box). This can be somewhat tricky, as there's no one single way of setting up a mail relay.

hth
jack

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux