A handy trn macro + a perl script
RFC 1036 demands that all followups must contain a valid
References header. If they don't, they break [s]trn's threading.
As more and more BBSes or other online services connect to Usenet,
I noticed that the number of non-conforming articles increased.
So I wrote a simple script to automate flaming the culprits.
If more people take interest in this, the peer pressure will ensure
that the offenders take steps to fix their software. So I make
my script available to everybody and encourage everybody to use it.
Installation
- The perl script
- Get the script and put it somewhere in
your path. Then please adapt the following:
- The first line. At my site perl is located at
/usr/local/bin/perl
. This may be different on your
computer.
- The location of the database file in which the scripts remembers
who already got a notification.
- The minimal time between two notifications to the same user.
- The mailer used. I use elm. Any other mailer who understands
-s "Subject"
can be used.
- The text of the message. Feel free to change it to fit your own taste,
but please don't forget to replace my name and signature.
- The trn macro
- Add the following line to your $HOME/.rnmac file.
(or whatever you use for $RNMACRO)
~C %(%m=[ap]?| complain.pl -to "%t"\n:)
Now pressing ~C will call the perl script. There is nothing
special about ~C, you can use any free key in the first column.
- The KILL-file entry
- If you're really pissed about some site spewing botched messages
into Usenet, place the follwing line into your (global) killfile:
/stupid.bbs.com/f:| complain.pl -to "%t"
- Two utilities
- These two short perl scripts help you maintaining the database on
who already got the notice and when the last one was sent to the
culprit.
off_list.pl
lists the database. off_set.pl
sets the entry for a specified user to the current time.
Feedback
I do not consider the script finished, it could do a much better
check for RFC 1036 conformance. (e.g. check for misconfigured From:
lines.) Anyway, I think it is useful in its current state.
If you modify it (encouraged), please send me a copy so
that I can integrate all patches for the next release.
I appreciate feedback, so please send your suggestion, criticism,
or comments to lendl@cosy.sbg.ac.at.
Share and Enjoy !
Otmar Lendl (lendl@cosy.sbg.ac.at)