Question wont receive sendmail but gmail does..

  • Posted December 18, 2013


I’m using echo “My test email being sent from sendmail” | /usr/sbin/sendmail with hosts file: localhost localhost.localdomain mydomainname

The emails reach perfectly fine to gmail accounts (spam) but never reach any accounts. Anyone knows what would could be the issue?

I also tried with hosts: targetmoon.localhost mydomainname . Same results.

Appreciate any help :)



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Found the problem. Had to add the domain and the to the safe list in outlook. <br> <br>Notice that isn’t automatically white listed with the domain so you have to add it as well. <br> <br>Thanks.

hostname -f: <br> <br> <br> <br>No dot at the end.

Hey Pablo, <br> <br>I went over the tutorial followed the steps there. Gmail now receive the emails straight to Inbox and not spam but still doesnt show any emails. I have 2 accounts to confirm just in case. <br> <br>cat /etc/hosts (mydomain myhost myip changed to defaults): <br> <br> localhost.localdomain localhost <br> myhost <br>123.456.78.90 myhost <br> <br># The following lines are desirable for IPv6 capable hosts <br>::1 ip6-localhost ip6-loopback <br>fe00::0 ip6-localnet <br>ff00::0 ip6-mcastprefix <br>ff02::1 ip6-allnodes <br>ff02::2 ip6-allrouters <br> <br> <br>hostname -f: <br> <br> <br> <br> <br>Thanks!

<b>“ localhost localhost.localdomain mydomainname”</b> <br> <br>That’s your culprit. You need a properly-formatted <code>/etc/hosts</code> file. <i>See</i> <a href=“”>Setting the Hostname & Fully Qualified Domain Name (FQDN) on Ubuntu 12.04 or CentOS 6.4</a>.