procmail
[Top] [All Lists]

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

2002-08-25 23:27:16
Andrew asked,

| I am trying getting to get Jari Aalto's pm-jalist.rc to allow
| non-mailing-list mail to "fall off the end".

I hesitate to use anyone else's canned solution-to-everything set of procmail
recipes.  Jari's in particular are full of typos, formatting errors, and
spellchecker mangling.  Maybe all the others are too, but I haven't read
through them as much.

|     :0 : # if list name was grabbed
|     * ! LIST ?? ^^^^ # does this mean "if LIST is non-null"?
|     $LIST.spool

Well, if you'll take the comment off the condition line, it would mean that.
Comments can go to
the right of colon lines and actions, or between recipes, or in newer versions
of procmail even
between lines of a recipe, but they can't go to the right of a regexp
condition.

Perhaps you're using a very old version of procmail that didn't grok ^^?

| But if the value of LIST is null,
| then it gets put into the file .spool instead of falling of the end.
|
| My understanding is that the following condition:
|
|     * ! LIST ?? ^^^^
|
| says "do the action if LIST is non-null" ...

Short answer: yes.  Long answer: it says "[do the action] unless LIST is null
or unset," which is logically equivalent.  [To be very nitpicky, "if LIST is
non-null" would be written this way, in case you're interested in nits:

  * $ ! ${LIST:+!}
or
  * ! $ ${LIST:+!}

which has the same results and is harder to read.]

Dallman's suggestion of

 * LIST ?? .

means "if LIST has a character that isn't a newline," and that also works out
equivalent in practicality unless you receive a list for which the LIST
variable comes out as a string of newlines.

| Can somebody please help me see the problem here?

Possibilities:

1. Some other recipe is putting those messages into .spool; a verbose logfile
will help track that down.

2. Your procmail binary and your procmail man pages were not compiled
together, and the man pages are newer than the binary and know about "^^" but
the binary is older and doesn't; or for the same reason the man pages
understand "search areas" but the binary doesn't grok "VAR ??" syntax.

3. You have that comment on the condition line in your rcfile and not just in
your post, making the regexp something that will never match, so a condition
that the regexp *not* match will always pass.



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