procmail
[Top] [All Lists]

Re: Identical "From:" and "To:" - Revisited

1998-02-09 17:10:29
era eriksson wrote:

Seems to satisfy all the conditions in the recipe... and yet it passed
through my .procmailrc like a ghost. Well, serves me right for using stuff
I can't grok, since the meaning of Era's

Can you show a VERBOSE log snippet of the relevant part? 

Here you go:

procmail: Match on !
"(^(Precedence:.*(junk|bulk|list)|(((Resent-)?(From|Sender)|X-Envelope-From):|>?From
)(.*[^((_dot_)%(_at_)a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|mmdf|root|n?uucp|smtp|response|LISTSERV|owner|request|bounce|serv(ices?|er)|Admin(istrator)?)([^).!:a-z0-9].*)?$[^>]))"
procmail: Match on ! "^(From|To):.*(eristic)"
procmail: Assigning "MATCH="
procmail: Matched "cicho(_at_)free(_dot_)polbox(_dot_)pl"
procmail: Match on "^To: \/.*"
procmail: No match on "^\/(From|Reply-To): $\MATCH"

So... not FROM_DAEMON okay, not from "eristic" (i.e. me) okay, "To:" placed
in $MATCH, and failing to equal (From|Reply-To).


* $ ^\/(From|Reply-To): $\MATCH
<...>
Also... Since everything after \/ is assigned to $MATCH, it will include
the literal "From:" string, won't it? So it has no chance to ever equal the
bare email address extracted from the "To:" header one step before. Somehow
this doesn't look quite right...

That's just for logging purposes, because I want to see whether I
matched on From or Reply-To:. MATCH will actually get set twice here.
Perhaps this is easiest to explain with an example:

Aah, I get that part now :) Thanks!


BTW, I grepped the procmail manual and all the tutorials I have stashed
away for the "$\" bit and came up with nothing :)

Then you need more escape characters in your regular expression, or
you have a very old manual. (This does not work as expected in 3.10, I
believe. Obviously it's not in the 3.10 manual either, then.)

On 09 Feb 1998 10:35:45 +0200, <jari(_dot_)aalto(_at_)poboxes(_dot_)com> wrote:
    9.4 What is construct $\VAR

        [era and david] Procmail 3.11, $\VAR will escape regex 
metacharacters
        in foo. It should produce a suitably backslash-escaped expression 
for
             ^^^ (this should probably be "VAR", not "foo")
You might add that it's actually really explained in the [manual] too.

So we've probably located the problem: my ISP is still running procmail
3.10. I've been asking them to upgrade before... Any way of adjusting your
rule to work with ver 3.10? Will dropping the backslash in $\MATCH work? 

.marek