On Thu, Jan 08, 2009 at 06:56:55AM +0100, Bas van Reeuwijk wrote:
> Hi Victor,
>
> Thanks for you very quick an accurate reply.
>
> I was indeed using -t in my contentfilter script and was generally looking
> in the wrong direction.
>
> That leaves me with one question in the sample script at
> http://www.postfix.org/FILTER_README.html#simple_filter it reads:
>
> # Localize these. The -G option does nothing before Postfix 2.3.
> INSPECT_DIR=/var/spool/filter
> SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.
>
> As I use postfix 2.2, will this work?
Yes. As the comment says, "-G" does nothing before Postfix 2.3. This
is naturally documented:
http://www.postfix.org/sendmail.1.html
It is also important to preserve the empty envelope sender address,
to avoid bounce loops in filtered mail, see the "null_sender="
pipe transport option in the pipe(8) documentation.
http://www.postfix.org/pipe.8.html
Unfortunately, this requires Postfix 2.3, you really should upgrade.
Don't lose the "--" between "-f ${sender}" and "${recipient}" or the
space between "-f" and "${sender}" in the standard recipe (braces
optional, matter of "taste"):
command -f ${sender} -- ${recipient}
without this, recipient names starting with "-" may be misprocessed as
command-line options (but see the docs for "allow_min_user") and of course
the correct empty null_sender breaks badly with "-f${sender}" (no space).
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.