procmail
[Top] [All Lists]

Re: Local redelivery of procmail'd spool?

2001-08-16 13:12:21
Philip suggested to Dan,

| > # Extract the first Received: header field and then look for
| > # a "for" clause in it.
| > :0 w
| > * ^Received:\/.*
| > * MATCH ?? [ ]for[ ]+\/<[^>]+>
| > ! $MATCH
| >
| > :0:
| > hard-cases

Dan expressed his appreciation but also his disappointment:

| But it looks like neither rule catches anything. They all fall through to
| hard-cases, when i use
| 'formail -Y -s procmail testrc <mail-to-be-delivered'

Dan, you might be using an older version of procmail that recognized MATCH
but didn't allow rematching within the same recipe.  What does procmail -v
say?

And more significantly, what does a verbose logfile say?  If it says that
the first condition assigned a string to $MATCH that included a match to the
second condition's regexp but that the second condition didn't pass, then
you should upgrade procmail.  Meanwhile, this will get around the problem if
it's what I'm thinking it is:

 # Extract the first Received: header field and then look for
 # a "for" clause in it.
 :0 w
 * ^Received:\/.*
 {
  LATEST_RECEIVED=$MATCH

  :0
  * LATEST_RECEIVED ?? [ ]for[ ]+\/<[^>]+>
  ! $MATCH
 }

 :0:
 hard-cases




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