procmail
[Top] [All Lists]

Re: formail problem

1998-11-29 16:28:50
Pete Kelly asked, as have others before him (this really should be in every
procmail FAQ),

| I'm getting the following error when I try the msgid.cache trick for removing
| duplicates:
| 
| procmail: Locking "msgid.lock"
| procmail: Executing "formail,-D,8192,msgid.cache"
| procmail: Program failure (1) of "formail"
| procmail: Assigning "LASTFOLDER=formail -D 8192 msgid.cache"
| procmail: Unlocking "msgid.lock"
| 
| This is from my .procmailrc:
| 
| ## Remove duplicates
| :0 Wh: msgid.lock
| | formail -D 8192 msgid.cache
| 
| I didn't find much in the formail man page to make me feel better.

Short version: that is what is supposed to happen.

If the message is arriving for the first time and is not a duplicate, then
formail -D reports failure (think of it as "no, it is not a duplicate").  The
`W' flag on the recipe says that if the command in the action line reports
failure, procmail should consider delivery failed and keep on reading recipes
to deliver the message.  (Upon such a "failure", formail -D adds the
unrecognized Message-Id: to the cache.)

If the message *is* a duplicate, then formail -D reports success (think of it
as "yes, we have a duplicate"), procmail considers the message delivered, and
it exits without having saved the message anywhere, so you never see the
extra copy.

Theoretically you should rarely get duplicates and formail -D should almost
always fail.

<Prev in Thread] Current Thread [Next in Thread>