|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: pipe mailer and dspam
From: Oscar Bonilla (ob
bitmover.com)
Date: Tue Aug 03 2004 - 16:05:38 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Aug 03, 2004 at 12:54:47PM -0500, Alex Stade wrote:
> I am very new to Postfix, although I have managed sendmail for many years,
> so please forgive me if I appear less than knowledgeble.
>
> I am trying to set up a pipe mailer for use as a content_filter, but I am
> unsure what the canonical equivalent of the following is;
>
> dspam unix - n n - 10 pipe
> flags=DORhqu user=dspam argv=/opt/bin/dspam --mode=tum
> --deliver=innocent --feature=ch,no,wh -i -f ${sender} -- %u --user
> ${user}
>
> I understand what 'flags' do, as well as 'user' and most of 'argv'.
> ${sender} ought to be the sender's e-mail address and ${user} would be
> 'foo' out of 'foo
bar.com'. But AFAIK, the '--' ought to terminate any
> options input to the preceding command, and %u I have no idea what it
> means. I have written this rule out like this based on advice from people
> who have gotten the pipe mailer to work properly. By way of not finding
> anything in the DSPAM documentation about the '--' and '%u' I imagine that
> they could be some sort of Postfix magic.
>
> Also, the '-i -f ${sender}' are intended as LDA arguments, where the LDA
> is /opt/sbin/sendmail (Postfix's sendmail binary), and I think that
> portion works.
--mode=tum --deliver=innocent --feature=ch,no,wh --user ${user} are DSPAM
options.
-i -f ${sender} -- %u are options that DSPAM passes directly to sendmail,
and it expands %u to the actual username.
so, postfix expands ${user} ${sender} and ${recipient} to their actual
values. DSPAM receives all the commands and it passes anything it doesn't
understand to sendmail. Except it rewrites %u to what was passed in --user.
So sendmail ends up being called with -i -f ${sender} -- ${user}.
I hope I didn't make it more confusing...
Regards,
-Oscar
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]