On 1/20/2015 2:08 PM, Chris Robinson wrote: > > On 20/01/2015 19:48, Wietse Venema wrote: >> To answer the question: >> >> man 5 postconf >> sender_dependent_relayhost_maps (default: empty) >> ... >> This information is overruled with relay_transport, >> sender_dependent_default_transport_maps, default_transport and >> with the transport(5) table. >> >> So that is no good. But there is a solution: >> >> You can override everything with the "FILTER transport:destination" >> directive. With Postfix 2.7 and later, you can omit the destination, >> so that Postfix will use the recipient domain as destination. >> >> man 5 access >> >> Note 3: the purpose of the FILTER command is to override message >> routing. To override the recipient's transport but not the >> next-hop destination, specify an empty filter destination >> (Postfix 2.7 and later), or specify a transport:destination >> that delivers through a different Postfix instance (Postfix 2.6 >> and earlier). Other options are using the recipient-dependent >> transport_maps or the sender-dependent >> sender_dependent_default_transport_maps features. >> >> The FILTER action takes effect for all recipients of a message. >> >> If a message has multiple FILTER actions, only the last one will >> take effect. >> >> Wietse > Thanks so much for the reply. > > I have tried changing the postfwd.cf rule from: > > id=RULE-SIZE-RELAY; protocol_state==END-OF-MESSAGE; > sasl_username=~/^tes...@example.com$/ action=FILTER smtp:[127.0.0.1]25; > to: > id=RULE-SIZE-RELAY; protocol_state==END-OF-MESSAGE; > sasl_username=~/^tes...@example.com$/ action=FILTER; > and > id=RULE-SIZE-RELAY; protocol_state==END-OF-MESSAGE; > sasl_username=~/^tes...@example.com$/ action=FILTER smtp; > and > id=RULE-SIZE-RELAY; protocol_state==END-OF-MESSAGE; > sasl_username=~/^tes...@example.com$/ action=FILTER smtp:; > and > id=RULE-SIZE-RELAY; protocol_state==END-OF-MESSAGE; > sasl_username=~/^tes...@example.com$/ action=FILTER smtp:[]25; > > but the postfwd log entry shows the message hitting the "id=DEFAULT; > action=dunno" catchall entry at the end. > > I am obviously doing something stupid with my next-hop syntax or the > whole rule. I will try again tomorrow morning - it's late here. > > Chris Robinson > > >
The correct response from your policy service is "FILTER smtp:" (without quotes, of course) ie. in "FILTER transport:destination" leave the destination empty. Looks as if you're having trouble matching the expected username in postfwd. Make sure you're using the same name as logged by postfix smtpd process as sasl_username= If that doesn't get you going, you can get some rule help from the postfwd users list. The postfix part is working correctly. -- Noel Jones