Line 0
Link Here
|
|
|
1 |
.Dd April 26, 2014 |
2 |
.Dt GREYFIX 8 |
3 |
.Os |
4 |
.Sh NAME |
5 |
.Nm greyfix |
6 |
.Nd "A greylisting policy daemon for Postfix" |
7 |
.Sh SYNOPSIS |
8 |
.Nm |
9 |
.Op Fl Vvd |
10 |
.Op Fl h Ar home_directory |
11 |
.Op Fl g Ar delay_period |
12 |
.Op Fl b Ar bloc_idle_period |
13 |
.Op Fl p Ar pass_period |
14 |
.Op Fl r Ar reject_action |
15 |
.Op Fl G Ar greylist_action |
16 |
.Op Fl / Ar prefix_size |
17 |
.Op Fl 6 Ar prefix_size |
18 |
.Op Fl -dump-triplets |
19 |
.Op Fl -help |
20 |
.Sh DESCRIPTION |
21 |
.Nm |
22 |
is a efficient greylisting policy daemon for Postfix. |
23 |
.Pp |
24 |
The options are: |
25 |
.Bl -tag -width indent |
26 |
.It Fl V , Fl -version |
27 |
Show version information. |
28 |
.It Fl v , Fl -verbose |
29 |
Verbose logging. |
30 |
.It Fl d , Fl -debug |
31 |
Debug logging. |
32 |
.It Fl -help |
33 |
Show usage information. |
34 |
.It Fl -dump-triplets |
35 |
Dump the triplets database to stdout. Mostly for debugging purposes. |
36 |
.It Fl b Ar seconds , Fl -bloc-max-idle Ar seconds |
37 |
How many seconds of life are given to a record that is created from a new mail |
38 |
.Em ( ip , from , to ) |
39 |
triplet. Note that the window created by this setting for passing mails is |
40 |
reduced by the amount set for |
41 |
.Fl -greylist-delay . |
42 |
Also see |
43 |
.Fl -pass-max-idle . |
44 |
Defaults to 18000. |
45 |
.It Fl g Ar seconds , Fl -greylist-delay Ar seconds |
46 |
How many seconds we will block inbound mail that is from a previously unknown |
47 |
.Em ( ip , from , to ) |
48 |
triplet. If it is set to zero, incoming mail association will be learned, but |
49 |
no deliveries will be tempfailed. Use a setting of zero with caution, as it |
50 |
will learn spammers as well as legitimate senders. Defaults to 3480. |
51 |
.It Fl h Ar home_directory , Fl -home Ar home_directory |
52 |
Location of the Berkeley DB environment home location. Defaults to |
53 |
.Pa /var/db/greyfix . |
54 |
.It Fl p Ar seconds , Fl -pass-max-idle Ar seconds |
55 |
How long to give to a record we are updating from an allowed (passed) email. |
56 |
.Pp |
57 |
The default is 3110400, which should be enough to handle messages that may only |
58 |
be sent once a month, or on things like the first monday of the month (which |
59 |
sometimes means 5 weeks). Plus, we add a day for a delivery buffer. |
60 |
.It Fl r Ar action , Fl -reject-action Ar action |
61 |
The reject action directive that will be used. See |
62 |
.Xr access 5 |
63 |
for valid actions. The placeholder |
64 |
.Em %d |
65 |
expand to the number of seconds, |
66 |
.Em %p |
67 |
to the empty string if |
68 |
.Em %d |
69 |
expands to 1 or |
70 |
.Dq s |
71 |
otherwise, |
72 |
.Em %s |
73 |
to a single space, and |
74 |
.Em %% |
75 |
to |
76 |
.Dq % . |
77 |
.Pp |
78 |
The default is |
79 |
.Dq DEFER_IF_PERMIT Greylisted by greyfix 0.4.0, try again in %d second%p. See http://www.kim-minh.com/pub/greyfix/ for more information. |
80 |
.It Fl G Ar action , Fl -greylisted-action Ar action |
81 |
The action that will be used the first time a triplet passes greylisting. Same |
82 |
expansion as for |
83 |
.Fl -reject-action . |
84 |
.Pp |
85 |
The default is |
86 |
.Dq PREPEND X-Greyfix: Greylisted by greyfix 0.4.0 for %d second%p. See http://www.kim-minh.com/pub/greyfix/ for more information. |
87 |
.It Fl / Ar prefix_size , Fl -network-prefix Ar prefix_size |
88 |
Only consider the first |
89 |
.Ar prefix_size |
90 |
bits of an IPv4 address. Defaults to 32, i.e., the whole address is |
91 |
significant. |
92 |
.It Fl 6 Ar prefix_size , Fl -network6-prefix Ar prefix_size |
93 |
Only consider the first |
94 |
.Ar prefix_size |
95 |
bits of an IPv6 address. Defaults to 128, i.e., the whole address is |
96 |
significant. |
97 |
.El |
98 |
.Sh USAGE |
99 |
Edit Postfix's master configuration file, |
100 |
.Pa /usr/local/etc/postfix/master.cf , |
101 |
and add the following: |
102 |
.Bd -literal |
103 |
greyfix unix - n n - - spawn |
104 |
user=nobody argv=/usr/local/sbin/greyfix -/ 24 -6 56 |
105 |
.Ed |
106 |
.Pp |
107 |
Edit Postfix's main configuration file, |
108 |
.Pa /etc/postfix/main.cf , |
109 |
and add the following: |
110 |
.Bd -literal |
111 |
smtpd_recipient_restrictions = |
112 |
permit_mynetworks, |
113 |
reject_unauth_destination, |
114 |
check_policy_service unix:private/greyfix |
115 |
.Ed |
116 |
.Pp |
117 |
If there is already an |
118 |
.Em smtpd_recipient_restrictions |
119 |
configuration line, you should edit it rather than add a new one. The |
120 |
important part for Greyfix is that you should add |
121 |
.Em check_policy_service unix:private/greyfix |
122 |
to it. Finally, have Postfix reload its configuration with |
123 |
.Ic "postfix reload" . |
124 |
.Sh NOTES |
125 |
.Ss Logs |
126 |
Greyfix logs to |
127 |
.Xr syslog 3 |
128 |
with the |
129 |
.Li LOG_MAIL |
130 |
facility. As such, the log messages should appear along Postfix's. |
131 |
.Sh ALSO SEE |
132 |
.Xr access 5 |
133 |
.Sh AUTHORS |
134 |
.Nm |
135 |
was written by |
136 |
.An Kim Minh Kaplan |
137 |
.Aq http://www.kim-minh.com/ . |