1
1
.\" Simple greylisting system for mail transport agents
2
.TH "greylist" "1" "0.5" "Tor Slettnes" "Mail Administration"
2
.TH "greylist" "1" "0.8" "Tor Slettnes" "Mail Administration"
4
4
greylist \- command line interface to \fBgreylistd(8)\fP
6
.BR "/usr/bin/greylist " { " -h " | " --help " | " help " }
6
.BR "greylist " { " -h " | " --help " | " help " }
8
.B "/usr/bin/greylist "
11
11
This program provides a command line interface to \fBgreylistd\fP(8);
12
please refer to that manual page for more information, including a
13
discussion on incorporate greylisting into a mail transport agent
14
(MTA) such as Exim 4, and the meaning of the word "\fItriplet\fP".
12
please refer to that manual page for more information on the purpose
13
and functionality of this program.
18
In the following discussion, \fIdata...\fP typically refers to a
19
the following \fItriplet\fP:
17
In the following discussion, \fIdata...\fP typically refers to
18
the following \fItriplet\fP of information:
21
\fIsender.host.address sender@email.address recipient@email.address\fP
20
\fI<sending host's IP address> <sender@address> <recipient@address>\fP
23
22
The following operations are available:
24
.IP "\fBadd\fP [ \fBwhite\fP | \fBgrey\fP | \fBblack\fP ] \fIdata...\fP"
25
Add \fIdata\fP to the corresponding list. If the \fItriplet\fP of a
26
future mail deliveriy (subject to timeouts) matches this data, the
27
idea is that the message would be accepted, temporarily rejected, or
28
permanently rejected, respectively.
23
.IP "\fBadd\fP [\fB--white\fP|\fB--grey\fP|\fB--black\fP] \fIdata...\fP"
24
Add \fIdata\fP to the corresponding list (\fBwhite\fP if unspecified).
25
If the \fItriplet\fP of a future mail deliveriy (subject to timeouts)
26
matches this data, the idea is that the message would be accepted,
27
temporarily rejected, or permanently rejected, respectively.
29
28
.IP "\fBdelete\fP \fIdata...\fP"
30
29
Remove \fIdata\fP from all lists. If the data exists in any list, the
31
30
command returns an exit status of 0, otherwise -1. A message is
32
31
printed on standard output indicating the action taken.
33
.IP "\fBcheck\fP \fIdata...\fP"
32
.IP "\fBcheck\fP [\fB--white\fP|\fB--grey\fP|\fB--black\fP] \fIdata...\fP"
34
33
Check the current status of \fIdata\fP, i.e. if a message delivery
35
would succeed if its \fItriplet\fP matched this data. One of the
36
words "white", "grey", and "blacK" is written on standard output, and
37
the exit status is 0, 1, or 2, respectively.
34
would succeed if its \fItriplet\fP matched this data. If a list is
35
specified, the word "true" or "false" is printed, indicating whether
36
the data was in the corresponding list; the exit status is also set
37
accordingly. Otherwise, one of the words "white", "grey", and "black"
38
is written on standard output, and the exit status is 0, 1, or 2,
39
41
NOTE: This operation is non-intrusive, and thus does not update any of
40
42
the greylist data. So, for instance, if the \fIdata\fP is currently
42
44
elapsed, the text "white" would be printed. However, unless an
43
45
\fBupdate\fP takes place prior to the \fBretryMax\fP timeout, the
44
46
\fIdata\fP would still expire from the "grey" list.
46
.IP "\fBupdate\fP \fIdata...\fP"
47
.IP "\fBupdate\fP [\fB--white\fP|\fB--grey\fP|\fB--black\fP] \fIdata...\fP"
47
48
Same, but also update the greylist data accordingly. So if \fIdata\fP
48
49
is currently greylisted, but the minimum retry time \fBretryMin\fP has
49
50
elapsed since it was first seen, \fIdata\fP is moved to the "white"
52
53
This operation would normally be used by mail transport agents (MTAs).
53
.IP "\fBstats\fP [ \fIdata...\fP ]"
54
Print some statistics on greylist utilization and hits. If no
55
\fIdata\fP is specified, list general hit statistics, otherwise show
56
statistics pertaining to the particular data.
59
Clear all data and statistics. This means that \fIall\fP new requests
60
will initially receive a "grey" response.
55
Print some statistics on greylist utilization and hits.
56
.IP "\fBlist\fP [\fB--white\fP] [\fB--grey\fP] [\fB--black\fP]"
57
Print available (original/unhashed) data items from the corresponding
60
NOTE: Internally, \fBgreylistd\fP(8) hashes the provided data into a
61
single 32-bit value for efficiency. Prior to version 0.6, the
62
original data was not retained; as of version 0.6, data is saved if
63
the "savetriplets" setting in the [data] section of the configuration
64
file is "true". Only data items (i.e. triplets) that have been seen
65
while this setting were enabled can be listed.
67
Force greylist data to be immediately saved (synchronized) to the
70
Data is also saved after any operation if a certain \fIupdate
71
interval\fP (default is 300 seconds/5 minutes) has elapsed since the
72
last save, and there are no pending requests to \fBgreylistd\fP(8).
75
Save greylist data to files, then reload configuration and data.
77
.IP "\fBclear\fP [\fB--white\fP] [\fB--grey\fP] [\fB--black\fP]"
78
Clear all items in the specified list(s), or all lists if none is
81
If the whitelist is cleared, \fIall\fP new data trilplets will
82
initially be in a "grey" state.
64
.IP "greylist add 1.2.3.4 mailinglist@somewhere subscriber@yourhost"
65
Whitelists messages sent from <mailinglist@somewhere> to
66
<subscriber@yourhost> via list.server.
86
.IP "greylist add --white 1.2.3.4 mailinglist@somewhere subscriber@yourhost"
87
Whitelists messages received from the IP address 1.2.3.4 on behalf of
88
<mailinglist@somewhere> to <subscriber@yourhost>.
89
.IP "greylist check --grey 1.2.3.4 mailinglist@somewhere subscriber@yourhost"
90
Prints "true" or "false" on standard output, depending on whether mail
91
received from the IP address 1.2.3.4 on behalf of
92
<mailinglist@somewhere> to <subscriber@yourhost> should be deferred or
93
not, respectively. The data is neither recorded nor changed to a
68
96
.SS "/var/run/greylistd/socket"
69
97
The UNIX domain socket providing the main interface to "greylistd".