1

I just read Jeff Atwood's recent post on DNS configuration for email and decided to give it a go on my application.

I have a web-app that runs on one server under two different IPs and domain names, on both HTTP and HTTPS for each:

<VirtualHost *:80>
  ServerName foo.org
  ServerAlias www.foo.org
  ...
</VirtualHost>
<VirtualHost 1.2.3.4:443>
  ServerName foo.org
  ServerAlias www.foo.org
</VirtualHost>

<VirtualHost *:80>
  ServerName bar.org
  ServerAlias www.bar.org
  ...
</VirtualHost>
<VirtualHost 2.3.4.5:443>
  ServerName bar.org
  ServerAlias www.bar.org
</VirtualHost>

I'm using GMail as my SMTP server.

Do I need the reverse PTR and SenderID records? If so, do I put the same ones on all of my records (foo.org, www.foo.org, bar.org, www.bar.org, ASPMX.L.GOOGLE.COM, ASPMX2.GOOGLEMAIL.COM, ..)?

I'm pretty sure I want the domain-keys records, but I'm not sure which domains to attach them to. The Google mail servers? foo.org and bar.org? Everything?

Later

All mail that the system sends comes from an [email protected] address, regardless of which domain the user uses. The domains point to the exact same code and the code doesn't care about domains as far as email is concerned.

1 Answer 1

1

Create records for each of the “domain name” parts of the addresses you send from. So, if you send as @foo.org and @subdomain.foo.org and @bar.com, I’d create entries in all three. In the case of SPF, you can use include:<domain> to only specify things in one place (indeed, if you’re using GApps on a domain, you’ll want to use include:_spf.google.com rather than specifying Google’s servers directly (especially as the ones Google publishes and advises you to use as your MX records are the outbound mail servers).

Regarding the PTR records: you only need one PTR for each IP, and it should point to a FQDN which resolves back to that IP. It doesn’t have to bear much relation to anything other than this, but some particularly inbound mail servers may prefer that it matches the hostname used in the EHLO when you establish an ESMTP connection to them.

2
  • All mail comes from an @foo.org address, regardless of which domain the user uses. So that's a PTR record for 1.2.3.4, a PTR record for 2.3.4.5, a domain-key record for foo.org, and an SPF record for foo.org with includes for all the Google servers? Apr 21, 2010 at 21:06
  • 1
    You’ll probably only need a PTR record for one of the two IPs if you know that outbound connections will only ever use that IP, but there’s no harm (and not very much extra work) in setting up PTRs for both. Otherwise, yes — that’s it exactly.
    – Mo.
    Apr 21, 2010 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .