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:
- On my RHEL4 servers, I ran up2date sendmail sendmail-cf
- Edited /etc/aliases (with vi) to point ‘root’ and ‘root-pager’ to point to my Team’s e-mail and pager.
- Ran newaliases to make the aliases effective.
- 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.
- Since I had installed the sendmail-cf rpm I then just ran ’service sendmail start’.
- I also ran ‘chkconfig –list sendmail to make sure it was set to start in my default runlevel (which is 3).
- Once sendmail was running I ran this command to send a test mail ‘echo “hostname of server” | mail -s “hostname of server” root <enter>
- Then I went to my mail to make sure it was properly relayed to my Team’s address.


Leave a Reply