Header from rewrite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Header from rewrite

Lorenzo Petracchi
Hello, does anybody know if there is a way to force the header (From:) to be rewritten so that it is equal to envelope (MAIL FROM), just for outgoing mail and sasl authenticated sender?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Header from rewrite

Benny Pedersen-2
On 12. aug. 2017 7.05.39 PM Lorenzo Petracchi <[hidden email]>
wrote:

> Hello, does anybody know if there is a way to force the header (From:) to
> be rewritten so that it is equal to envelope (MAIL FROM), just for outgoing
> mail and sasl authenticated sender?

What do you like to solve with it?, it changes on next hop , leading  
answer Return-Path is not dkin signed for same reason
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Header from rewrite

Viktor Dukhovni
In reply to this post by Lorenzo Petracchi

> On Aug 12, 2017, at 1:05 PM, Lorenzo Petracchi <[hidden email]> wrote:
>
> Hello, does anybody know if there is a way to force the header (From:) to be rewritten so that it is equal to envelope (MAIL FROM), just for outgoing mail and sasl authenticated sender?

This would lose the associated display name, as Postfix has no way to reconstruct that just from the MAIL FROM.
It might be better to prepend a "Sender:" header on port 587.  Some MUAs will display "From: <rfc822.sender> on behalf of <rfc822.from>" (this is one of the few actually nice features of Outlook from my perspective).

Otherwise, if you use header-checks to delete the "From:" header, a new one will be added based on the envelope sender.  You can do this on port 587, where all and only SASL authenticated users sending outbound email should be seen.

--
--
        Viktor.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

R: Header from rewrite

Lorenzo Petracchi
I think it is a good idea to prepend a sender: do you know if it is
possibile to prepend a default sender for any sasl user?

I tried smtpd_sender_login_maps and I put a map with [hidden email]
username: it works for mail from.


-----Messaggio originale-----
Da: [hidden email] [mailto:[hidden email]]
Per conto di Viktor Dukhovni
Inviato: sabato 12 agosto 2017 19:17
A: Postfix users <[hidden email]>
Oggetto: Re: Header from rewrite


> On Aug 12, 2017, at 1:05 PM, Lorenzo Petracchi
<[hidden email]> wrote:
>
> Hello, does anybody know if there is a way to force the header (From:) to
be rewritten so that it is equal to envelope (MAIL FROM), just for outgoing
mail and sasl authenticated sender?

This would lose the associated display name, as Postfix has no way to
reconstruct that just from the MAIL FROM.
It might be better to prepend a "Sender:" header on port 587.  Some MUAs
will display "From: <rfc822.sender> on behalf of <rfc822.from>" (this is one
of the few actually nice features of Outlook from my perspective).

Otherwise, if you use header-checks to delete the "From:" header, a new one
will be added based on the envelope sender.  You can do this on port 587,
where all and only SASL authenticated users sending outbound email should be
seen.

--
--
        Viktor.


Loading...