procmail
[Top] [All Lists]

Re: Trouble with receipe(s)

2003-10-14 20:23:17
Date: Tue, 14 Oct 2003 16:44:20 -0400 (EDT)
From: Birl <sbirl(_at_)concept(_dot_)ocis(_dot_)temple(_dot_)edu>
Subject: Trouble with receipe(s)

I know Im doing something dumb, but I cant figure out what:
Given these 2 similiar receipes:


        :0:
        * @\/[^(_at_)]+mail\(_dot_)com
        .SPAM/$MATCHmail.com

        :0:
        * @\/[^(_at_)]+mail\(_dot_)net
        .SPAM/$MATCHmail.net



Corresponding logs:

procmail: No match on "@\/[^(_at_)]+mail\(_dot_)com"
procmail: Assigning "MATCH="
procmail: Matched "roguemail.net"
procmail: Match on "@\/[^(_at_)]+mail\(_dot_)net"
procmail: Locking ".SPAM/.net.lock"
procmail: Assigning "LASTFOLDER=.SPAM/.net"
procmail: Opening ".SPAM/.net"
procmail: Acquiring kernel-lock
procmail: [25509] Tue Oct 14 14:15:49 2003
procmail: Unlocking ".SPAM/.net.lock"


In this case I was expecting to file to ".SPAM/rougemail.net"  instead of
".SPAM/.net"


Yeah, there *is* an obvious explanation --

It thinks the variable is named "MATCHmail", which, of course, has a
null value.


One runs into the same kind of problem in shell scripts.

The shell-script 'solution' is to surround the actual variable-name
part with braces.

*IF* procmail works the same way -- I've never had occasion to test -- you'd
use:
   
          .SPAM/${MATCH}mail.com

for example.



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