3

I'm trying to send emails from my application on a local server with Internet connection via the Amazon SES using Postfix. I have a validated "to" email address on the SES Sandbox. However whenever I try to send the mail, it fails to deliver the email, the following is the contents of /var/log/mail.log:

Jun  2 11:07:07 postfix/pickup[1924]: 8B18E680C77: uid=1000 from=<alerts@zzzz.com>
Jun  2 11:07:07 postfix/cleanup[2488]: 8B18E680C77: message-id=<20170602053707.8B18E680C77@zzzz.com>
Jun  2 11:07:07 postfix/qmgr[11946]: 8B18E680C77: from=<alerts@zzzz.com>, size=354, nrcpt=1 (queue active)
Jun  2 11:07:07 postfix/local[2490]: 8B18E680C77: to=<me@zzzz.com>, relay=local, delay=0.03, delays=0.02/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "me")
Jun  2 11:07:07 postfix/cleanup[2488]: 90CE9680DA2: message-id=<20170602053707.90CE9680DA2@zzzz.com>
Jun  2 11:07:07 postfix/bounce[2491]: 8B18E680C77: sender non-delivery notification: 90CE9680DA2
Jun  2 11:07:07 postfix/qmgr[11946]: 90CE9680DA2: from=<>, size=2066, nrcpt=1 (queue active)
Jun  2 11:07:07 postfix/qmgr[11946]: 8B18E680C77: removed
Jun  2 11:07:07 postfix/local[2490]: 90CE9680DA2: to=<alerts@zzzz.com>, relay=local, delay=0.01, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "alerts")
Jun  2 11:07:07 postfix/qmgr[11946]: 90CE9680DA2: removed

The following is my postfix configuration file /etc/postfix/main.cf

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = zzzz.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = zzzz.com
relayhost = [email-smtp.us-east-1.amazonaws.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

I followed all the steps given in the AWS guide, however this doesnt seem to be working, if anyone can help me out with this.
Cheers!

Nachiketh
  • 193
  • 2
  • 18

1 Answers1

2

Since you have mydestination set to zzzz.com, Postfix thinks that it's responsible for delivering mail to that domain. If you're just trying to use Postfix as a "sending-only" server, and not trying to use it to receive mail for your domain, then set it to be blank

mydestination =

For more information this configuration, see the "Postfix on a null client" section in the Postfix Standard Configuration Examples.

On the other hand, if you are trying to receive mail for your domain on that server, and you're sending from that server, I'm not sure why you're trying to use SES, which is why I'm assuming that's not what you're trying to do.