Debianization for 1.03-1
[qmail] / qmail-smtpd.8
1 .TH qmail-smtpd 8
2 .SH NAME
3 qmail-smtpd \- receive mail via SMTP
4 .SH SYNOPSIS
5 .B qmail-smtpd
6 .SH DESCRIPTION
7 .B qmail-smtpd
8 receives mail messages via the Simple Mail Transfer Protocol (SMTP)
9 and invokes
10 .B qmail-queue
11 to deposit them into the outgoing queue.
12 .B qmail-smtpd
13 must be supplied several environment variables;
14 see
15 .BR tcp-environ(5) .
16
17 .B qmail-smtpd
18 is responsible for counting hops.
19 It rejects any message with 100 or more
20 .B Received
21 or
22 .B Delivered-To
23 header fields.
24
25 .B qmail-smtpd
26 supports ESMTP, including the 8BITMIME and PIPELINING options.
27 .SH TRANSPARENCY
28 .B qmail-smtpd
29 converts the SMTP newline convention into the UNIX newline convention
30 by converting CR LF into LF.
31 It returns a temporary error and drops the connection on bare LFs;
32 see
33 .BR http://pobox.com/~djb/docs/smtplf.html .
34
35 .B qmail-smtpd
36 accepts messages that contain long lines or non-ASCII characters,
37 even though such messages violate the SMTP protocol.
38 .SH "CONTROL FILES"
39 .TP 5
40 .I badmailfrom
41 Unacceptable envelope sender addresses.
42 .B qmail-smtpd
43 will reject every recipient address for a message
44 if the envelope sender address is listed in
45 .IR badmailfrom .
46 A line in
47 .I badmailfrom
48 may be of the form
49 .BR @\fIhost ,
50 meaning every address at
51 .IR host .
52 .TP 5
53 .I databytes
54 Maximum number of bytes allowed in a message,
55 or 0 for no limit.
56 Default: 0.
57 If a message exceeds this limit,
58 .B qmail-smtpd
59 returns a permanent error code to the client;
60 in contrast, if
61 the disk is full or
62 .B qmail-smtpd
63 hits a resource limit,
64 .B qmail-smtpd
65 returns a temporary error code.
66
67 .I databytes
68 counts bytes as stored on disk, not as transmitted through the network.
69 It does not count the
70 .B qmail-smtpd
71 Received line, the
72 .B qmail-queue
73 Received line, or the envelope.
74
75 If the environment variable
76 .B DATABYTES
77 is set, it overrides
78 .IR databytes .
79 .TP 5
80 .I localiphost
81 Replacement host name for local IP addresses.
82 Default:
83 .IR me ,
84 if that is supplied.
85 .B qmail-smtpd
86 is responsible for recognizing dotted-decimal addresses for the
87 current host.
88 When it sees a recipient address of the form
89 .IR box@[d.d.d.d] ,
90 where
91 .I d.d.d.d
92 is a local IP address,
93 it replaces
94 .IR [d.d.d.d]
95 with
96 .IR localiphost .
97 This is done before
98 .IR rcpthosts .
99 .TP 5
100 .I morercpthosts
101 Extra allowed RCPT domains.
102 If
103 .I rcpthosts
104 and
105 .I morercpthosts
106 both exist,
107 .I morercpthosts
108 is effectively appended to
109 .IR rcpthosts .
110
111 You must run
112 .B qmail-newmrh
113 whenever
114 .I morercpthosts
115 changes.
116
117 Rule of thumb for large sites:
118 Put your 50 most commonly used domains into
119 .IR rcpthosts ,
120 and the rest into
121 .IR morercpthosts .
122 .TP 5
123 .I rcpthosts
124 Allowed RCPT domains.
125 If
126 .I rcpthosts
127 is supplied,
128 .B qmail-smtpd
129 will reject
130 any envelope recipient address with a domain not listed in
131 .IR rcpthosts .
132
133 Exception:
134 If the environment variable
135 .B RELAYCLIENT
136 is set,
137 .B qmail-smtpd
138 will ignore
139 .IR rcpthosts ,
140 and will append the value of
141 .B RELAYCLIENT
142 to each incoming recipient address.
143
144 .I rcpthosts
145 may include wildcards:
146
147 .EX
148 heaven.af.mil
149 .heaven.af.mil
150 .EE
151
152 Envelope recipient addresses without @ signs are
153 always allowed through.
154 .TP 5
155 .I smtpgreeting
156 SMTP greeting message.
157 Default:
158 .IR me ,
159 if that is supplied;
160 otherwise
161 .B qmail-smtpd
162 will refuse to run.
163 The first word of
164 .I smtpgreeting
165 should be the current host's name.
166 .TP 5
167 .I timeoutsmtpd
168 Number of seconds
169 .B qmail-smtpd
170 will wait for each new buffer of data from the remote SMTP client.
171 Default: 1200.
172 .SH "SEE ALSO"
173 tcp-env(1),
174 tcp-environ(5),
175 qmail-control(5),
176 qmail-inject(8),
177 qmail-newmrh(8),
178 qmail-queue(8),
179 qmail-remote(8)