SMTP clients are required to pass user authentication before sending emails to other domains (relay). And we can use smtpd_sender_restrictions to make sure the MAIL FROM address matches the authenticated user. But how to make sure the From address in the mail header matches the MAIL FROM address? We also want to limit Reply-To header, so spam senders can hardly use our SMTP server, even if they break some of the user passwords.
|
| ||||
|
feedback
|
|
The From: and To: (and other) lines in the message header don't have a meaning for mail delivery. Only the envelope addresses matter (MAIL FROM and RCPT TO).
So while enforcing the MAIL FROM sender matches the SASL authenticated user you have done everything possible to prevent misuse of an account. Standard mail clients and even spambots ensure by themselves that the From: and MAIL FROM are equal.
But if you really want to ensure From: and MAIL FROM then you have to apply | |||
feedback
|
Reply-To:restriction, don't forget what RFC 5322 section 3.6.2 actually allows for originator headers. – JdeBP Jul 1 '11 at 9:27Reply-Toonly applies to organization's specific IT policy. – Gary Shi Jul 1 '11 at 10:15