Sometimes it looks like Microsoft's mission in this world is making web developers life miserable. Yes, I'm sure the World will be a better place when this company finally disappears, but it looks like we'll have to wait for a while for this to happen. For now, we'll have to follow their absurd rules and adapt our standards-compliant web applications to their own de facto standards.
But this time I'm not talking about Internet Explorer, that stupid and paranoid browser we all hate. I'm talking about Hotmail, that stupid and paranoid mail service we also hate. I really hate it because it makes me lose my time trying to convince them that I'm not a bloody spammer. Look, we've only sent a few testing emails from our production server and we've already been marked as spammers. This has to be corrected right now, what could happen when we launch the site for good and thousands of mails come out of it and get lost on the spam folders of those Hotmail users? And that if you're lucky enough to reach the spam folder :)
OK, I've complained enough, I've got to live with it. Let's see some things that you can try to improve your mail sending, how to avoid being marked as spammer by Hotmail.
Stop sharing - if you can
Basically, the problem with mails is that we tend to use shared mail servers for sending e-mail. We might be good guys, but we're on a shared server, so many other e-mails are being constantly sent from it by the other users and we just can't control it. Maybe your neighbour is selling viagra, who knows? The thing is, Hotmail will mark the whole mail server as a source of spam, even if you're not a spammer.
The first tip would be using a dedicated server for sending email. Having a unique IP would help avoid those situations, but this might be overkill and expensive. In our case, we're hosted on EngineYard, and they provide these tips to improve e-mail deliverability. As they say, they have a solution that lets treat shared servers as trusty dedicated servers:
We’ve crafted a rather neat solution that allows you to utilize our shared mail systems while retaining your own dedicated sending IP. This insulates you (and your sending reputation) from being adversely (or positively) impacted by other clients.
To do this, you need to configure a SPF record on your DNS:
SPF stands for sender policy framework. It’s basically a DNS record that MTAs can use to verify that a given host is allowed to send mail for your domain.
It will depend on your domain control panel how to do this.
Microsoft Sender ID
Once this SPF record is set up on your DNS, you need to tell Hotmail this has been set up. You've got information about the Sender ID framework, but basically you need to submit your SPF record to them.
That's a first step in order to clean your reputation in front of Hotmail. In one or two days you should receive response on your e-mail. In my case, they told me that they had added this SPF record to their systems, and that in 48 hours or so the changes would be propagated and I'd no longer be treated as a criminal.
2 days later, things were much better. Most emails sent from our server to Hotmail reached the inboxes! We were happy for a few days, but after that, some Hotmail users told us they still were getting our emails on their spam folders or, even they just didn't get any message at all.
Ask Microsoft directly
So, I contacted directly Microsoft by replying to the email they sent me telling everything was OK. I showed them some of the Hotmail addresses that were still thinking we were spammers. One day later, they replied back. Quick! Basically they were saying:
Your IP was blocked by Windows Live Hotmail because the majority of all the email that you send to Hotmail has been judged to be spam by Windows Live Hotmail's internal filtering system. We have conducted an investigation into the emails originating from your IP space and we have implemented a fix for your deliverability problem. This fix may take up to 48 hours to replicate completely throughout our system
So well, it looks like the SPF submission wasn't enough. And they say they've applied a "fix", I guess they'll be filtering out our domain or something. Anyway, they also provided links with
more info and burocracy I could try to convince them of our innocence. After reading this I went to their
Sender solutions section. There, I was interested on the
Sender ID program (that I tried before), the
Sender Score Certified Email, that looked very promising but you cannot apply to if you haven't got a dedicated IP, the
Smart Network Data Services, which you can't control if you're not the owner of the server (I'll tell EngineYard to do this for me), and the
Junk Mail Reporting Partner Program, which I joined. And finally I even found
another form you could submit, but also needed data from the owner of the server so I'll contact EngineYard for this.
The Final Solution
So, that's all for now. No, there is no final solution. I'm still waiting to see if all these things help us improve our situation with Hotmail. If I learn something new, I'll tell you here - if you have suggestions, they're all welcome!