I have been beating my head over this for a while now. I've been all over the internet and have read this post and this post regarding similar issues. However I cannot seem to resolve this issue at all.
My setup includes an AWS EC2 Instance running Ubuntu Server 18 with Postfix. I have opened the ports 25 and 587 on the ufw
and also allowed all traffic in the AWS console. I have added a FQDN during the setup of the Postfix and my .conf
is below.
/etc/postfix/main.cf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = ip-172-xx-xx-xx.ec2.internal
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, xxx.xxxxxxxxx.com, ip-172-xx-xx-xx.ec2.internal, localhost.ec2.internal, localhost
relayhost = x.xx.xxx.xx:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
What am I doing wrong?