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.