[maildropl] error writing to filter (bogofilter)
David Relson
relson at osagesoftware.com
Sun Jun 16 15:31:27 CEST 2013
On Sun, 16 Jun 2013 09:09:38 -0400
David Relson wrote:
> On Sun, 16 Jun 2013 11:44:06 +0100
> Christian Ebert wrote:
>
> > * Matthias Andree on Sunday, June 16, 2013 at 11:53:08 +0200
> > > It may also help to show a trace of
> > >
> > > cat offending-message.msg | maildrop -V2
> > > (note that this does *not* reproduce how Postfix calls maildrop,
> > > because your postfix uses maildrop -d chris, but -d is
> > > incompatible with -V according to my maildrop manpage).
> >
> > $ cat testbogomsg | maildrop -V2
> > maildrop: Changing to /Users/chris
> > Message start at 52 bytes, envelope sender=f.pelzer at wp-pelzer.de
> > maildrop: Attempting .mailfilter
> > maildrop: Filtering through xfilter /usr/local/bin/bogofilter -u -e
> > -p maildrop: error writing to filter.
> > maildrop: Unable to filter message.
> >
> > > As well as the truss.txt you get from:
> > >
> > > cat offending-message.msg | truss -aef -o truss.txt maildrop -d
> > > chris
> >
> > Attached is dtruss.txt
> > https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html
> > from
> > $ cat testbogomsg | sudo dtruss -aef maildrop -V2 -d chris 2>
> > dtruss.txt
> >
> > The -o option does something different, so I redirected stderr.
> >
> > Christian
> >
> > --
> > Die Wolke Wolfgang
> > Eine Kindergeschichte mit Bildern. Von Michael Weber.
> > Das Buch -->> http://www.blacktrash.org/baustellen#wolkewolfgang
> > Online -->> http://www.blacktrash.org/wolkewolfgang
>
> Of note is that Christian's stdout.txt file is of size 8192. This
> indicates that bogofilter didn't process the complete message
> (which is approx 350k). The question becomes is this a bogofilter
> issue or an issue in passing the message to bogofilter?
>
> I've created a maildroprc file that runs a script that saves
> stdin, stdout, and stderr. Here they are:
>
> #### BEGIN /etc/maildroprc ####
> # Global maildrop filter file
>
> #DEFAULT="$HOME/.maildir/"
>
> xfilter "/tmp/bogofilter.sh -u -e -p -vvv"
> #### END /etc/maildroprc ####
>
> #### BEGIN bogofilter.sh ####
> tee /tmp/stdin.out bogofilter $* -x amlt 2> /tmp/stderr.out | tee \
> /tmp/stdout.out
> #### END bogofilter.sh ####
>
> Then I compared maildropbogo/stderr.txt (Christian's) with stderr.out
> (mine). As mail clients tend to wrap lines, I've attached an edited
> part of the diff. Here are my observations:
>
> The textblock.c lines have different addresses due to MacOS and Linux
> differences -- not a problem. Some of these lines have been snipped
> (because there are lots of them).
>
> Then at after "@@ -1079,32 +1078,39 @@" the diff becomes interesting.
> Function yyinput (part of the lexer) reports 327915 bytes received by
> Linux but only 8192 bytes received by MacOS. My diagnosis is that
> MacOS has a problem.
>
> Christian, as a test for you, modify maildroprc to use bogofilter.sh
> and see if stdin.out is big (350k) or small (8k).
>
> I'm looking forward to hearing what happens!
>
> Regards,
>
> David
I forgot to include the sizes of the std* files:
MacOS:
270557 Jun 16 06:21 stderr.txt
8192 Jun 16 06:21 stdout.txt
Linux:
1532529 Jun 16 09:03 stderr.out
333309 Jun 16 09:03 stdin.out
351879 Jun 16 09:03 stdout.out
As can be seen, not only does MacOS produce an 8k stdout file, but
stderr varies significantly is size (270K vs 1532K).
More information about the Bogofilter
mailing list