Strip HTML from list messages

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Blake Barnett
Date:  
Subject: Strip HTML from list messages
Here is a way to do it, with example scripts and procmail filters. I'd
love it if this was added to the list-manager box to filter HTML from
all emails.

NOTE: I pulled this from the linux-xfs list, make changes as necessary.
-----------

Original article
http://www.unixreview.com/documents/s=1236/urm0104h/0104h.htm

script all typed up

http://www.kluge.net/mailfiltering/strip_html.txt


/etc/aliases:

#linux-xfs: "| wrapper resend -l linux-xfs linux-xfs-outgoing"
linux-xfs: "| procmail -m LIST='linux-xfs' /etc/mail/procmailrc.lists"
etc....


procmail.lists:

#VERBOSE=on
MAILDIR=$HOME/Mail
LOGFILE=majorlog
PATH=/usr/bin:/usr/local/bin:/bin
HOME=/etc/mail/prochome/
MAILDIR=$HOME
LOGFILE=$MAILDIR/majorlog-`date +%y%m`
JFDIR=/etc/mail/junkfilter/

:0 Whc: msgid.lock
| formail -D 8192 msgid.cache


:0 a:
duplicates-`date +%y%m`

# Call junkfilter
INCLUDERC=$JFDIR/junkfilter

# Take action if junkfilter caught a junkmail.
:0
* JFEXP ?? .
{
        :0 f
        * JFSTATUS ?? 1
        | formail -i "X-junkfilter: $JFVERSION" -i "X-Spammer: $JFEXP"


        :0 E :
        | formail -i "X-junkfilter: $JFVERSION" -i "X-Spammer: $JFEXP" \
        >> junkmail-`date +%y%m`
}


:0 fw
* ^Content-type:.*boundary
* <100000
|$HOME/strip_html.pl

:0
| /etc/smrsh/wrapper resend -l $LIST $LIST-outgoing



-- 
Blake Barnett (bdb)  <>
Sr. Unix Administrator
DevelopOnline.com                 office: 480-377-6816


"Do, or do not. There is no try." --Yoda