procmail
[Top] [All Lists]

Re: Jari's pm-jalist.rc mailing list identifier

2002-08-25 23:27:15
dman(_at_)nomotek(_dot_)com writes:

From: Andrew Nesbit <alnesbit(_at_)optushome(_dot_)com(_dot_)au>

    * ! LIST ?? ^^^^        # does this mean "if LIST is non-null"?

No.  It means "If LIST is not either unset or set to null."


Okay, let me get this straight to see if I have interpreted the
English correctly...  In other words, you saying that it means "if
LIST is set (possibly with a null value) OR LIST is non-null"?

So if I am correct, then this would reduce down to a test of "if LIST
is set"?  (BTW, Is this idiomatic of Procmail?)

Which, in turn, suggests that pm-jalist.rc always sets LIST to a
possibly-null value, even if it has not identified a list for the
message to go to.

    $LIST.spool

It works great if pm-jalist.rc actually identifies a list (and
hence,

Yes, as it should.  LIST in that case is not unset.  That's what you
told procmail you wanted to do.

Okay, I understand.  But then, what could be a possible motivation for
having that sort of logic in the condition rule?  (I got it from
Jari's Procmail tips page, and he must have had a useful reason for
it.)  Just curious.


says "do the action if LIST is non-null", due to the following bit
in "man 5 procmailrc":



If that's what you want, then you want this condition line:

      * LIST ?? .

I just found a slightly more elaborate version:

        :0                          # if list name was grabbed
        * LIST ?? [a-z]
        {
                dummy = "Saving mailing list: $LIST"

                :0 :
                list.$LIST
        }

What's the point of doing it like this (that is, with the nested block
and the dummy variable)?

Thanks again.

Andrew.

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