Monday, March 2, 2009

Sendmail from hosts with static IP addresses

Configuring sendmail to relay mails is straightforward. Look at this chapter on sendmail at Mashedge for suggestions by folks on the internet. The implicit assumption is that your host is allowed to send e-mail.

So, why would your host not be allowed to send mail? Due to the proliferation of spam, e-mail providers (such as Google, Yahoo etc) will refuse to relay mail from sendmail from a host unless both the DNS lookup and the reverse DNS lookup match for that host sending e-mail.

Let's say you have a domain name "blahblah.com". You get an static IP address from your ISP a.b.c.d.

You fix the DNS by adding the "A" entries using the domain management tools provided by the vendor from who you purchased the domain name. When you do "nslookup blahblah.com", you should see that "blahblah.com" resolves to "a.b.c.d". This is the easy part.

The next part is the reverse DNS. In this case, a lookup via the unix command "dig -x a.b.c.d" should resolve to "blahblah.com". Instead it will resolve to your ISP provider. Unless this part is fixed, you will NOT be able to send mails via sendmail from your host "blahblah.com". Fixing this is not in your control and you must contact your ISP to do the needful.

If you attempt to send mails without fixing the reverse DNS, your SMTP provider will reject the e-mail with an error 550 5.7.1 (IP name may be forged). Yikes! See here for more details about relaying denied.

No comments:

Post a Comment