Re: [SPAM] Re: Procmail question
Gregory Carter <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <[email protected]> |
That is incorrect. I need the headers to match a forward rule to
correctly. It would appear bcc is a special case:
See: http://www.dcs.ed.ac.uk/home/procmail/faq/mini-faq.html#bcc
" *Q:* Why can't I match on the |BCC:| header?
*A:* You can't match on the |BCC:| header because it is not present in
the message you receive. If the sending program is functioning
correctly, it will copy the recipient data from the |BCC:| header into
the "envelope", so it knows where to send the message, and then
completely discard the |BCC:| header from the message. This is what the
"Blind" in "Blind Carbon Copy" stands for; /none/ of the recipients are
supposed to see who's been |BCC:|ed. (Okay, so the spec has a few more
twists. This is how Sendmail does it. Some other mailers will show the
BCC list to the people who are being BCC:ed.)"
As I stated previously below, the forwarding headers is required by
procmail, it is just not available to match on as it is discarded when a
bcc is specified.
I have corrected this problem by dumping the global definitions of
procmail forwards in my procmailrc file and simply use .forward file.
In each persons individual account for now.
Now, if I do not want to use the headers in the message, is there an
environment variable I can check in a procmailrc global definition file
that tells me what the current user is?
Specifically, can I get the $DELIVERY agent line in tmdarc which is
procmail, to tell me what my current user is who is getting this Email?
I thought I would bring that up as you mentioned a environment variable
for the MTA, and I was wondering if you knew of one for procmail I could
reference to make a match on a delivery address.
If that is possible, then I won't need the headers as you claim.
-gc
Stephen Warren wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Gregory Carter wrote:
>
>> Actually, the forwarding of Bcc's do need header information,
>> specifically, who the message is to. In this case it is the recipient
>> of the Email.
>>
>
> No, forwarding does not *require* the use of email headers.
>
> If you want to take different action based on the email address that the
> email was sent to, you should be using the envelope recipient address
> (which is not an email header, but a separate piece of data associated
> with the email; often passed to the LDA (Local Delivery Agent) via an
> environment variable). This will always work (except perhaps in the case
> where envelope recipient is different to the to/cc/bcc address)
>
> This has absolutely nothing to do with forwarding, though; any action on
> an email (e.g. filing to different folders) that requires knowledge of
> the recipient address is affected by this.
>
>
>> It is also not correct to say To, Cc, Bcc are handled in the exact same
>> way. The header information for example is stripped in Bcc's.
>>
>
> Again, there is no header to *strip*, because there was no header
> containing this information in the first place. It would be correct to
> say that the sending MUA (Mail User Agent; sending email program) never
> added a header, which is the whole point of BCC.
>
>
>> Particularly with respect to procmail as:
>>
>> * ^TO_user
>> {
>> :0 c
>> ! [email protected]
>> }
>>
>> will work, but
>>
>> :0
>> * ^(Cc|To).*user
>> {
>> :0 c
>> ! [email protected]
>> }
>>
>
> True. That's because the above procmail code isn't implemented properly.
> It should be using the envelope recipient not the email headers (or
> possibly, using some combination of both the envelope recipient and
> email headers if you want).
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF00Bshk3bo0lNTrURApMtAJwNbjm0I0lt8HPHJ/VrudySinpIXgCfdFCk
> styKjp4mPkQsfC3D5Z0x+YA=
> =ND/y
> -----END PGP SIGNATURE-----
>