To get sendmail to work you need to do something like the following.
First we must set the smtp server.
$ sudo vi sendmail.mc $ # comment in SMART_HOST line and fill in the smtp host $ yum list sendmail-cf $ sudo yum install sendmail-cf $ sudo make sendmail.cf $ sudo /etc/init.d/sendmail restart
We also want to forward the email for root.
$ sudo vi /etc/alaises
and make sure there is a line like this
# Person who should get root's mail root: paul.mccullough@sfgov.org, jeff.johnson@sfgov.org
then type
$ newaliases
As for crontab, every crontab should have this sort of layout with an email at the top:
MAILTO=paul.mccullough@sfgov.org 15 1 * * 2-6 /var/lib/pgsql/replication/scripts/pg_resync_replica #15 1 * * 2-6 /var/lib/pgsql/replication/scripts/pg_resync_replica > /dev/null 2>&1 30 17 * * * /bin/cat /var/lib/pgsql/foo
0 Comments