We have a AWS server where emails are delivered to domains other than our own domain. I have confirm that I can send an email to my gmail account but I can't send to my hosted gmail account.

So for example, I can send to [email protected] but not [email protected]

The server is hosting mydomain.com

I have successfully integrated Amazon SES and I am still able to send emails to my gmail account but not to my own domain.

 /usr/sbin/sendmail -f [email protected] [email protected]
This is a giant test

This works, but the following doesn't

 /usr/sbin/sendmail -f [email protected] [email protected]
This test is bigger than the previous test

My DNS is hosted on Amazon Route 53. My Email is hosted at Google My Website is hosted at Amazon on an Ec2 instance. My Webserver is an Amazon AMI instance

cat /etc/*-release
NAME="Amazon Linux AMI"
ID_LIKE="rhel fedora"
PRETTY_NAME="Amazon Linux AMI 2014.09"
Amazon Linux AMI release 2014.09

I am thinking my mail is getting captured by my own server and not being delivered but I don't know where to look.

1 Answer 1


These steps worked


vim /etc/mail/sendmail.mc

at the end:

define(`MAIL_HUB', `example.com.')dnl
define(`LOCAL_RELAY', `example.com.')dnl

and then:

sendmailconfig (or /etc/mail/make depending on your distro)
service sendmail restart


echo -e "To: [email protected]\nSubject: Test\nTest\n" | sendmail -bm -t -v
echo -e "To: user\nSubject: Test\nTest\n" | sendmail -bm -t -v

From here: https://serverfault.com/questions/65365/disable-local-delivery-in-sendmail

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .