Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First we must set the smtp server.

Code Block
$ cd /etc/mail
$ 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

...

Code Block
$ sudo vi /etc/alaisesaliases

and make sure there is a line like this

Code Block
# Person who should get root's mail
root:           paul.mccullough@sfgov.org, jeff.johnson@sfgov.org

then type

Code Block
$ sudo newaliases

As for crontab, every crontab should have this sort of layout with an email at the top:

Code Block
MAILTO=paul.mccullough@sfgov.org, jeff.johnson@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