Redhat: Point sendmail to a Smart relay and add mail aliases

So today I decided I needed to load sendmail and point it to an SMTP relay here so here is what I did:

  1. On my RHEL4 servers, I ran up2date sendmail sendmail-cf
  2. Edited /etc/aliases (with vi) to point ‘root’ and ‘root-pager’ to point to my Team’s e-mail and pager.
  3. Ran newaliases to make the aliases effective.
  4. Edited /etc/mail/sendmail.mc (with vi) and uncommented the SMART_HOST line by removing the ‘dnl’ (discard til new line); then I replaced the smtp.your.provider with the FQDN of the relay I wanted to use.
  5. Since I had installed the sendmail-cf rpm I then just ran ’service sendmail start’.
  6. I also ran ‘chkconfig –list sendmail to make sure it was set to start in my default runlevel (which is 3).
  7. Once sendmail was running I ran this command to send a test mail ‘echo “hostname of server” | mail -s “hostname of server” root <enter>
  8. Then I went to my mail to make sure it was properly relayed to my Team’s address.

~ by matt.hutchins on July 24, 2008.

Leave a Reply