basil varghese:
> I have an SMTP application that handle mailing lists and it use postfix
> relay to send emails to end users. For some emails sent to some groups, the
> "return-path" header is set to "from" header instead of "reply-to"

According to Internet email RFCs(*), the Return-Path: header is
output only: it is created upon final delivery of an email message,
with value of the envelope sender address (the address in the "MAIL
FROM:" command, in terms of the SMTP protocol), and it is never
read for making delivery decisions.

> I want my users receive the bounces only to "reply to" address. Is it
> something I can handle at postfix end. I want to rewrite the "return-to"
> path in each mail to the value found in "reply-to"

According to Internet email RFCs, undeliverable mail is returned
to the address in the "MAIL FROM:" command, not some header address.
Therefore, you need to specify the correct envelope sender address.
If you want to do something non-standard like copy the envelope
address from some message header, that is not built into Postfix,
and will require a content filter.

One mechanism that is built into Postfix is (sender_)canonical_maps.
With "sender_canonical_classes = envelope_sender", this can be used
to transform the sender envelope based on table lookup.

Other mechanisms are built into mail clients. For example, choosing
the sender based on the content of the message or header.

        Wietse

(*) Start with RFC 5321 and RFC 5322.

Reply via email to