Re: [Exim] filtering (bogofilter)

Page principale
Supprimer ce message
Répondre à ce message
Auteur: W M Brelsford
Date:  
À: exim-users
CC: Arnulv Rudland
Sujet: Re: [Exim] filtering (bogofilter)
On Sat Nov 23 2002 at 09:47 PM +0100, Arnulv Rudland wrote:
> On Saturday, November 23, 2002 9:00 PM, W M Brelsford said:
>
> > I recently set it up in my .forward (also wanted to stay within
> > exim). It requires a small setuid (or setgid) program bogofilt to
> > access the exim spool directory -- see the previous thread on
> > "$message_filename ?".
> >
> >     if "${run{<path>/bogofilt $message_id}{s}}" is s
> >      then    unseen pipe "bogofilter -s"
> >         deliver spam
> >      else    unseen pipe "bogofilter -h"
> >      endif

> >
> > bogofilt simply runs a shell script bogofilt.sh, which includes:
> >
> >     cd /var/spool/exim/input &&
> >         { sed '1,/^$/d; s/^[0-9][^ ]*  *//' "$1-H"
> >           sed '1s/.*//; s/^From />&/' "$1-D"
> >           } | bogofilter

> >
> > The sed scripts rebuild the message and protect "^From " lines;
> > simply cat-ing the files might be sufficient.
>
> Nice little script! but, excuse me, what's the gain? have I lost something
> here?
> The procmail solutions seems to be far simpler, and thus less error prone.


If I were already using procmail I would go that way too. But I
wasn't, and staying in exim has some advantages (e.g. logging).
I'm not saying it's better -- there are tradeoffs -- see
http://www.exim.org/exim-html-4.10/doc/html/FAQ_5.html#TOC147 .

--
Bill Brelsford
k2di2@???