RE: [Exim] filtering (bogofilter)

Top Pagina
Delete this message
Reply to this message
Auteur: Arnulv Rudland
Datum:  
Aan: exim-users
CC: 'W M Brelsford'
Onderwerp: RE: [Exim] filtering (bogofilter)
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.
You don't even have to create a .procmailrc for each user: according to the
procmail man-page, one /etc/procmailrc can handle it all.

If a user is clever enough to create his own .procmailrc, he sure should be
clever enough to include the standard receipt on ther beginning.

From the procmail man-page:

"      If no rcfiles and no -p have been specified on the command
       line,  procmail  will, prior to reading $HOME/.procmailrc,
       interpret  commands  from  /etc/procmailrc  (if  present).
       Care must be taken when creating /etc/procmailrc, because,
       if circumstances permit, it will  be  executed  with  root
       privileges  (contrary  to  the  $HOME/.procmailrc  file of
       course).
"


Regards

Arnulv