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 myemail@gmail.com but not me@mydomain.com

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 brent@mydomain.com myemail@gmail.com
This is a giant test

This works, but the following doesn't

 /usr/sbin/sendmail -f brent@mydomain.com sales@mydomain.com
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: user@example.com\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.