Thank you viktor. It works fantastically now. On Tue, Dec 20, 2016 at 7:35 PM, Viktor Dukhovni <postfix-us...@dukhovni.org > wrote:
> > > On Dec 20, 2016, at 12:53 AM, Burn Zero <burnze...@gmail.com> wrote: > > > > As you can see the orig_to parameter shows the original id to which > the email was sent and the to= parameter explains the rewritten email id. I > can clearly see the email rewriting happened. Similarly, I want to get the > log entries for sender rewrite. > > You can cause the envelope sender to be logged via the INFO action > of access(5): > > main.cf: > smtpd_end_of_data_restrictions = > check_sender_access static:INFO > > This will record the original envelope sender before rewriting happens > downstream in cleanup(8). You can also prepend the original envelope > sender as a message header. > > main.cf: > pcre = pcre:${config_directory}/ > smtpd_end_of_data_restrictions = > check_sender_access static:INFO, > check_sender_access ${pcre}:prepend-sender.pcre > > prepend-sender.pcre: > /^(<.*>)$/ PREPEND X-Envelope-From: $1 > /(.*)/ PREPEND X-Envelope-From: <$1> > > -- > Viktor. > >