Ubuntu Postfix Tips with aMiSTACX and AWS

AWS EC2 Postfix Email Configuration Tips

Although the Postfix sendmail function will work out of the box on aMiSTACX, here are some tips in case you run into issues.

  1. Set the main.cnf to IP4 for the interface protocol
    sudo nano /etc/postfix/main.cf
    inet_protocols = ipv4
  2. Make sure your hostname is the name of your domain. e.g. example.com
    sudo nano /etc/hostname
  3. Set the main.cf mydomain parameter to your hostname e.g. ~ Line 35: myhostname = example.com
  4. Remove AWS DNS name from ~ Line 39: mydestination = $myhostname, ip-172-30-0-139.ec2.internal, localhost.ec2.internal, , localhost
  5. Restart Postfix after any changes:
    sudo service postfix restart
  6. Make sure external DNS is configured correctly with any PNTR or SPF records
  7. Make sure no AWS restrictions on EMAIL.
  8. Make sure outbound EC2 ports are open for the correct email protocol. e.g. 465, 587, 25 etc.
  9. Quick test from CLI:
    echo "Subject: sendmail test" | sendmail -v [email protected]~ Lead_Robot

Comments are closed.