procmail
[Top] [All Lists]

Re: persistent lock files that never go away

2004-07-28 00:46:15
On Fri, Jul 23, 2004 at 10:00:22PM -0600, Justin Gombos wrote:
* David W. Tamkin <dattier(_at_)panix(_dot_)com> [2004-07-23 19:21]:

However, these two run into the leading slash problem:

 *  ! \<scr\>
 *  HB ?? ! \<ex.?500\>

and should be written

  *  ! ()\<scr\>
  *  HB ?? ! ()\<ex.?500\>

if you want \< to act as a match to a non-word character.

I never heard of this problem!  I have been running scripts for years
such that a regex conditional begins with "\".  Here is a script that
is being used to handle old/malconfigured mailing lists, or lists that
came as digests (and later get reprocessed through formail):

  TO_FROM_ML_PREFIX=(urine-test|dat-heads|socal-raves|scr)
  
  TO_FROM_ML=$TO_FROM_ML_PREFIX(\
  @calyx.net|\
  @[a-z0-9.-]*near.net|\
  @ucsd.edu|\
  @socal-raves\.org)
  
  # To/From mailing lists
  #
  :0 
  *$ ^TO_$TO_FROM_ML
  *$ ^TO_\/$TO_FROM_ML_PREFIX@
  * MATCH ?? ()\/[^(_at_)]+
  {
    [snip]
  }

So this recipe should be failing on the second conditional?  Maybe it
is and I didn't test it well.  This might explain why (some?)
urine-test messages get past this recipe and end up in my default
inbox.

Also, notice the "()" prefix on the third conditional.  I was only
copying someone else, and didn't know what the parenthesis were for.

So what's really happening in the absense of "()"?

David has implied above what happens in the absense of some manner of
quoting the initial slash: it essentially gets eaten, and in his
example "\<" loses its meaning as a special token and becomes
merely "<" (and the char got quoted).  You also should remember that
"<" or ">" (unquaoted) directly after the "??" has a different meaning
from anywhere later on in the condition, where they revert to their
literal meaning and match their like symbols.  (But at the beginning,
they act as an size operator against the entire message.)

That said, there is no such issue in the recipes you quoted above.
There is no initial slash after "??" to be found that would need
quoting but doesn't have it.  So your recipe would be expected to work.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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