[maildropl] error writing to filter (bogofilter)

David Relson relson at osagesoftware.com
Sun Jun 16 15:09:38 CEST 2013


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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20130616/9dd602bf/attachment.txt>


More information about the Bogofilter mailing list