procmail
[Top] [All Lists]

Re: Why is formail failing?

1997-06-11 11:45:00
Eric Boehm asked,

| I am having a couple of problems with formail and I can't figure out why
| program execution is failing.

When you are using formail -D or formail -rD to check for duplicates, every
time formail finds a non-duplicate, it exits with a non-zero (failure)
status; that's the way it's designed.  If the Message-Id: or return address
is already in the cache, formail has successfully found a duplicate.

So the program failures are correct.  If the Message-Id: or return address is
not already in the cache, formail adds it and reports failure to have found it.

| The second problem occurs with seemingly random messages. This is what I see
| in the log

| procmail: Error while writing to "formail"
| procmail: Program failure (1) of "formail"

| The first log entry just says that there was a program failure. The second log
| entry [also] complains of an error while writing to formail.

Since your recipe for checking for duplicates doesn't use the `h' flag to
tell procmail to feed only the head to formail, longer messages may trigger
the additional "error while writing" warning, because formail reaches its
conclusion before reading in the entire message that procmail tries to feed
it, body and all.  Try adding the `h' flag to the recipe that checks for
duplicates.

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