Re: error writing to filter (bogofilter)

Christian Ebert <[email protected]>
Newsgroups gmane.mail.maildrop
Organization Black Trash Productions http://www.blacktrash.org
Message-ID <[email protected]>
* Sam Varshavchik on Thursday, June 13, 2013 at 08:06:13 -0400
> Christian Ebert writes:
>> After an upgrade to Mac OS 10.8.4 (64bit) from 10.5.8 (32bit) I
>> get the following error for _some_ messages:
>> 
>> temporary failure.
>> Command output: maildrop: error writing to filter.
>> /usr/local/bin/maildrop: Unable to filter message.
>> 
>> The offending rule is rather bog standard:
>> xfilter "/usr/local/bin/bogofilter -u -e -p"
>> 
>> Trying the bogofilter suspect on an offending message however
>> seems to cause no problems:
>> 
>> $ bogofilter -u -e -p < testbogomsg 1>/dev/null
>> $ echo $?
>> 0
>> 
>> Of course I recompiled all involved programs, like maildrop,
>> bogofilter, tokyocabinet.
>> 
>> What could be the problem?
> 
> bogofilter does not read the entire contents of the message from its
> standard input. It terminates before it is read in its entirety.
> xfilter pipes the message to the external filter program that it runs.
> If xfilter detects that the pipe is broken, before it's finished
> writing the entire message to the pipe, it concludes that the external
> filter has crashed.
> 
> Given the buffering involved with pipes, you get non-predictable
> behavior that, sometimes, maildrop succesfully finishes writing the
> end of the message, which gets buffered in the pipe before the
> external command terminates without reading in its entirety. There's
> no way to detect that, so, depending on random factors, sometimes an
> error gets detected, sometimes not; and this depends in part on the
> underlying operating system platform and implementation. It's not
> surprising that different behavior is observed after upgrading.

Thanks for the explanation. However, it's not completely random,
it is replicable with certain messages.

What shall I do? Take it to the bogofilter list? Switch back to
procmail - it has no trouble with exactly the same message(s)?

-- 
\black\trash movie   _SAME  TIME  SAME  PLACE_
	       New York, in the summer of 2001

--->> http://www.blacktrash.org/underdogma/stsp.php

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.