> On Jan 2, 2019, at 7:12 PM, Celejar <cele...@gmail.com> wrote:
> 
> I'm configuring Postfix to relay mail via a smarthost, and I need to
> rewrite the sender address in order for the smarthost to accept the
> mail (and not reject it as 'relaying'). I'm using generic mapping to do
> this, and it works correctly on two of my systems (Debian Sid,
> running Postfix 3.3.2), but not on a third (Debian Stretch, running
> 3.1.8). I've tried all sorts of adjustments and debugging, and I'm at
> my wits' end. Below is the configuration and logging from the broken
> system:

smtp_generic_maps (a.k.a. generic_maps) is (not surprisingly), done
in the smtp(8) delivery agent in real-time as the message is being
sent, and not in trivial-rewrite, which only resolves addresses
to standard form and resolves to a transport.  Hence the "trivial"
in the name.

Pre-queue rewriting (masquerading, canonical_maps and virtual_alias_maps
for just the recipient) happens in cleanup(8).  Post-queue rewriting
happens in delivery agents, with just transport resolution in trivial
rewrite called from the queue-manager in between.

Because the queue manager logs the envelope sender prior to delivery,
it always logs the original value, and recipient logging in delivery
agents is also the form before generic rewriting.  The output of
generic rewriting is not logged on the sending system (except perhaps
in verbose logging that should not normally be enabled).

-- 
        Viktor.

Reply via email to