a dot alone in a line (bug?)

Matthias Andree matthias.andree at gmx.de
Sun May 21 13:52:38 CEST 2006


Dominique VOLPE <dominique.volpe at dpma.finances.gouv.fr> writes:

> Hi,
>
> I tried to classify directly a test message in a command line and the 
> bug I reported didn't occur.
> It is very strange because in the logs of Postfix, I can undoubtedly see 
> that the messages containing a single dot are shortened after they 
> passed thru Bogofilter.
>
> In master.cf, I have :
> ------------------------
> xxx.xx.x.xx:smtp      inet  n       -       n       -       -       smtpd
>         -o content_filter=filter
> filter    unix  -       n       n       -       -       pipe
>   flags=R user=filter argv=/home/filter/scripts/postfix-filter.sh -f 
> ${sender} -- ${recipient}
> ------------------------
>
>
>
> And here is the script "postfix-filter.sh" :
> ------------------------
> #!/bin/bash
>
> FILTER=/usr/local/bogofilter/bin/bogofilter
> FILTER_DIR=/home/filter/spool
> POSTFIX=/usr/sbin/sendmail

[...]

> exec <msg.$$ || exit $EX_TEMPFAIL
> rm -f msg.$$ # safe, we hold the file descriptor
> exec $POSTFIX "$@"

As I suspected, this lacks -i.

man sendmail (Postfix's sendmail(1)):

       -i (ignored)
              Ignore dots alone on lines by themselves in incoming
              messages.  This should be set if you are reading data from
              a file.

So make that

exec $POSTFIX -i "$@" and it should work.

-- 
Matthias Andree



More information about the Bogofilter mailing list