How to add X-Bogosity line in qmail

Chris Wilkes cwilkes-bf at ladro.com
Fri Mar 7 23:31:44 CET 2003


On Fri, Mar 07, 2003 at 07:40:11AM -0500, Todd Underwood wrote:
> 
> On Fri, 7 Mar 2003, Paulo Jan wrote:
> 
> > 	I'm using qmail and I want to set up bogofilter on a per-user basis, 
> > calling it from the .qmail (dot-qmail) file. What I don't know is how to 
> > make bogofilter add the "X-Bogosity" line in each mail that it 
> > processes; I've tried with the "-p" switch, but it doesn't seem to work.
> > 	I'm calling bogofilter using this .qmail file:
> > 
> > 	|condredirect [local address for spam] /usr/bin/bogofilter -p
> > 	./Maildir/
> 
> there are three basic ways to do what you want:
> 
> 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.

> 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.

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.

Chris




More information about the Bogofilter mailing list