procmail
[Top] [All Lists]

Re: Pipe to formail succeeds, simple method fails

2001-04-20 11:13:22
Glenn asked,

| This works as it should:
| 
| :0:
| * ^Subject:.*\<proctest\>
| | formail >> Procmail-test

| But can anybody
| explain to me why this simpler method fails:
| 
| :0:
| * ^Subject:.*\<proctest\>
| Procmail-test
| 
| What happens in this case is:
| 
| The folder "Procmail-test" is created if it doesn't
| exist; a lock "Procmail-test.lock" is created.
| 
| And that's it! Things freeze at this point and the
| message is never delivered.

Your logfile excerpts tell the story:

| My logfile reports the following in the first
| (successful) case:
| 
| procmail: Assigning "MAILDIR=/home/user/mail"
| procmail: Match on "^Subject:.*\<proctest\>"
| procmail: Locking "Procmail-test.lock"
| procmail: Executing " formail >> Procmail-test"
| procmail: Assigning "LASTFOLDER= formail >>
| Procmail-test"
| procmail: Unlocking "Procmail-test.lock"
| >From xyz(_at_)abc  Thu Apr 19 20:37:15 2001
|  Subject: proctest
|   Folder:  formail >> Procmail-test                                    1105
| procmail: Notified comsat: "user@: formail >> Procmail-test"

Note: no attempt to get a kernel-lock.

| In the second (unsuccessful) case it reports:
| 
| procmail: Assigning "MAILDIR=/home/user/mail"
| procmail: Match on "^Subject:.*\<proctest\>"
| procmail: Locking "Procmail-test.lock"
| procmail: Assigning "LASTFOLDER=Procmail-test"
| procmail: Opening "Procmail-test"
| procmail: Acquiring kernel-lock
| 
| and never goes any further.

It hangs trying to get the kernel-lock.

| Trying the same thing without the lockfile (i.e. using
| :0 rather than :0: in the first line of the recipe)
| doesn't work either. Exactly the same happens (but
| without the .lock file of course).

The second colon is only for requesting a dotlock file; if procmail is
compiled to use kernel-locking strategies, it will use them whether you have
the second colon or not.

| procmail -v reports:
| 
| procmail v3.14 1999/11/22
| Locking strategies:     dotlocking, fcntl()

Perhaps you should recompiled it with fcntl specifically disabled.  Set
LOCKINGTEST=000 in the Makefile so that procmail will use only dotlocking.

This situation can occur, for one example, when the compilation routines test
directories only on the machine where they're running when they determine
which locking strategies are safe, but then mail delivery occurs across
machines.  Another case is one of running a procmail binary on a different
machine from the one where it was compiled instead of recompiling it on the
machine where it will run.

Rebuild procmail on the machine that delivers mail and either force it to use
only dotlocking or give it enough directories to test so that it samples all
the cross-mounts.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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