Hi,... just checked the faq again and cant see the links http://www.mindwell.com/smartlist/contrib/reject_html.txt nor http://www.mindwell.com/smartlist/contrib/reject_garbage.txt However I had the text of one of these pages I saved before, but I am not sure what I *do* with this... the first part goes in rc.local.s00..... as is?.....do I need to adjust anything? and the second part (rejectmsg script)...is this a Perl script?.... how should I set it up? -DK From: rob@alegria.com (Rob Lingelbach) Date: Tue, 28 Apr 1998 11:20:20 -0700 Organization: Altruistic Intentions, Hollywood, CA X-Mailer: Mail User's Shell (7.2.6 beta(2) 2/29/96) To: Dave Hillman <hillman@enteract.com>, SmartList@informatik.rwth-aachen.de Subject: Re: Disallow 'Content-type: text/html' On Apr 28, 12:23, Dave Hillman wrote: } Subject: Disallow 'Content-type: text/html'
*Without* restarting the debate regarding the advisability or otherwise of restricting list submissions to plain text, can someone mail me the appropriate magic to either send submissions containing 'Content-type: text/html' to /dev/null or to return them to sender with an appropriate message.
I'll append here my rc.local.s00, followed by my 'rejectmsg' script, followed by the 'quotereject' script. These are all derivative of help given me by others on this group in the past, for which I am thankful. My filtration is fairly restrictive, but that's the way I like it. #$Id: rc.local.s00,v 1.2 1994/09/20 19:33:28 berg Exp $ # # This file contains several examples of how you can customise SmartList # through the RC_LOCAL_SUBMIT_00 hook. # # to kill messages that ask for a "Return Receipt". Lotus Notes # will reply dutifully but in a misconfigured way, to the addresses # in the "To:" header :0 Hhw * ^Disposition-Notification-To: { :0 c | formail -i "Subject: ***asking for Return Receipt"|$SENDMAIL -oi $maintainer :0 | rejectmsg -receipt } # from a suggestion by Tim Pierce <twpierce@rootsweb.com> # below was "* ^begin [0-7][0-7][0-7] .*" :0 hBHw * ^begin [0-7][0-7][0-7] [a-zA-Z0-9_.-]+ { :0 c | formail -i "Subject: ***uuencode or winmail.dat***warning"|$SENDMAIL -oi $maintainer :0 | rejectmsg -attach } :0 hBHw * ^Content-Type:[ ]+.*(multipart/|/enriched|coded) { :0 c | formail -i "Subect: ***content REJECT engaged by rob********"| $SENDMAIL -oi $maintainer :0 | rejectmsg -attach } :0 hBHw * ^Content-Type: application.* { :0 c | formail -i "Subect: ***content REJECT engaged by rob*********"| $SENDMAIL -oi $maintainer :0 | rejectmsg -attach } :0 hBHw * ^Content-Disposition: attachment.* { :0 c | formail -i "Subect: ***content REJECT engaged by rob*********"| $SENDMAIL -oi $maintainer :0 | rejectmsg -attach } :0 hBHw * ^Content-Disposition: inline; filename=.* { :0 c | formail -i "Subect: ***content REJECT engaged by rob********"| $SENDMAIL -oi $maintainer :0 | rejectmsg -attach } # mine (rob@alegria.com) :0 hBHw * 20^1 ^> * -10^1 ^[^>] { :0c | formail -i "Subject: ***quote REJECT engaged"| $SENDMAIL -oi $maintainer :0 | quotereject -attach } ----cut here----end of rc.local.s00 ----cut here----start rejectmsg script #! /bin/ksh : test=test # /bin/test echo=echo # /bin/echo cat=cat # /bin/cat sed=sed # /bin/sed grep=grep # /bin/grep date=date # /bin/date formail=formail # /usr/local/bin/formail multigram=multigram # ../.bin/multigram $test -z "$listaddr" && $echo "Don't start this script directly, it is used in rc.local.s00" && exit 64 tmprequest=tmp.request tmpfrom=tmp.from function=$1 $cat > $tmprequest sender=`$formail -rtzxTo: < $tmprequest` case $function in -attach) ($formail -i"From: $listreq" -rtA"X-Loop: $listaddr" < $tmprequest ;\ $echo "Your post to the mailinglist appears to contain an attachment or" $echo "enriched text..." $echo "Such posts are not accepted on this mailinglist." $echo "please resubmit your post as a plain text document, and" $echo "contact rob@alegria.com if you have any questions.." $echo " " $echo "[message follows]" $echo " "; cat $tmprequest)\ | $SENDMAIL $sendmailOPT $sender shift ;; esac case $function in -receipt) ($formail -i"From: $listreq" -rtA"X-Loop: $listaddr" < $tmprequest ;\ $echo "Your post to the mailinglist appears to contain a request" $echo "for a Return Receipt." $echo "Such posts are not allowed on the TIG due to Lotus Notes'" $echo "tendency to send receipts to all addresses found in the 'To:'" $echo "header, which comes dangerously close to a loop condition." $echo " " $echo "[message follows]" $echo " "; cat $tmprequest)\ | $SENDMAIL $sendmailOPT $sender shift ;; esac -----cut here---end rejectmsg script -----cut here---start quotereject script #! /bin/ksh : test=test # /bin/test echo=echo # /bin/echo cat=cat # /bin/cat sed=sed # /bin/sed grep=grep # /bin/grep date=date # /bin/date formail=formail # /usr/local/bin/formail multigram=multigram # ../.bin/multigram $test -z "$listaddr" && $echo "Don't start this script directly, it is used in rc.local.s00" && exit 64 tmprequest=tmp.request tmpfrom=tmp.from function=$1 $cat > $tmprequest sender=`$formail -rtzxTo: < $tmprequest` case $function in -attach) ($formail -i"From: $listreq" -rtA"X-Loop: $listaddr" < $tmprequest ;\ $echo "Your mail to the mailinglist has been intercepted and" $echo "is being returned to you because it it appears to the list server" $echo "to contain an excessive amount of quoted material." $echo "Brief quoting is fine, but please quote only for context." $echo "Do not quote other messages in their entirety, or quote" $echo "message headers or signature files. " $echo " " $echo "...excessive quoting is a waste of resources." $echo "If you feel that you've edited your message adequately but" $echo "it was still returned to you, you can appeal to the administator," $echo "rob@alegria.com" $echo " " $echo "[message follows]" $echo " "; cat $tmprequest)\ | $SENDMAIL $sendmailOPT $sender shift ;; esac -----cut here-----end quotereject script -- Rob Lingelbach | 2660 Hollyridge Dr., Los Angeles, CA 90068 rob@alegria.com |"I care not much for a man's religion whose dog or rob@info.com | cat is not the better for it." --Abraham Lincoln rob@tele.com KB6CUN http://www.alegria.com
participants (1)
-
David Kelly