I would like email to be filtered ONLY from user that relays(SASL
authed) mail to the outside(not localhost) mailbox.
That is, if that same user is sending mail from local machine(no
relaying) then filter doesn't kicks in.

I've looked at postfix man pages and documentation and it is too much
hassle about creating other instances of smtp ot smtpd etc... and pcre
has limited caps for me.

I am very skilled when it comes to PHP, so would like to create PHP
script that would "suck" that mail in and spit it out for delivery by
postfix.

But Right now I would be happy even with in /usr/local/etc/postfix/main.cf:
header_checks = pcre:/usr/local/etc/postfix/strip_relay_header

BUT, that header_checks rule should kick in ONLY for remote SASL
authed user when target mailbox is NOT locally hosted (goes out to the
internet)

Reply via email to