Bug 67570 - formail causes sigpipe; procmail doesn't ignore it
formail causes sigpipe; procmail doesn't ignore it
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: procmail (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-27 12:14 EDT by Jonathan Kamens
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-05 21:43:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2002-06-27 12:14:54 EDT
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 15:50:52 EDT
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 15:53:40 EDT
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 02:41:45 EDT
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.