How to discard BCC:"d emails in general

How to discard BCC:"d emails in general

am 05.11.2005 10:21:34 von paulc8+nospam

Is there any way to discard emails which are not addressed to
my specific email addresses in the To: or CC: fields, but only in the
BCC: field (i.e. someone has sent an email to me only through the
BCC: field, not To: or CC: ).

Yes, websites like
home.comcast.net/~jyavner/TP600E/procmailrc
www.uwasa.fi/~ts/info/proctips.html#spam
show an example solution, but they hard-code their email addresses
in the procmail recipe.

Is there a way of doing it without such hard-coding?

I'm in a corporate environment, and I need to do it for
only a subset of the addresses in the /etc/aliases file, e.g.
for username1 and username2:
username1: "|/somescript"
username2: "|/somescript"

The 'somescript' program does this:
exec /usr/bin/procmail -m /etc/support.procmailrc $*

The example solutions in the above websites would require
me to hard-code the username1 and username2 addresses into
/etc/support.procmailrc . Is there a smarter way of
doing it, without hard-coding?

The problem with hardcoding is that my environment is actually much more
complex than I've written above. Also, the usernames in /etc/aliases
frequently change, and I don't want someone to have to maintain
the same usernames in /etc/support.procmailrc as well.

E.g. in /etc/aliases or procmailrc, is there any way to detect that
the email arrived through To: or CC: in general, without hard-coding
the actual email addresses?