man signoff (Commandes) - See if a message is a subscription request

NAME

signoff - See if a message is a subscription request

SYNOPSIS

signoff [ message_file ]

DESCRIPTION

Signoff is a small hack used to see if a mail message is one of those annoying ``please add me'' or ``please drop me from your list'' messages. Such messages should be sent to a list maintainer, but often people make mistakes and send them to the entire list. This behavior is particularly impolite when a message is gatewayed into a Usenet newsgroup.

When invoked as a front-end to mail2news, signoff does a pretty good job of trapping such messages before they get posted. Signoff reads the message from the file named in its first argument, or from standard input if no arguments are given. It exits with a successful (zero) status if the message is a normal one, or does an ``exit(1)'' if the message is a subscription request. For example, here is a script that could be used as a wrapper around the news2mail program:

#! /bin/sh
cat >/tmp/signoff$$
if /usr/bin/signoff </tmp/signoff$$ ; then
    /usr/bin/Mail -s "Rejected subscription request" news </tmp/signoff$$
else
    /usr/bin/mail2news </tmp/signoff$$
fi
exec rm /tmp/signoff$$

Note that signoff is already incorporated into mail2news; see the ``-F'' option. It is provided here as a separate program for more conservative use. (The ``-F'' doesn't send rejected messages to the news account for verification.) Also, with the following line in your news sys file:

signoff:all::/usr/local/bin/test_signoff
and the following script:
#! /bin/sh
cat >/tmp/ts$$
/usr/bin/signoff </tmp/ts$$ || Mail -s "Signoff found" news </tmp/ts$$
exec rm /tmp/ts$$
it is possible to test the ``algorithm'' used by signoff.

BUGS

Perhaps a better way to test is to make the test less conservative, and see what valid articles get caught, and make adjustments then? Comments on the program are solicited.

AUTHORS

Rich $alz <rsalz@bbn.com>, after a program by

Russ Nelson <nelson@clutx.clarkson.edu>.