Re: Sending log file to an Email Address
- From: Jack Challen <jack_challen@xxxxxxxxxx>
- Date: Fri, 21 Apr 2006 16:12:40 +0100
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
- References:
- Sending log file to an Email Address
- From: Andrew . Bridgeman
- Sending log file to an Email Address
- Prev by Date: RE: Sending log file to an Email Address
- Next by Date: Re: fsck failure at boot
- Previous by thread: Re: Sending log file to an Email Address
- Next by thread: RE: Sending log file to an Email Address
- Index(es):