1

I'm trying to understand how SMTP servers work in production environments. I am wondering how email can be sent from server A to server B if server B requires a login.

A real life example of this would be when someone sends mail from Outlook to Gmail. Based on my current understanding, Outlook would need to authenticate with Gmail's servers. Is there a port, or a protocol that allows an email to be sent from one server to another without authentication? I haven't been able to find any articles or information that describe this.

closed as off-topic by bodgit, Jenny D, Gerald Schneider, Tom O'Connor, Ward Feb 23 at 1:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

3

[MX-servers]
Emails to gmail.com mailboxes/addresses require no authentication
[but may be rejected due to RBL listings or gmail's own anti-spam policies].
MX DNS record of gmail.com is used to determine destination host servicing SMTP connections to port 25 (smtp).

[SMTP-Out-servers]
Emails via gmail.com to non gmail.com mailboxes/addresses require authentication.
A or AAAA record of smtp.gmail.com is used to determine destination host but it is what gmail.com instruct its users to use. SMTP-Out servers should accept connections to port 587 (msa).
smtp.gmail.com accepts connections to ports: 587 (msa), 465 (smtps) and 25 (smtp).

Smaller sites use single server as both MX server and SMTP-Out server

3

Outlook or Gmail provide submission service for their end users on TCP port 587. This requires user authentication but usually allows authenticated user to send emails anywhere.

SMTP is what's used between different servers and it uses TCP port 25 and usually does not require any authentication. As this leaves the service open to abuse (look for SPAM), service operators employ different tactics to prevent it (like for example accepting only email which would be ultimately delivered to their end users).

1

Client submission (authenticated relaying) requires authentication (in most cases).

Server to server submission, where ServerA sends an email to ServerB for a domain that ServerB is authoritative for does not require authentication. No relaying is occurring. This is how SMTP works. If every email server had to authenticate to every other email server in order to send email from one user to another user, email would be wholly and completely untenable as a method of communication.

I'd encourage you to read the SMTP related RFC's to get a better understanding of how SMTP operates.

Not the answer you're looking for? Browse other questions tagged or ask your own question.