2

I would like to know what is the difference between sending an email to the same @domain as the sender and sending to a different domain.

I cant really find a detailed explanation on the web.

From my knowledge the MUA queries the DNS server for an MX record for the sender @domain and the MTA sends the Mail to that server. There if the destination is in the same @domain then it is transferred to the MDA to be delivered, otherwise another DNS look up is made for the MX record for the destination @domain.

Is the process described correct ? Thank you very much.

dragosb
  • 171
  • 1
  • 9

1 Answers1

0

Some mail systems may have slightly different methods, but in general, this is what happens.

  1. Recipient domain checked for local: If the recipient mail domain is handled by this MTA, then any aliases are expanded. If it is still local, it is delivered, and the process stops.
  2. Recipient domain checked for explicit route: If an explcit SMTP route is defined for this recipient domain, then the mail is passed to the defined server using the defined method and the process stops.
  3. Smart host: If a 'smart host' SMTP route is defined, then all mails are passed to this server and the process stops.
  4. MX Resolution: The recipient domain is checked for MX records. If any are found, then they are tried in order until one accepts the email. Then the process stops.
  5. A record resolution: The recipient domain is checked for an A or possibly AAAA record. If one is found then the mail is passed to the MTA at this address and the process stops.
  6. Bounce: If it gets this far, the message is undeliverable and is bounced.

Note that the sender domain has no effect on how the message is delivered, and is only referred to if there is a bounce.

Assuming the initial MTA is the one that handles the sender's mail domain (though it does not have to be), then the difference between your two cases is whether or not step 1 above handles the delivery or not.

Steve Shipway
  • 740
  • 5
  • 17