procmail
[Top] [All Lists]

newline variable and locking /dev/null

1997-09-04 15:59:06
Chuck Campbell got this advice from someone:

| > Where N="
| > "

and he asked,

| This is the part I don't understand, what is N equal to?

$N is equal to the newline between the two quotation marks.

| Meanwhile, I had tried
| 
| :0
| * ^From.*fwtk
| * ^Subject:.*ubscribe
| fwtk_junk
| 
| I then did a ln -s /dev/null fwtk_junk, so that the messages are actually
| thrown away, and not kept in a folder called fwtk_junk.  I continue to get
| the following errors in the log though:
| 
| procmail: Kernel-lock failed
| procmail: Kernel-unlock failed
| >From owner-fwtk-users(_at_)portal(_dot_)ex(_dot_)tis(_dot_)com  Wed Sep  3 
20:17:24 1997
|  Subject: Re: smap maxbytes handling, ESMTP, etc..
|   Folder: fwtk_junk                                                        
2077

| What have I done wrong in this recipe?

Procmail is not supposed to deliver to a [path that ends in a] symlink nor to
an existing plain file with more than one hard link.  I'm surprised that it
even attempted the kernel lock.  At any rate, even though you did not
request a local lockFILE, procmail still attempts kernel locks (if it is
configured to use any kernel locking strategies) on all deliveries to files,
and since it can't get a kernel lock on a symlink to /dev/null nor release a
lock it didn't have, it reports the failures.

If you want to dump to /dev/null, call it "/dev/null"; newer versions of
procmail recognize the name and don't attempt to get locks on it.

If you want to alternate frequently between dumping and saving fwtk mail,
instead of creating and removing symlinks, edit your .procmailrc thus:

   FWTK_DROP=fwtk_junk  FWTK_LOCK=:
   FWTK_DROP=/dev/null  FWTK_LOCK

   :0 $FWTK_LOCK
   * ^From:.*fwtk
   * ^Subject:.*ubscribe
   $FWTK_DROP

Now, whenever you change your mind between storing or trashing fwtk mail,
just comment out or uncomment the second line of variable assignments.

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