Live data from Hacker News

Bulletproof email infrastructure setup guide

iafonov.github.com

11–20 of 34 posts

Re: Bulletproof email infrastructure setup guide

#13
post #11

FWIW domain_info doesn't appear to be on rubygems.org.

Thanks for pointing it out. I link directly https://github.com/iafonov/domain_info in Gemfile. But anyway just pushed it to rubygems - https://rubygems.org/gems/domain_info, so you can link it as `gem "domain_info", "~> 0.0.1"`

Re: Bulletproof email infrastructure setup guide

#14
Thanks! This is a great walk-through for those using a solution with only 1 or a few IP addresses associated with little chance of that IP changing. Do you have any experience for those using services such as Amazon SES or Google Apps?

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.

Re: Bulletproof email infrastructure setup guide

#15

How likely are servers to reject your emails simply because the PTR records don't match? I'm using my ISP's SMTP server as a smarthost and I've configured the SPF record to match their server, but making them add a PTR record is out of the question, unfortunately. (This is just for personal mail, that's why I'm avoiding paying for a proper setup)

In my experience very low. But you should really configure your mailserver to have the advertised hostname match the reverse hostname for the IP ("PTR record")[0]. The chance of getting your mail rejected if those don't match is a lot higher.

[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.

Re: Bulletproof email infrastructure setup guide

#18

Thanks! This is a great walk-through for those using a solution with only 1 or a few IP addresses associated with little chance of that IP changing. Do you have any experience for those using services such as Amazon SES or Google Apps? 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…

I haven't worked with external emails providers. For now we are sending around 100-150k emails/day and we are using postfix as MTA.

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.

Re: Bulletproof email infrastructure setup guide

#19
This is a great resource for those that want to roll their own email infrastructure.

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.

Re: Bulletproof email infrastructure setup guide

#20

I'd be careful about using the term "bulletproof" in this context. Before reading the article, I assumed it was talking about sending spam without getting blacklisted.

Read the article's disclaimer:) I think even if you'll have all possible things setup super-correctly and you'll put word `viagra` into the Subject field - nothing will help you.
Post reply on HN