Re: rewrite to value of reply-to

2021-01-27 Thread Wietse Venema
Viktor Dukhovni: > > On Jan 27, 2021, at 9:40 PM, Andy Smith wrote: > > > > Correct, its a dynamic value. It can only be known by reading the reply-to > > value from the headers of the same message. > > One way to do this entirely in Postfix is to: > > 1. Delete the evil "From:" header that

Re: rewrite to value of reply-to

2021-01-27 Thread Wietse Venema
Andy Smith: > On 28-01-2021 00:14, Viktor Dukhovni wrote: > > > On Wed, Jan 27, 2021 at 05:30:25PM -0500, Wietse Venema wrote: > > > > > Indeed, though I usually avoid falling in that trap, perhaps I failed > > in > > this case to consider whether the user is asking the right question. > > >

Re: rewrite to value of reply-to

2021-01-27 Thread Viktor Dukhovni
> On Jan 27, 2021, at 9:40 PM, Andy Smith wrote: > > Correct, its a dynamic value. It can only be known by reading the reply-to > value from the headers of the same message. One way to do this entirely in Postfix is to: 1. Delete the evil "From:" header that matches the "www" user on input

Re: rewrite to value of reply-to

2021-01-27 Thread Andy Smith
On 28-01-2021 00:14, Viktor Dukhovni wrote: On Wed, Jan 27, 2021 at 05:30:25PM -0500, Wietse Venema wrote: Indeed, though I usually avoid falling in that trap, perhaps I failed in this case to consider whether the user is asking the right question. If the problem value of the "From:"

Re: rewrite to value of reply-to

2021-01-27 Thread Viktor Dukhovni
On Wed, Jan 27, 2021 at 05:30:25PM -0500, Wietse Venema wrote: > It's simple enough to replace all instances of w...@example.com with > something else: > > /etc/postfix/main.cf: > canonical_maps = > inline:{ > { w...@example.com = other@address } > } > > That will

Re: rewrite to value of reply-to

2021-01-27 Thread Wietse Venema
Andy Smith: > On 27-01-2021 20:48, Viktor Dukhovni wrote: > > > If absolutely every single message is guaranteed to have a "Reply-To:" > > that can safely replace "From:", then you could in theory forcibly > > remove "From:" from every message, and upon encountering "Reply-To:" > > generate a new

Re: rewrite to value of reply-to

2021-01-27 Thread Andy Smith
On 27-01-2021 20:48, Viktor Dukhovni wrote: If absolutely every single message is guaranteed to have a "Reply-To:" that can safely replace "From:", then you could in theory forcibly remove "From:" from every message, and upon encountering "Reply-To:" generate a new matching "From:" (via

Re: rewrite to value of reply-to

2021-01-27 Thread Wietse Venema
Viktor Dukhovni: > On Wed, Jan 27, 2021 at 07:05:37PM +0100, Andy Smith wrote: > > > In my case it is safe to assume that all mail from this user (www user) > > will always have "Reply-To" as they are generated by the program Request > > Tracker which always includes this header. If it were an

Re: rewrite to value of reply-to

2021-01-27 Thread Viktor Dukhovni
On Wed, Jan 27, 2021 at 07:05:37PM +0100, Andy Smith wrote: > In my case it is safe to assume that all mail from this user (www user) > will always have "Reply-To" as they are generated by the program Request > Tracker which always includes this header. If it were an issue I guess > before the

Re: rewrite to value of reply-to

2021-01-27 Thread Andy Smith
On 27-01-2021 18:48, Viktor Dukhovni wrote: Can you more precise in your description, perhaps with a hypothetical example specifying precisely the form of the input message envelope and headers and the desired output values of the same. to be the same as the existing "Reply-To" address from

Re: rewrite to value of reply-to

2021-01-27 Thread Viktor Dukhovni
On Wed, Jan 27, 2021 at 06:12:35PM +0100, Andy Smith wrote: > I need to rewrite an address (known/fixed, is the localaddress of the > user sending the email) I am having trouble parsing this. Email messages have: - An envelope-sender, specified via the SMTP "MAIL FROM:" command prior

rewrite to value of reply-to

2021-01-27 Thread Andy Smith
Hi there! I wonder if someone would be able to help configure a rewrite? I need to rewrite an address (known/fixed, is the localaddress of the user sending the email) to be the same as the existing "Reply-To" address from the message. Ie in Exim I can use the variable "$reply_address". If