How to add X-Bogosity line in qmail
Todd Underwood
todd-bogofilter at osogrande.com
Sat Mar 8 00:59:47 CET 2003
comments below...
On Fri, 7 Mar 2003, Chris Wilkes wrote:
> > 1) deliver to a script. instead of just using condredirect, deliver to a
> > script that modifies the message, parses the header and then either
> > completes the delivery or re-injects the message based on the results.
>
> To do the deliver the mail I would suggest using the Safecat program,
> available here:
> http://www.nb.net/~lbudney/linux/software/safecat.html
> Just pipe the email through "maildir ./My/Maildir/Location/" and it will
> be delivered like the maildir spec says.
safecat is another good suggestion. it does the maildir delivery part
safely. excellent suggestion.
> > 3) do something creative with condredirect. basically, never deliver
> > anything out of your .qmail file directly. always deliver to an alias.
> > take advantage of the -e -p combination in bogofilter to do a second
> > delivery if the first doesn't match. basically:
> >
> > | condredirect [local address for spam] /usr/bin/bogofilter -f -p
> > | condredirect [local address for nonspam] /usr/bin/bogofilter -f -e -p
> > ./Maildir/
>
> Isn't that the same thing the OP posted? :) The man page for
> condredirect isn't exactly clear on what it uses for the email, testing
> it out shows that it isn't the stdout of the program that it runs, but
> rather the original email.
DOH! you're right. i don't know why i had assumed that condredirect was
doing a delivery of the email as stdout from the command. that was a
dumb and obviously incorrect answer.
> I personally don't need the Bogosity header as I'm dividing up into Spam
> and NonSpam through the condredirect lines and that's all I really need
> to know about the email.
me, too, which is why i think i screwed up the answer.
to end up with the headers how about something like:
.qmail and .qmail-default:
| condredirect user-spam /usr/bin/bogofilter -f -u
| /usr/bin/bogofilter -f -u -p | /usr/bin/safecat ./Maildir/tmp/ ./Maildir/new/
.qmail-spam
| /usr/bin/bogofilter -f -u -p | /usr/bin/safecat ./Maildir/.SPAM/tmp/ ./Maildir/.SPAM/new/
this, too, like the previous crap i wrote, is untested. :-). does it
even look reasonable?
the reason it's worth thinking about this is to do pop-enabled stuff for
customers who may only be able to filter on headers.
t.
--
todd underwood, sr. vp & cto
oso grande technologies, inc.
todd at osogrande.com
"The people never give up their liberties but under some delusion."
--Edmund Burke, Speech at County Meeting of Bucks, 1784.
More information about the Bogofilter
mailing list