[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] HTML Mail filter



> From: Webmaster [mailto:webmaster@xxxxxxxxx]
> At 15:14 30/06/00 -0700, you wrote:
> >Hello,
> >
> >	I've just completed implementing a procmail filter that
> should bounce any
> >messages sent to the list with the "Content-Type: multipart"
> header.  This


> Hi Lyle,
>
> Can I have the copy of your procmail recipe to use
> with our servers and mailing lists ?

Sure, and I'll cc the user list in case anyone else is curious... Note that
I edited out the resend aliases for the lists as then people on this list
could bypass the filter on desire.  I then renamed the original
"cobalt-users" alias to a random resend alias name, and created a new alias
that looks like:
	cobalt-users: "|/usr/bin/procmail -m /home/mailman/procmail/html_filter"
then ran newaliases, and was off and running.

(actually, there was a fair amount of test and debug inbetween)

Nothing should hit the fallthrough rule at the bottom, but I have it there
in case something does.  You can also note that it would be pretty simple to
change the rule that sends the bounce message to run the message through a
converter and post a stripped message.  I haven't yet found a converter
program and don't really want to write one myself.

- Lyle

:0 h
* ^Content-Type: multipart
* !^X-Loop: html-bounce
| (formail -t -r -A"Precedence: junk" \
	-I"From: mailman-owner@xxxxxxxxxxxxxxx" -A"X-Loop: html-bounce" ; \
	cat /home/mailman/procmail/html_bounce_msg) | $SENDMAIL -t

:0
* ^TO.*cobalt-users
! [users_resend_alias deleted]@list.cobalt.com

:0
* ^TO.*cobalt-developers
! [developers_resend_alias deleted]@list.cobalt.com

:0
| formail -I"Subject: [filter fall through]" -I"TO: lyle@xxxxxxxxxx" |
$SENDMAIL -t