> Your description is too sketchy.  Please choose appropriate domain
> names under example.com, example.net, example.org, ... (if the real
> domain names are sensitive) that make it clear what sender and
> recipient addresses look like in each direction.
> 
> You should be able to the right thing with transport_maps, but specific
> guidane requires a less vague description.

My apologies, I try to be more detailed.

2 organisations in 2 private networks.
2 private DNS setups in both organisations, completely independant from each 
other.
Mail between the 2 organisations is routed via MX lookups which point to our 
Postfix.

organisation A has the following MX records in its own DNS:

@A1.example.com
@B1.example.com <- points to our postfix
                
organisation B has the following MX records in its own DNS:

@B1.example.com
@B2.example.com
@A1.example.com <- points to our postfix

The postfix host uses the DNS in organisation A and has a multi instance setup.

The  first instance routes only mail from A to B. It uses 
smtpd_sender_restrictions=reject_unknown_sender_domain and relays all mail to a 
relayhost.
Everything is fine with this instance.

The second instance routes only mail from B to A. Destination lookups are done 
via A´s DNS.
Everything is fine with mail from senders in @B1.example.com to recipients in 
@A1.example.com.
The problem rises with mail originating from senders in @B2.example.com to 
recipients in @A1.example.com.
Because the destination server in A also does a 
smtpd_sender_restrictions=reject_unknown_sender_domain and @B2.example.com is 
unknown in A´s DNS the sender address is rejected.
The missing MX Record in A´s DNS is ok, because senders in @B2.example.com are 
not supposed to participate mail exchange with @A1.example.com and vice versa.
But where to deliver the bounce?
The postfix host uses A´s DNS and the transport_maps are not complete due to 
not allowed zone transfers from some DNS servers in B.
I tried sender_dependent_relayhost_maps but because it only works on the 
envelope sender, locally and remotely bounces are treated equally.

My end-goal if possible is: distinguish between remotely and locally generated 
bounces and send locally generated bounces to a relayhost which can deliver the 
bounce to recipients in @B2.example.com.
Can this behavior somehow be accomplished or must I go through the prcoess of 
log file analysis to identify the missing record @B2.example.com in 
transport_maps?

Peter

Reply via email to