File: signoff.1

package info (click to toggle)
newsgate 1.6-9
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 332 kB
  • ctags: 310
  • sloc: ansic: 2,683; yacc: 499; sh: 278; lex: 183; perl: 151; makefile: 113
file content (77 lines) | stat: -rw-r--r-- 2,201 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.\" $Header: /nfs/papaya/u2/rsalz/src/newsgate/RCS/signoff.1,v 1.3 91/02/12 14:54:40 rsalz Exp Locker: rsalz $
.TH SIGNOFF 1 LOCAL
.SH NAME
signoff \- See if a message is a subscription request
.SH SYNOPSIS
.B signoff
[
.I message_file
]
.SH DESCRIPTION
.PP
.I 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.
.PP
When invoked as a front-end to
.IR mail2news ,
.I signoff
does a pretty good job of trapping such messages before they get posted.
.I 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
.I news2mail
program:
.RS
.nf
#! /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$$
.fi
.RE
.PP
Note that
.I signoff
is already incorporated into
.IR 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:
.RS
.nf
signoff:all::/usr/local/bin/test_signoff
.fi
.RE
and the following script:
.RS
.nf
#! /bin/sh
cat >/tmp/ts$$
/usr/bin/signoff </tmp/ts$$ || Mail -s "Signoff found" news </tmp/ts$$
exec rm /tmp/ts$$
.fi
.RE
it is possible to test the ``algorithm'' used by
.IR signoff .
.SH 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.
.SH AUTHORS
Rich $alz <rsalz@bbn.com>, after a program by
.br
Russ Nelson <nelson@clutx.clarkson.edu>.