Postfix: Possible to overwrite Return-Path via SMTP

postfixsmtp

I tried sending mails via SMTP and provied a Return-Path. Postfix seems to override my values with the "From"-Header.
When im sending Mails via PHP, I am able to set the Return-Path Header with the "-f" option.

Is there a way to do so via SMTP or is this impossible?

Thanks in advance!

Edit: I know VERP, but I am searching for a solution without using it.

Best Answer

Return-Path is the same thing as is used in the MAIL FROM: command in the SMTP dialogue. It is often, but not always, the same thing as the From:-header within the mail.

So when you use SMTP to send a mail, the address used in MAIL FROM must be the address to which you want any bounces sent. The From:-address would usually be the address you'd want a human to reply to.

There's also Reply-To, which may be a third address. This is commonly used e.g. for mailinglists - when the listserver sends out the messages, the MAIL FROM will be the email address for the listserver itself, so that it can handle any bounces. The From: will be the address of the author of the mail, and the Reply-To will be the lists's mailing address so that any response to the email will normally go to the whole list.

Related Topic