procmail
[Top] [All Lists]

Re: URGENT: CC & BCC mails not working

2001-02-06 13:10:31
At 20:42 2001-02-06 +0530, S. Jyotinarayan wrote:
How do I configure Procmail to dispatch correctly the mails coming through CC (carbon copy) and BCC (blind carbon copy).

BCC is not consistent, since if the MTA doesn't include such information in the header when calling procmail for LDA (if in fact, procmail is called as an LDA rather than via a .forward or manually invoked), it will not be available to procmail.

I assume that this is an extension to your other urgent request RE: forwarding mail between servers, and make certain assumptions - such as that you're attempting to filter for multiple recipients at your own domain via one mailspool, and that you technically have your own mailserver.

Keep in mind which tool is appropriate for certain tasks. Since you should have your own mailserver, you're better off handling this through the MTA config (typically sendmail).

Basically though, the operator you want to use is '^TO_', as described in 'man procmailrc' (_check_the_manpages_):

:0
* ^TO_someuser
do_something

would match messages addressed to someuser in any of several headers (i.e. doesn't care if it is To, Cc, or Bcc - nor does it relay which field it was found in, merely that it was found).

Note that If you get a message bound for more than one user on your server, say, with:

        To: user1
        Cc: user2, user3
        Bcc: snoopyuser

If you have a rule for matching user2 as above, and more than one copy of this message is delivered to the one mailbox (depends on MTA config), you could end up sending four copies to that one user, and NONE to the others. If you have a COPY flag (to handle one message to be distributed to each user), things work okay until you do get multiple copies delivered.

All of the BCC issues should be well covered in the FAQs, available at <http://www.procmail.org>


---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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