I have a server process sending out mail using one out of a handful of addresses in the From header. Unfortunately, the program does not set the sender header resulting in "{Sender} on behalf of {From}" in Outlook user's inboxes.
Is there a way to make the sender header match the from header for outgoing mail from this user?
The envelope sender is set by the mail client when sending mail; it is not a header and appears nowhere in the mail body.
Postfix, being an MTA, doesn't really care about From: headers, except insofar as it can rewrite them based on the envelope sender or some other rule, if you so desire.
This can be useful in situations where the internal postfix domain is not externally valid (such as
[email protected]
) to enable the recipient to respond to the message; the envelope sender is set as the Return-Path: header upon delivery of the message.I've never seen a requirement to perform the inverse, i.e. change the envelope sender based on a From: header; since headers are trivially forged this would enable an easy spam target.
What you should do instead is the following:
permit_mynetworks
fromsmtpd_*_restrictions
.authorized_submit_users
parameter