procmail
[Top] [All Lists]

Re: Exit Codes

2001-10-03 02:04:37
Odhiambo Washington <wash(_at_)wananchi(_dot_)com> writes:
I have TWO questions:

1. What does Non-zero exit code mean? (pls refer to the snippet below)
...
procmail: Executing " formail -xFrom: | fgrep -if $PMDIR/green.lst"
procmail: Non-zero exitcode (1) from " formail -xFrom: | fgrep -if 
$PMDIR/green.lst"
procmail: No match on " formail -xFrom: | fgrep -if $PMDIR/green.lst"
...

To quote the EXTENDED DIAGNOSTICS section of the procmail(1) manpage:

       Non-zero exitcode (nnn) by "x"
                              Program  that  was started by proc-
                              mail as a condition or as  the  ac-
                              tion  of a recipe with the `W' flag
                              returned nnn instead  of  EXIT_SUC-
                              CESS (=0); the usage indicates that
                              this is not an entirely  unexpected
                              condition.

So, the program condition returned 1, which procmail then interpreted as
not a matching, as seen in the next log entry.


2. What causes extranneous lockfile? I am attaching my recipe that
gives that error and fails to work...

Quoting the procmail(1) manpage again:
       Extraneous x ignored   The action line or other  flags  on
                              this  recipe  makes flag x meaning-
                              less.

Hmm, that should say "...on this recipe make x meaningless."

But the point is that you have a recipe that specifies a locallockfile
but something else about the recipe rules that out.  As it turns out, the
only time that happens is when you specify a locallockfile on a recipe
which has a nested-block action and that *doesn't* have the 'c' flag.
Looking at your rcfile chunk we see:


## Return mail if password isn't there
:0:passwd.lock
...
{

You should do one of four things:
1) Remove the locallockfile if it's not really needed, or
2) Move it to one or more inner recipes, if no 'inter-recipe atomicity'
   is needed, or
3) Replace it with a LOCKFILE assignment, or
4) Add the 'c' flag to the recipe.

Which of those is the correct choice for this situation depends on why
you put the lockfile there.  I suspect you should choose (2) and put
the locallockfile on the second nested recipe and let procmail choose
the name to match the file it's protecting, ala:
        :0 c:
        | /usr/local/bin/formail -rtzxTo: >> $PMDIR/black.lst

But I'm not 100% sure.


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>
  • Exit Codes, Odhiambo Washington
    • Re: Exit Codes, Philip Guenther <=