Import ezmlm-idx 0.40
[ezmlm] / ezmlm-issubn.1
1 .TH ezmlm-issubn 1
2 .SH NAME
3 ezmlm-issubn \- test to see if an address is subscribed to a mailing list
4 .SH SYNOPSIS
5 .B ezmlm-issubn
6 [
7 .B \-nN
8 ]
9 .I dir
10 .I [ dir1 ... ]
11 .SH DESCRIPTION
12 .B ezmlm-issubn
13 checks to see if the address obtained from the environment variable
14 .I SENDER
15 is subscribed to the mailing list stored in
16 .I dir
17 or the mailing list in
18 .I dir1
19 or ...
20
21 If
22 .I SENDER
23 is not defined
24 .B ezmlm-issubn
25 exits with an error.
26
27 If
28 .I SENDER
29 is on [any of] the mailing list[s],
30 .B ezmlm-issubn
31 exits with a zero exit code.
32
33 If
34 .I box\fB@\fIdomain
35 is not on the mailing list,
36 .B ezmlm-issubn
37 exits 99. This exit code is non-success from a shell point of view, but to
38 qmail it means "success and skip remaining lines in the .qmail file). Thus,
39 a simple way to execute a delivery if the
40 .ezmlm-issubn
41 criteria are met is to place the
42 .B ezmlm-issubn
43 line first, followed by the action line. If SENDER is a subscriber, the
44 action line is executed, if not, the line is ignored without the generation
45 of an error condition. To generate a fatal error, just:
46
47 .EX
48 |/path/ezmlm-issubn
49 .I dir1 ...
50 || (echo "err msg"; exit 100)
51
52 |/path/action_for_subscribers
53 |/path/more_for_subscribers
54 .EE
55
56 .B ezmlm-issubn
57 exits 100 on permanent and 111 on temporary errors.
58 .SH OPTIONS
59 .TP
60 .B \-n
61 Negate exit code. Exit 99 if SENDER is a subscriber and exit 0 if not.
62 This is useful when trying to exclude SENDERs.
63 .TP
64 .B \-N
65 (Default.)
66 Normal exit codes: 0 is the address is in any of the lists, 99 if not.
67 .SH "SEE ALSO"
68 ezmlm-list(1),
69 ezmlm-manage(1),
70 ezmlm-make(1),
71 ezmlm-send(1),
72 ezmlm-sub(1),
73 ezmlm-unsub(1),
74 ezmlm(5)