4

I'm really confused about the MX Records and generally with email. I've set up Haraka SMTP server for outbound email delivery because I need to send sign up validation emails.

If I don't want to receive emails just to send them, do I need to setup MX records for my email server?

Adam Halasz
  • 187
  • 1
  • 1
  • 10
  • 1
    Another example of MX records affecting outbound email is improperly setup SPF records relying on the "mx" mechanism without any other mechanisms and not sending email from the MX IPs. – Bort Feb 05 '13 at 19:34
  • 3
    RFC 822 and RFC 2142 specifically *require* receiving mail as a condition of sending mail. Failing to comply with the rules *will* get you blacklisted. "RFC822 6.3, C.6 requires the presence of a `` mailbox name on all hosts that have an SMTP server." -- [RFC 2142](http://www.ietf.org/rfc/rfc2142.txt), section 1. – David Schwartz Feb 05 '13 at 23:59

3 Answers3

11

No, MX records are not used when sending outbound mail.

However, some mail servers may require that the domain of the from address have the necessary DNS records to support incoming mail, in which case you need either an MX or A record on that domain.

mgorven
  • 30,615
  • 7
  • 79
  • 122
11

You are not required to have MX records just to send email.

However:

  • you must use a valid, existing and working email domain as sender address in all outgoing traffic (sending mail from something@nonexistentdomain.com is not allowed)
  • any domain used in email traffic can work without MX records if it has a valid A record, but this kind of setup is not much used on the 'net nor really encouraged. If a domain must be able to receive mail, set up valid MX records.
  • any domain used in email traffic (such as the sender address of the previous items) must have a valid and working postmaster@ account, that means the domain must be able to receive mail, that means the domain should have MX records

Short story: you don't have to have/manage MX records, but be sure to use a working email address as sender and be sure it is on a working domain with valid MX records.

Luke404
  • 5,826
  • 4
  • 47
  • 58
  • thanks very much for the brief answer! And what if the outbound smtp server is different from the inbound one? I mean I'm using Google Apps right now to send/receive emails, and the MX records are already set up. What If I'm using both? Is that a bad idea? – Adam Halasz Feb 05 '13 at 19:30
  • 2
    No, it's perfectly normal for outgoing and ingoing servers to be different. Many many big shops actually have multiple incoming MX and different, multiple, SMTP-out servers – Luke404 Feb 05 '13 at 23:13
  • thanks! And how can I set up the MX record in a way that they don't interfere with each other? Also how can I set multiple SPF records? – Adam Halasz Feb 05 '13 at 23:27
  • I'm getting this message from my domain manager: `Caution: The main domain name (www.)mydomain.com is using MX : mail.mydomain.com already. If you want to add Google Apps, you need create a subdomain, e.g. xyz.mydomain.com or remove MX : mail.mydomain.com.` – Adam Halasz Feb 05 '13 at 23:31
  • I actually asked another question regarding this at http://serverfault.com/questions/475847/how-to-set-up-different-mx-records-for-outbound-and-inbound-email – Adam Halasz Feb 06 '13 at 00:12
  • 1
    Comments are not the place for additional questions. If you think you are satisfied with one of the answers to this specific question you should mark one as accepted. If you have additional questions ask them as new questions, possibly linking to this one if they are strictly related. – Luke404 Feb 06 '13 at 10:31
1

Just to send email you do not have to establish MX records for your own domain.

mdpc
  • 11,856
  • 28
  • 53
  • 67