procmail
[Top] [All Lists]

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

1996-09-05 06:10:05

Jon Spewak <ml(_dot_)procmail(_at_)JonSpewak(_dot_)com> wrote:
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

If you're doing that for delivery, the _only_ way to grab the actual
intended recipient is from sendmail itself, you'd have to re-write the
delivery rule in the cf file.


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.

If you're just sorting mailing lists and personal mail, that's why I use
this (since mailing lists usually set the Resent-Sender: like they should):

FROM="(Resent-)?(From|Sender):(.*[^a-zA-Z])?"

:0
* $(^TO|^$FROM)(procmail|[Ss]martlist)
{ FOLDER=in/pm
  ...
}


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.

That's in the sendmail envelope outside all headers or stipped from the
headers in the case of a Bcc:, and sendmail is not guarenteed to pass that
along in any way to the delivery process unless you specifically set it up
to do so.  I think I remember someone posting such CF modifications several
months ago.


-philip

____________________________________________________________ Philip Kizer ___
Texas A&M CIS Operating Systems Group, Unix ( 409.862.4120 ) 
pckizer(_at_)tamu(_dot_)edu

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