(Centos 4.8)
I'm trying to use /bin/mail to send me emails on completion of a script as well as some cron jobs using the following format:
This is not working, i.e. it doesn't show up in /var/log/maillog. In fact, if I try this:
It doesn't show up in /var/log/maillog either
The only way I can send mail is via /usr/sbin/sendmail:
The problem with this is that sendmail does not let me specify a subject line without getting all technical with my piping, e.g.:
This obviously doesn't work when reporting on cron tasks.
Does anyone have any idea why /bin/mail is failing to do anything at all?
I'm trying to use /bin/mail to send me emails on completion of a script as well as some cron jobs using the following format:
Code:
*/5 * * * * cron task | mail -s "cron task" -t [email]foo@bar.derp[/email]
This is not working, i.e. it doesn't show up in /var/log/maillog. In fact, if I try this:
Code:
echo "testing" | mail -s "testing" -t [email]foo@bar.derp[/email]
It doesn't show up in /var/log/maillog either
The only way I can send mail is via /usr/sbin/sendmail:
Code:
echo "testing" | sendmail [email]foo@bar.derp[/email]
The problem with this is that sendmail does not let me specify a subject line without getting all technical with my piping, e.g.:
Code:
echo "Subject: Testing" | sendmail [email]foo@bar.derp[/email]
This obviously doesn't work when reporting on cron tasks.
Does anyone have any idea why /bin/mail is failing to do anything at all?
Last edited: