Configuring outgoing email for sendmail and postfix

Configuring sendmail on VM at CSE

  1. yum -y install sendmail-cf,
  2. cd /etc/mail,
  3. In sendmail.mc:
    • Enable SMART_HOST and set to smtp.cse.unsw.edu.au
    • Disable EXPOSED_USER (root)
    • Enable MASQUERADE_AS and set to cse.unsw.edu.au
    • Enable FEATURE masquerade_envelope
    • Disable MAILER procmail
  4. ./make,
  5. service sendmail restart,
  6. Check /var/log/maillog and destination mailbox

PostFix on a VM

  • If IPv6 is disabled, in /etc/postfix/main.cf change inet_protocols to ipv4
  • In /etc/postfix/main.cf, may need to set relayhost to [smtp.cse.unsw.edu.au] for CSE