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