qmail-smtpd: Read list of hosts allowed to relay from control/relayhosts
[qmail] / qmail-smtpd.8
CommitLineData
2117e02e
MW
1.TH qmail-smtpd 8
2.SH NAME
3qmail-smtpd \- receive mail via SMTP
4.SH SYNOPSIS
5.B qmail-smtpd
6.SH DESCRIPTION
7.B qmail-smtpd
8receives mail messages via the Simple Mail Transfer Protocol (SMTP)
9and invokes
10.B qmail-queue
11to deposit them into the outgoing queue.
12.B qmail-smtpd
13must be supplied several environment variables;
14see
15.BR tcp-environ(5) .
16
17.B qmail-smtpd
18is responsible for counting hops.
19It rejects any message with 100 or more
20.B Received
21or
22.B Delivered-To
23header fields.
24
25.B qmail-smtpd
26supports ESMTP, including the 8BITMIME and PIPELINING options.
27.SH TRANSPARENCY
28.B qmail-smtpd
29converts the SMTP newline convention into the UNIX newline convention
30by converting CR LF into LF.
31
32.B qmail-smtpd
33accepts messages that contain long lines or non-ASCII characters,
34even though such messages violate the SMTP protocol.
35.SH "CONTROL FILES"
36.TP 5
37.I badmailfrom
38Unacceptable envelope sender addresses.
39.B qmail-smtpd
40will reject every recipient address for a message
41if the envelope sender address is listed in
42.IR badmailfrom .
43A line in
44.I badmailfrom
45may be of the form
46.BR @\fIhost ,
47meaning every address at
48.IR host .
49.TP 5
50.I localiphost
51Replacement host name for local IP addresses.
52Default:
53.IR me ,
54if that is supplied.
55.B qmail-smtpd
56is responsible for recognizing dotted-decimal addresses for the
57current host.
58When it sees a recipient address of the form
59.IR box@[d.d.d.d] ,
60where
61.I d.d.d.d
62is a local IP address,
63it replaces
64.IR [d.d.d.d]
65with
66.IR localiphost .
67This is done before
68.IR rcpthosts .
69.TP 5
70.I rcpthosts
71Allowed RCPT domains.
72If
73.I rcpthosts
74is supplied,
75.B qmail-smtpd
76will reject
77any envelope recipient address with a domain not listed in
10649f16
MW
78.I rcpthosts
79unless the sending host is a designated relay client (see the
80description of the
81.I relayhosts
82file beow).
2117e02e
MW
83
84.I rcpthosts
85may include wildcards:
86
87.EX
88 heaven.af.mil
89 .heaven.af.mil
90.EE
91
92Envelope recipient addresses without @ signs are
93always allowed through.
94.TP 5
10649f16
MW
95.I relayhosts
96Allowed relay clients. Each line is a host-suffix pair, separated by a
97colon. If the client's hostname matches one of the hostnames in the
98file, that client is permitted to send mail to any host (i.e., to use us
99as a relay), and the corresponding suffix is appended to all recipient
100addresses generated by the client.
101
102.I relayhosts
103may include wildcards:
104
105.EX
106 heaven.af.mil:
107 .heaven.af.mil:
108 hell.irs.gov:.irs.virtdomain
109.EE
110
111For historical reasons, the
112.B RELAYCLIENT
113environment variable overrides this table. If
114.B RELAYCLIENT
115is set, it has the same effect as there being a matching entry in the
116.I relayhosts
117file, using the value of
118.B RELAYCLIENT
119as the suffix.
120.TP 5
2117e02e
MW
121.I smtpgreeting
122SMTP greeting message.
123Default:
124.IR me ,
125if that is supplied;
126otherwise
127.B qmail-smtpd
128will refuse to run.
129The first word of
130.I smtpgreeting
131should be the current host's name.
132.TP 5
133.I timeoutsmtpd
134Number of seconds
135.B qmail-smtpd
136will wait for each new buffer of data from the remote SMTP client.
137Default: 1200.
138.SH "SEE ALSO"
139tcp-env(1),
140tcp-environ(5),
141qmail-control(5),
142qmail-inject(8),
143qmail-queue(8),
144qmail-remote(8)