procmail
[Top] [All Lists]

Re: bcc filtering

2001-06-20 10:17:50
Hoff_D <Hoff_D(_at_)bls(_dot_)gov> writes:

Yes.  $3 will contain the address of the envelope recipient being
processed.  However....


Thanks for your reply.  I found that $2 actually has the envelope recipient,

Duh, you're right.  I suffered a thinko while reading the mailer
definition.


and I used a tip from another one of your messages like this:

address=username(_at_)bls\(_dot_)gov\(_dot_)PROCMAIL
* address ?? $ ^^$\2^^

Is it possible to compare $2 to something other than a variable, so that I
could just substitute "address" for 
"username(_at_)bls\(_dot_)(_dot_)(_dot_)(_dot_)" in the condition?
Or would this be less desirable?  And finally, would it be possible to loop
this condition with several different addresses?

If you copy $2 into another variable, then you can use it on the lefthand
side of the comparison:

        RCPT = $2

        :0
        * RCPT ?? ^^username(_at_)bls\(_dot_)gov\(_dot_)PROCMAIL^^
        whatever...

You can then also match several addresses at once using regexps:
  
        :0
        * RCPT ?? ^^(bob|jane)@bls\.gov\.PROCMAIL^^
        whatever...


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