chiark / gitweb /
debian: New, stripped-down mini-qmail package.
[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.
212b6f5d
MW
31It returns a temporary error and drops the connection on bare LFs;
32see
33.BR http://pobox.com/~djb/docs/smtplf.html .
2117e02e
MW
34
35.B qmail-smtpd
36accepts messages that contain long lines or non-ASCII characters,
37even though such messages violate the SMTP protocol.
38.SH "CONTROL FILES"
39.TP 5
40.I badmailfrom
41Unacceptable envelope sender addresses.
42.B qmail-smtpd
43will reject every recipient address for a message
44if the envelope sender address is listed in
45.IR badmailfrom .
46A line in
47.I badmailfrom
48may be of the form
49.BR @\fIhost ,
50meaning every address at
51.IR host .
52.TP 5
212b6f5d
MW
53.I databytes
54Maximum number of bytes allowed in a message,
55or 0 for no limit.
56Default: 0.
57If a message exceeds this limit,
58.B qmail-smtpd
59returns a permanent error code to the client;
60in contrast, if
61the disk is full or
62.B qmail-smtpd
63hits a resource limit,
64.B qmail-smtpd
65returns a temporary error code.
66
67.I databytes
68counts bytes as stored on disk, not as transmitted through the network.
69It does not count the
70.B qmail-smtpd
71Received line, the
72.B qmail-queue
73Received line, or the envelope.
74
75If the environment variable
76.B DATABYTES
77is set, it overrides
78.IR databytes .
79.TP 5
2117e02e
MW
80.I localiphost
81Replacement host name for local IP addresses.
82Default:
83.IR me ,
84if that is supplied.
85.B qmail-smtpd
86is responsible for recognizing dotted-decimal addresses for the
87current host.
88When it sees a recipient address of the form
89.IR box@[d.d.d.d] ,
90where
91.I d.d.d.d
92is a local IP address,
93it replaces
94.IR [d.d.d.d]
95with
96.IR localiphost .
97This is done before
98.IR rcpthosts .
99.TP 5
212b6f5d
MW
100.I morercpthosts
101Extra allowed RCPT domains.
102If
103.I rcpthosts
104and
105.I morercpthosts
106both exist,
107.I morercpthosts
108is effectively appended to
109.IR rcpthosts .
110
111You must run
112.B qmail-newmrh
113whenever
114.I morercpthosts
115changes.
116
117Rule of thumb for large sites:
118Put your 50 most commonly used domains into
119.IR rcpthosts ,
120and the rest into
121.IR morercpthosts .
122.TP 5
2117e02e
MW
123.I rcpthosts
124Allowed RCPT domains.
125If
126.I rcpthosts
127is supplied,
128.B qmail-smtpd
129will reject
130any envelope recipient address with a domain not listed in
10649f16
MW
131.I rcpthosts
132unless the sending host is a designated relay client (see the
133description of the
134.I relayhosts
135file beow).
2117e02e
MW
136
137.I rcpthosts
138may include wildcards:
139
140.EX
141 heaven.af.mil
142 .heaven.af.mil
143.EE
144
145Envelope recipient addresses without @ signs are
146always allowed through.
147.TP 5
10649f16
MW
148.I relayhosts
149Allowed relay clients. Each line is a host-suffix pair, separated by a
150colon. If the client's hostname matches one of the hostnames in the
151file, that client is permitted to send mail to any host (i.e., to use us
152as a relay), and the corresponding suffix is appended to all recipient
153addresses generated by the client.
154
155.I relayhosts
156may include wildcards:
157
158.EX
159 heaven.af.mil:
160 .heaven.af.mil:
161 hell.irs.gov:.irs.virtdomain
162.EE
163
164For historical reasons, the
165.B RELAYCLIENT
166environment variable overrides this table. If
167.B RELAYCLIENT
168is set, it has the same effect as there being a matching entry in the
169.I relayhosts
170file, using the value of
171.B RELAYCLIENT
172as the suffix.
173.TP 5
2117e02e
MW
174.I smtpgreeting
175SMTP greeting message.
176Default:
177.IR me ,
178if that is supplied;
179otherwise
180.B qmail-smtpd
181will refuse to run.
182The first word of
183.I smtpgreeting
184should be the current host's name.
185.TP 5
186.I timeoutsmtpd
187Number of seconds
188.B qmail-smtpd
189will wait for each new buffer of data from the remote SMTP client.
190Default: 1200.
191.SH "SEE ALSO"
192tcp-env(1),
193tcp-environ(5),
194qmail-control(5),
195qmail-inject(8),
212b6f5d 196qmail-newmrh(8),
2117e02e
MW
197qmail-queue(8),
198qmail-remote(8)