summaryrefslogtreecommitdiff
path: root/sqmail-4.3.07/man/qmail-postgrey.8
blob: b2532cea6d7861c558df09b3937105ca12628add (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
.TH s/qmail: qmail-postgrey 8
.SH NAME
qmail-postgrey \- send SMTP connection data to greylisting server
.SH SYNOPSIS
.B qmail-postgrey ip%netid;port Mail From: Rcpt To: TCPREMOTEIP TCPREMOTEHOST
.SH DESCRIPTION
.B qmail-postgrey
is usually invoked by
.B qmail-smtpd
automatically provissioning the SMTP connection information
.IR Mail\ From: ,
.IR Rcpt\ To: ,
.IR TCPREMOTEIP 
and
.I TCPREMOTEHOST
to a greylising server given by
.IR IPv4|IPv6%netid;port .
.I port
defaults to 
.I 60000
and thus can be omitted. 
IPv6 LLU addresses can be specified
adding the 
.I netid 
name following the percentage sign.
.SH "GREYLISTING SERVER"
Since there is neither a formal API defined for the
greylisting lookup nor for the behavior and return
codes of the greylisting server, 
.B qmail-postgrey
only works well with
.I David\ Schweikert's
.B postgrey
implementation.

Here, the server's response upon recognizing the triple
.RI CLIENT_IP ,
.I (SMTP\ envelope)\ SENDER
and 
.I (SMTP\ envelope)\ RECIPIENT
is either
.IR action=DUNNO ,
.I action=PREPEND
or
.I action=DEFER_IF_PERMIT
and in case of the last,
.B qmail-postgrey
returns with
.I 10
telling 
.B qmail-smtpd
to respond to the client with a SMTP
.I 450\ greylisted
reply code. Otherwise
.B qmail-postgrey
returns
.IR 0 .
.SH "INVOCATION"
Unlike for testing reasons,
.B qmail-postgrey
is called directly from 
.B qmail-smtpd
in case the environment variable
.I POSTGREY
is defined and provissioned with the greylisting 
server's IP address (and perhaps netid and port)
listening there.

The environment variable
.I POSTGREY
is typically defined within
.B sslserver\'s
.IR cdb .
Additionally, 
.I REPLY_GREYLISTED
can be used as environment variable 
to provide some more descriptive
information to the sending MTA which will eventually
be visible in a bounce message. 
.SH "CREDITS"
.B qmail-postgrey 
and its integration into 
.B qmail-smtpd
is based on 
.I Jan\ Mojzis
implementation and used by permission.
.SH "SEE ALSO"
qmail-control(5),
qmail-smtpd(8),
https://postgrey.schweikert.ch