procmail
[Top] [All Lists]

Re: bcc filtering

2001-06-19 20:03:04
Hoff_D <Hoff_D(_at_)bls(_dot_)gov> writes:
I'm trying to filter messages that are bcc'd to me, but it only seems to
work if the message has a blank to: line.  Here is what I'm using:

:0
* ^Received:(_dot_)*hoff_d[(_at_)\(_dot_)]bls\(_dot_)gov
* ! ^TOhoff_d
/var/spool/mqueue/spam-procmail

Like I said, a blank to: line works fine, but if I put another address in
the to: line, procmail says that no match was found for *
^Received:(_dot_)*hoff_d[(_at_)\(_dot_)]bls\(_dot_)gov(_dot_)  

I imagine this is because my address isn't in the received line at that
point, but is there some other way that I can match the envelope recipient?
Sendmail passes some variables to procmail (procmail -Y -m $h $f $u) so are
those of any use?

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

(I'm routing all messages through procmail via a mailertable entry, and
procmail is configured as a local mailer)

...if procmail is also configured as the local mailer, why not put
this particular filter in your person .procmailrc?  Then you *know*
that you're one of the envelope recipients for that message.


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>