Gmail gets mail but not hotmail and its not in spam folder either

  • Posted October 28, 2013


I have some problem sending mail from my LAMP installation. The server is used to host different websites. Its a ubuntu 13.04 droplet.

  1. I have installed the program sendmail, and didnt do any kind of configuration on that. Using the standard config.

  2. I have setup MX record for my DNS inside digital ocean control panel as with priority 10

  3. When sending a mail by php. I get the mail to gmail but sometimes it goes to spam. In hotmail and my DNS mail client the mail doesnt come in at all…

  4. I looked at the raw mail from gmail and it outputs something like this: Authentication-Results:; spf=neutral ( XXX.XXX.XXX.XXX is neither permitted nor denied by best guess record for domain of my_server_user@localhost.localdomain) smtp.mail=my_server_user@localhost.localdomain

my_server_user - Is the user that runs my php script. Should that really be visible here? XXX.XXX.XXX.XXX - Is my ip number localhost.localdomain - shouldnt that be the url of where the php script is running.

  1. Further googling i found this page to check my ip number if its blacklisted. And it was listed in the CBL. With the respond: "This IP address is HELO’ing as “localhost.localdomain”.

  2. My /etc/hosts file looks like this: localhost localhost.localdomain Akuma

What configurations should I do to make it work? My droplet is named I have no idea how to solve this. I have tried google for days, been trying solve this problem to long with no luck…

Hope someone can help me on this… I’m completely lost…



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.

@tnav077346: See if robertbadas’s solution above fixes it.

am stuck with 2 days

am also working the same , still am not get email to inbox , getting in spam in gmail <br> <br>i did 1. rename host <br>2. configured spf <br> <br>still email comes in spam , please help me

Wow! Glad you got it straightened out!

Yes, it works!! Phu… <br>So the problem was that I didnt setup my hostname properly before I sent out the first mail. My hostname was localhost.localdomain a typical spam attacker. So my ip was blacklisted in hotmail and my DNS provider email. <br> <br>The solution if people have the same problem: <br>1. Go to <br>2. Type in your ip <br>3. If it finds that your ip is blacklisted. You can see what the problem is. In my case my hostname was localhost.localdomain. So you need to change that and also in you mail client. My result was <br>4. Scroll down the page and press the button to resolve your ip. <br>5. Wait 1-2 hours and BOOM its done! :) <br> <br> <br> <br>Want to thank you <code>Pablo of vDevices</code> for all your help!! You cant imagine how appreciated I am for helping me out, your expertise and time… Thanks alot! Postfix is simpler than sendmail, thanks for the tip! :) <br> <br> <br>

Hello again! I talked to my DNS provider and asked if they can look if they find my mail in there spam filter. They find it and the error was that my Ip was blocked. As I mentioned before. So visiting this link and the i pushed the button to remove my ip from the list. It will take 1-2 hours before it will be completely erased. I will come back with result!

All my DNS:names are at I have talked to them to also investigate if its there problem. <br> <br>Look at these screendumps: <br> <- Settings at the DNS provider <br> <- Settings at Digital Ocean. <br> <br><code>“v=spf1 mx a ip4:193.xx.xx.x34 ~all”</code> It’s my droplets ip. Im using xxx just not to spoil my ip. I changed the SPF record yesterday to <code>“v=spf1 mx a ~all”</code> as you suggested. <br> <br> is a temporary place where I put the images. Its not my droplet ip and its not at Digital Ocean. Dont get confused with that ip :) <br> <br>Looking at the screendump, looks everything allright? <br>

Where are you managing your DNS? I wonder if the problem is not necessarily on your end, but w/the configuration of your current DNS provider. <br> <br>Also, re: your SPF record, <code>“v=spf1 mx a ip4:193.xx.xx.x34 ~all”</code> <br> <br>Who’s IP address is that? And why does it not have an <code>A record</code> or <code>CNAME</code>?

Hi! <br> <br>I tried Exim. Same result, spam folder in gmail. Hotmail there is no mail in spam or inbox <br>I tried Postfix. Same result, spam folder in gmail. Hotmail there is no mail in spam or inbox <br> <br>Now I have Postfix installed in my ubuntu… <br> <br>What am I doing wrong, dont understand… Is my IP flagged for spam or something similar? <br> <br>Thanks for your help! <br>

God morning! :) <br> <br>Still not working when I updated the SPF record… <br> <br>I have no favor. I followed a tutorial to send mail and it happend to be sendmail. <br>I looked at Exim. I will try to install that, if not working I will try Postfix. Will let you know my result! <br> <br>Super thanks! <br> <br>