9fans archive / 2001 / 11 / 727 / prev next
From: "Boyd Roberts" <boyd@fr.inter.net>
Subject: Re: [9fans] Python filesystem
Date: Thu, 29 Nov 2001 08:10:43 +0100
> whats hellish about MH?
There is a fundemental design flaw in 'comp'. When you quit the
editor it says (IIRC):
What now?
Well this is just no good. Composition and delivery should be
decoupled and you should be able to edit multiple messages at
once and deliver them at will.
This is what I mean:
#!/bin/sh
# dws [ box ] [ id ]
#
# die worthless spammer
myname="`basename \"$0\"`"
spam=+spam
case "`box`" in
$spam)
echo "$myname: Replying to a spam in \"$spam\"?" 1>&2
exit 1
;;
esac
case $# in
0|1|2)
mov ${1+"$@"} "$spam" || exit $?
;;
*)
echo "usage: $myname [ box ] [ id ]" 1>&2
exit 1
;;
esac
box="`box`"
box "$spam" || exit $?
# construct reply
(
EDITOR='sam -d' rep -i > /dev/null 2>&1 <<'!'
/^To:.*\n( .*\n)+/
x/\n /c/ /
/^To:.*\n/
.t.
x/[\-a-zA-Z0-9._&]+@/c/postmaster@/
/^To:.*\n/
/^To:.*\n/
s/^To:/Cc:/
,x/^Cc: \n/d
,x/^Bcc: \n/d
,x/^Subject: \n/d
1,/^\n/
a
die, worthless spammer.
postmaster: check out the Mail Abuse Protection System (MAPS)
http://maps.vix.com
.
1,/^$/p
w
q
!
# log reply and deliver
) || exit 1
case "$myname" in
dws)
echo "$myname: Spam returned to `msg | 822flatten | sed -e
^[TC][oc][ ]*:[ ]*/!d' -e 's///' | tr '\012' ' '`" 1>&2
del && box "$box"
;;
rws)
med
;;
esac
----
Unfortunately I just realised that I had broken the 'mace' bundle because
I put up the meta anti-spam RFC 822 header parser version that was still
in test. Unfortunately the Received: headers have a context sensitive
grammar which yacc is not quite up to.
My plan was to walk the Received: headers and automatically copy
abuse/postmaster
at all the sites the spam had passed through. When I have a spare
nanosecond
I will fix it, because I can't stand these broken GUI mailers. Yes, I will
have
to deal with MIME, but I can creep up on that with a tools approach.
Une chose à la fois.