procmail
[Top] [All Lists]

HELP! BCC Recipients, how to detect who the message is actually for?

1996-09-04 23:29:12
THE PROBLEM:
I have a fairly large .procmailrc file, which processes hundreds of
different usernames and domain names.

:0
* ^TOuser(_at_)domain-name(_dot_)com
! user(_at_)somewhere-else(_dot_)com

Something like this works great for all users, except when someone sends a
message where the recipient's address is in Bcc:.  Mailing lists do this
sometimes.

^TOuser(_at_)domain-name(_dot_)com won't even catch it.  When I view the full 
headers
of these messages, my email address is nowhere to be found in the message
headers.  Procmail is looking for the recipient in the proper fields (To:,
CC:, etc.), but it won't find it the recipient there.  Occasionally some
SMTP servers write "ESMTP for <user(_at_)domain-name(_dot_)com>" in a Received: 
field.
 Going by the Received: field can be very dangerous and unreliable, so I
definitely don't want to do that.

Take a look at the header of THIS message.  I sent it Bcc:
procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de(_dot_)  Depending on how 
your server is, you
may not see procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de listed next to 
To:, CC:,
Appearantly-To:, or any of these.

I thought I read somewhere about a $1 or $2 or $RECIPIENT variables which
is supposed to contain who the message is actually for, but I haven't found
any more about that.  Logically, something like this must exist.  If your
mail server receives an email message addressed to you in the Bcc: field,
and your email address isn't written anywhere in the header, how does it
know where to deliver the mail?  It must know.

Any insight would be appreciated.

<Prev in Thread] Current Thread [Next in Thread>