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]> |
* Christian Ebert on Thursday, June 13, 2013 at 14:04:24 +0100 > * 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)? Sorry for having sounded a bit harsh, but I'm a sorta desperate here - I had taken my entire postfix config apart before I nailed it down to this rather trivial cause. Are you suggesting that the only way around this in practice is: 1. inspect the postfix queue 2. in case there is this problem, disable bogofilter by temporarily changing the mailfilter 3. sendmail -q 4. reinstate bogofilter in the mailfilter At least for me this is not even a workaround. Would it help if I sent you one of the "offending" messages via pm for inspection? -- Die Wolke Wolfgang Eine Kindergeschichte mit Bildern. Von Michael Weber. Das Buch -->> http://www.blacktrash.org/baustellen#wolkewolfgang Online -->> http://www.blacktrash.org/wolkewolfgang ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev