procmail
[Top] [All Lists]

Re: Blind Carbon Copy....

1998-06-27 00:02:27
:O
^To(_dot_)*whatever(_at_)mydomain(_dot_)com
! whoever(_at_)pop(_dot_)server(_dot_)com

I would like to blind carbon copy  another email as well as forwarding
it...

If you're using procmail 3.10 or greater...

:0
* ^TO_whatever(_at_)mydomain(_dot_)com
{
   :0
   * ^From \/[^ ]+[ ]+
   | $SENDMAIL -f$MATCH whoever(_at_)pop(_dot_)server(_dot_)com

   :0
   | $SENDMAIL whoever(_at_)pop(_dot_)server(_dot_)com
}

Second case is there in case you get a blank address in From_, usually
only happens with bounces and system mail.  Depending on your system's
configuration, you may also get an extra header that says

   X-Authentication-Warning: mydomain.com: whatever set sender to blah
     using -f

You can get around this by changing the sendmail.cf file's setting for
PrivacyOptions; lose the authwarnings flag.  Or you can make yourself
a trusted user to sendmail, but I'd just as soon leave the header
there.  Let's you know where the message really came from.

I changed your To: match to the ^TO_ macro -- this should match more
cases for you (Cc:, Resent-To:, etc.).  If you don't want it, replace
it with To:

Chris

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