procmail
[Top] [All Lists]

Re: Trouble with scoring (Was: Re: Need regex-help: inverted word search)

2005-01-05 10:18:28
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks a lot!

On 2005.01.05 16:24, R A Lichtensteiger wrote:

I think Sean expected $TO to be set by some previous recipe.  Because
you don't have it set, the evaluation is against an empty variable, so
doesn't match, so get's a zero.

That makes sense. :-)

You could either set $TO or use $MATCH:

  :0
  * ^To:\/.*
  { TO=$MATCH }

  :0
  * -1^0
  *  1^1 MATCH ?? @server
  * -1^1 MATCH ??  myname(_at_)server

or

  :0
  * ^To:\/.*
  * -1^0
  *  1^1 MATCH ?? @server
  * -1^1 MATCH ??  myname(_at_)server

And now it works, too! I somehow was under the expression that, like $= for the score there would be an "invisible" variable for the match as well, so the scoring would be applied to the last match. BTW, I've read the manuals for procmail, procmailex, and procmailsc, and I've also done some simple recipes in the past; however, I still feel I don't know too much yet about what can be done, and how, with procmail. Is there a good How-To you could recommend? I'm thinking along the lines of the Advanced Bash Scripting Guide, with enough details and examples for even the biggest newbie, but also useful for reference.

Best regards,

Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFB3B5hAB00fZdcFyQRAim2AJ92EYkj0tr22v2R6xfgV/uzmOZBYwCdFDDS
3w7Y5z7BxTte53XTrhQEYF8=
=6Hgb
-----END PGP SIGNATURE-----


____________________________________________________________
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