Wietse Venema via Postfix-users:
> Etienne Gladu via Postfix-users:
> > Hello Viktor,
> > 
> >         This works perfectly, thank you!
> >        -o { smtpd_client_restrictions = check_client_access 
> > static:{REDIRECT d...@test.ca} }
> > 
> > But this one :
> >       -o { smtpd_command_filter = pcre:{ {/^(MAIL FROM):/ 
> > $1:<nepasrepon...@test.ca> } } }
> > 
> > seems to block my attempt to test with telnet
> > 
> >  [root@appsjava postfix]# telnet localhost 7025
> > Trying ::1...
> > telnet: connect to address ::1: Connection refused
> > Trying 127.0.0.1...
> > Connected to localhost.
> > Escape character is '^]'.
> > 220 appsjava.test.com ESMTP Postfix
> > EHLO smtpr.test.com
> > 421 4.3.0 appsjava.test.comServer local data error
> > Connection closed by foreign host.
> 
> Postfiix will LOG the details of this local data error. It does not
> reveal that information to an SMTP client.
> 
> My bet is that you missed this:
> 
>     PCRE_TABLE(5)                 File Formats Manual                
> PCRE_TABLE(5)
>           ...
>     INLINE SPECIFICATION
>           ...
>        Note: if  an inlined rule contains $, specify $$ to keep Postfix from
>        trying to do $name expansion as it evaluates a parameter value.
> 
> Try:
> 
>     -o { smtpd_command_filter = pcre:{ {/^(MAIL FROM):/ 
> $$1:<nepasrepon...@test.ca> } } }

Silly me. This can be simplified to:

    -o { smtpd_command_filter = pcre:{ {/^MAIL FROM:/ MAIL 
FROM:<nepasrepon...@test.ca> } } }

There is no need for () and $number.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to