procmail
[Top] [All Lists]

Re: MATCH problem

2003-01-19 08:35:36
On Sat, 18 Jan 2003, Professional Software Engineering wrote:

[^\>] is a curious expression in your messageid extraction.  Do you
actually know what it does?  '\>' is itself a character class expression.
'>' is a specific character.  You _should_ be stopping on dots, which
separate domains and hosts...

I worried about that; but it seemed to work.  ie,
where From: SomeDumbName(_at_)some(_dot_)dom <account(_at_)some(_dot_)dom>
* From:[        ].*\/\(_at_)(_dot_)*[^\>]
resulted in a MATCH of "@some.dom"

:0
* From:[        ].*\/\(_at_)(_dot_)*[^\>]
* $MATCH ?? Message-Id:[        ].*\/\(_at_)(_dot_)*[^\>]
foundit

BTW, you should preceed both of those regexp's with ^ to ensure they are
_headers_.  Also, testing or not, if you're outputting to a file, you
should specify the lockfile flag.

You're right.  I suppose my tests should be as strictly composed as the
"real thing." (head hanging, gazing at feet, wiggling toes)

I'm surprised it supposedly works for ANY of them - you're checking $MATCH
(the domain from the From: line) to see if it in turn contains:

         Message-Id:[    ].*\/\(_at_)(_dot_)*[^\>]

Is there some reason you believe that the DOMAIN from From: will contain
"Message-Id:" for instance?  Do you not see the glaring problem?

What I saw was:

* From:[        ].*\/\(_at_)(_dot_)*[^\>] {resulted in }
  MATCH {which contained} @some.dom
                     AND
* Message-ID:[        ].*\/\(_at_)(_dot_)*[^\>] {resulted in }
  MATCH {which contained} @some.dom
                      SO
  if A + B = C and D + E = C then C = D + E or something
  and all I needed was the proper incantation.

Extract each value in separate recipes, then compare them in a third.

  I also considered this, but I haven't yet found an example of assigning
MATCH to a variable.  I suppose it's something difficult like
VAR1 = $MATCH ?  Do I need to also invoke the "This $ makes everything
work like a shell expression" thingy?

This would also eliminate the problem of dealing with a situation where
Message-Id appeared before From: I suppose

(I was going to sign off "yours in voodoo;" but that would probably be
pushing it a bit.  Not sure why I feel so flippant this morning - must be
the coffee.  I REALLY DO appreciate the help Sean.  Thanks.)

                                - fleet -


_______________________________________________
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>