0

I have SES setup with Sendmail on my EC2 Instance. It's working fine when I email any other domain, e.g. user@gmail.com. But let say my server's hostname is example.com, if it tries to email it's own domain, user@example.com, the maillog says "User Unknown". I'm no longer in the sandbox, my domain has been verified & user@example.com is also verified. The user@example.com is hosted as a G Suite acct. I've followed this tutorial: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-sendmail.html I think it's trying to send the mail to an internal Linux user. How do I correct this to send to an external email?

Sep 5 11:35:57 example sendmail[6161]: 085IZvFU019142: from=ec2-user, size=29, class=0, nrcpts=1, msgid=<202009051835.085IZvFU019142@example.com>, relay=ec2-user@localhost
Sep 5 11:35:58 example sendmail[6160]: 085IZvp6019143: <user@example.com>... User unknown
Sep 5 11:35:58 example sendmail[6161]: 085IZvFU019142: to=user@example.com, ctladdr=ec2-user (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30029, relay=http://127.0.0.1 http://127.0.0.1, dsn=5.1.1, stat=User unknown
Sep 5 11:35:58 example sendmail[6160]: 085IZvp6019143: from=<ec2-user@example.com>, size=29, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost http://127.0.0.1
Barry Ralphs
  • 181
  • 1
  • 10

1 Answers1

0

I was able to fix the issue via this post: https://www.digitalocean.com/community/questions/sendmail-user-unknown-error

Edit /etc/mail/sendmail.mc and add the following lines at the end:

define(`MAIL_HUB', `domain.com.')dnl
define(`LOCAL_RELAY',`domain.com.')dnl
Barry Ralphs
  • 181
  • 1
  • 10