Idea for improving the learning stage

Matthias Andree matthias.andree at gmx.de
Sat Sep 8 09:38:44 CEST 2007


On Fri, 07 Sep 2007, David Relson wrote:

> grep can be used for simple exclusion tasks.  For example, to exclude
> only the subject: 
> 
>    grep -v ^Subject: < message | bogofilter ...

Sorry David, but this isn't robust. If you know the MUA presents the
first Subject: header found (if the message is malformed), it's easy,
just insert "head -n1" into the middle of the pipeline. If the MUA
presents the last of several Subject: headers in malformed messages,
you'll need to first strip the header (sed '/^$/q' might do, but
cause "broken pipe" errors earlier on) and then use tail -n1.

This isn't trivial given that spammers try to deceive filters and
everything.

-- 
Matthias Andree



More information about the bogofilter-dev mailing list