procmail
[Top] [All Lists]

Re: Mail doesn't go to spool

2001-03-25 19:50:57
Gary Taylor <gctaylor(_at_)eskimo(_dot_)com> writes:
I'm trying to figure out why procmail is not copying mail to my spool at
/var/spool/mail/gctaylor after processing this simple recipe file.  It gets
copied to the backup dir just fine, but that is the only place that I can tell
it is being delivered.  I know it is the top two recipe lines causing me grief
but I thought with the 'c' option it would copy the mail into the
dir and keep processing. If no recipes matched and it fell off of the end then
it would be filed into the default mail spool.    How I think this should work
is copy all mail to my backup dir under Mail and also keep a copy of the mail
in my incoming mail spool unless it is from Cron.
...
:0:c   # This section copies every message into backup while I debug 
backup

:0:ic
| cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`
...
     0       1  ## procmail: Locking "c"
...
     0       1  ## procmail: Unlocking "c"

Don't those two messages seem suspicious?  Procmail is treating the 'c' as
the name of the lockfile!  Taking a look at the top of the procmailrc(5)
manpage for the syntac of a recipe we see:

   Recipes
       A  line starting with ':' marks the beginning of a recipe.
       It has the following format:

              :0 [flags] [ : [locallockfile] ]

So the flags need to go before the second colon.

However, there's a better solution: _remove_ the second colon!  Since the
"backup" folder is a directory, no file locking is needed.  Indeed, the
original version of the backup recipes, as found on the procmailex(5)
manpage, does no locking.

So:
        :0 c
        backup

        :0 ic
        | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`


procmail v3.14 1999/11/22, Copyright (c) 1999, Stephen R. van den Berg

Version 3.14 has some annoying bugs in it.  You should upgrade to
version 3.15.1.


Philip Guenther
_______________________________________________
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>