[Mimedefang] BCC All Emails

Kevin A. McGrail kmcgrail at pccc.com
Fri Mar 19 15:50:18 EST 2004


> I want all emails BCC'd to accounts that correspond to that username.
>
> For example:
>
> All emails sent from user1 get bcc'd to user1bcc
> All emails sent from user2 get bcc'd to user2bcc, and so on.
>
> I will of course already have the accounts user1bcc and user2bcc and so on
> set up.
>
> If so, can somebody please post the sample code to do this?

You are confusing me on your to/from statements above.  This assumes you
want mail destined for your domain copied.

Also, I recommend doing this as part of the if not spam loop:

 if ($hits >= $req) {
  ...

 } else {
  ...

   my ($list);
   foreach $recip (@Recipients) {
     if ($recip =~ /\@wherever.com$/i) {
      add_recipient($recip.'bcc at wherever.com');
     }
   }
}

Regards,
KAM



More information about the MIMEDefang mailing list