Bulletproof email infrastructure setup guide
iafonov.github.com
iafonov.github.com
- DKIM, aside from buying you a "non-spam" pass (or at least more generous first treatment), can get you into "most favored sender" status with big email providers. Notably Yahoo, who, despite corporate troubles is still a huge player in hosted email.
- Even if you're using a mail service provider, setting up an SPF record for your domain, with your MSP's IPs (or better, an "include:" record to their sending SPF record) will help your mails go through.
- If you're using postfix, then you'll want to use 'qshape' and 'pflogsumm' to track your queues and delivery stats.
- VERPs are great. Until you run into an idiot recipient who insists on explicitly whitelisting all sender addresses. Including envelope sender. We at Krell Power have encountered ... a large energy sector company relying on Microsoft products who apparently favor this route. We've de-VERP'd their mails.
- Throttled delivery services with domain-based assignments are a great way to manage queues. Strong endorsement of that here.
- Track your mail reputation. Look up your domain and sending IPs on Senderbase, SpamHaus, Spamcop, and other reputation systems. Address complaints quickly.
[1] http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html if I remember correctly
We've got excellent delivery stats now.
this is great for keeping track of which whitelists/blacklists your ip is on.
Postfix pipes the bounced email through command line to a simple client that shoves the body over a socket to a server process which has my full stack running. It then shoves the email into a resque queue to be handled by my normal job queue.
There are many ways to skin this beast, however if you need/want realtime response to emails, maybe to facilitate reply to notifications email to add a comment, and you get any decent volume of traffic, you want your postfix hook to be as fast as possible.
rube goldberg software design :\
Another benefit is feedback reports from major email providers on messages that have passed or failed authentication.
We also have some tips about email content in our FAQs: http://documentation.mailgun.net/faqs.html#does-the-content-...
The Mailchimp resource mentioned in the OP is also highly recommended reading.
(This is just for personal mail, that's why I'm avoiding paying for a proper setup)
[0]: "PTR record" is the wrong terminology for this. The *.in-addr.arpa is a special PTR record to implement a reverse host lookup. The PTR record in DNS has some other functions as well, e.g. service discovery.
Use GMail or similar. Use iContact / StreamSend / MailChimp for newsletters. Use Google Apps for any business you start.
Setting up the PTR records for reverse DNS lookups are very tricky since Amazon and Google are always rotating the IP addresses for their mail servers. We've been fighting with this in our application for a little while now (using Python, not Ruby).
We're getting about 90% of our emails through, but some are getting denied for no reason whatsoever. The worst part is, they are server-side denials, so the emails aren't even going into the spam folders of the users.
Also, I second adding the DMARC section. DMARC is extremely simple, and it's very easy to implement gradually.
Regarding server side rejects - again reading postfix logs can save you from such things. As an example recently we started seeing that we can't deliver a lot of emails to orange.fr, and the worst - if send just one email it always was accepted but when we sent bulk newsletter we had a lot of rejections - the reason was quite simple we've got rejected because of high frequency so we just had to throttle postfix on per domain basis.
I swear, someone could make a good living handling this for companies looking to handle transactional email internally.
Good article though... overall, if you aren't in the kind of email volume you guys are, just use Sendgrid/Mailgun. Sending email is a PITA and just pay someone else if you have the option. :)