procmail
[Top] [All Lists]

Re: Capturing Harassing Emails

1999-08-07 22:57:56
On Fri, 6 Aug 1999, Dave wrote:


    Hi, 
 
    I am attempting to use procmail to capture emails from a 
    particular email address (external) that has been harassing
    individuals here at our site (internal). What I would like to do
    is capture emails (not bounce) from that particular address, then 
    resend the email to two other individuals (internal) attached with 
    some remarks such as: 

   "The postmaster account has captured the following email from 
    harasser(_at_)outside(_dot_)com(_dot_) The email was not delivered to the 
target
    recipients, but this copy has been sent to you for your records".

    I have tried using the following .procmailrc I read about in 
    an answer posted by Alan K. Stebbens, which I modified a bit. 
    The filter does capture the message from the sending address and 
    forwards a copy with the add-on message to user1 and user2, but
    the problem is the email in user1 and user2 receives 1 header
    of the original message, but 2 bodys each time. Also, the
reject.mail
    file keeps receiving appended messages each successive capture
    so that each time user1 and user2 get an email, they see
    a long list of the previous captures. I tried adding an 
    "rm $REJECTMAIL" in various places to no avail.

    I am fairly new at procmail, so any suggestions, rewrites, 
    corrections, or different approaches are welcome.

    Thanks, Dave


    My .procmailrc:

[..]

Myabe this will be of some use to you.  The following is the basic
bouncer.rc I've used to handle various reasons why I refuse mail.  
I.e. people using vcards, html email, etc.  I cat a small file based on
what triggered the recipe into the variable $MESSAGE.  Hasn't failed or
caused erronious messages yet.

#       Form the reply
:0Bfbw
| sed -e 's/^/}/'; sed -e 's/>//g'

:0fhw
| sed -e H -e '$ G'

:0fh
| $FORMAIL -rtkb -I"From: Bill's MailBouncing Daemon 
(wmcclatc(_at_)primenet(_dot_)com)" \
                 -I"Reply-To: $FROM" \
                 -I"Precedence: junk" \
                 -I"Subject: Mail Returned Unread" \
                 -I"Bcc: wmcclatc(_at_)primenet(_dot_)com" \
                 -I"X-Loop: The Lunatic Fringe"

:0fb
| cat $MESSAGE -

:0
! -t


-- 
Captain Penny's Law:
        You can fool all of the people some of the time, and some of
the people all of the time, but you Can't Fool Mom.

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