Bug 67570 - formail causes sigpipe; procmail doesn't ignore it
Summary: formail causes sigpipe; procmail doesn't ignore it
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: procmail
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-27 16:14 UTC by Jonathan Kamens
Modified: 2007-04-18 16:43 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-01-06 02:43:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2002-06-27 16:14:54 UTC
If you use "|formail -D" in a procmailrc to detect and discard duplicates, it
frequently won't work because formail exits as soon as it detects the duplicate,
thus causing procmail to get a SIGPIPE trying to write the rest of the message
to formail, and it doesn't detect and ignore the SIGPIPE, so it decides that the
delivery to formail failed.

Formail should probably read the entire message even if it's going to discard
it, to avoid SIGPIPE.  At the very least, it should have an option to enable
this behavior.  And procmail should probably ignore SIGPIPE errors writing to
delivery filters -- if the filter exited with status 0, it closed prematurely on
purpose and procmail should consider the message delivered.

(A workaround is to put the "h" flag in the procmail recipe so that only the
header is fed to formail, but this shouldn't be necessary.)

Comment 1 Trond Eivind Glomsrxd 2002-07-03 19:50:52 UTC
Any testscenario? I use

:0 Wh: msgid.lock
| formail -D 8192 /home/devel/teg/Mail/msgid.cache

myself, receive a huge amount of mail and haven't seen any problem...

Comment 2 Jonathan Kamens 2002-07-03 19:53:40 UTC
As I said in my initial bug report, the problem goes away if you put the "h"
flag in the recipe, as you do in the example you gave.  I'm saying that it
shouldn't occur even when there's no "h" in the recipe.


Comment 3 Philip Guenther 2002-09-21 06:41:45 UTC
The reporter should file a bug against whatever documentation showed formail -D
being used to suppress duplicates without using the 'h' flag on the recipe.  All
the examples in the procmail documentation show the 'h' flag, so I'm not sure
where the incorrect recipe came from.

Changing the behavior of formail -D to discard the message body (but not when
splitting messages, of course) is reasonable.  I'll add it to my todo list,
though I have no idea when it'll ever get done (my procmail maintenance time has
been sorely limited for a while now).



Note You need to log in before you can comment on or make changes to this bug.