chiark / gitweb /
Upstream qmail 1.03
[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
131.IR rcpthosts .
132
133Exception:
134If the environment variable
135.B RELAYCLIENT
136is set,
137.B qmail-smtpd
138will ignore
139.IR rcpthosts ,
140and will append the value of
141.B RELAYCLIENT
142to each incoming recipient address.
143
144.I rcpthosts
145may include wildcards:
146
147.EX
148 heaven.af.mil
149 .heaven.af.mil
150.EE
151
152Envelope recipient addresses without @ signs are
153always allowed through.
154.TP 5
155.I smtpgreeting
156SMTP greeting message.
157Default:
158.IR me ,
159if that is supplied;
160otherwise
161.B qmail-smtpd
162will refuse to run.
163The first word of
164.I smtpgreeting
165should be the current host's name.
166.TP 5
167.I timeoutsmtpd
168Number of seconds
169.B qmail-smtpd
170will wait for each new buffer of data from the remote SMTP client.
171Default: 1200.
172.SH "SEE ALSO"
173tcp-env(1),
174tcp-environ(5),
175qmail-control(5),
176qmail-inject(8),
212b6f5d 177qmail-newmrh(8),
2117e02e
MW
178qmail-queue(8),
179qmail-remote(8)