Upstream qmail 1.01
[qmail] / qmail-send.9
1 .TH qmail-send 8
2 .SH NAME
3 qmail-send \- deliver mail messages from the queue
4 .SH SYNOPSIS
5 .B qmail-send
6 .SH DESCRIPTION
7 .B qmail-send
8 handles messages placed into the outgoing queue by
9 .BR qmail-queue .
10 It uses
11 .B qmail-lspawn
12 to deliver messages to local recipients and
13 .B qmail-rspawn
14 to deliver messages to remote recipients.
15 If a message is temporarily undeliverable to one or more addresses,
16 .B qmail-send
17 leaves it in the queue and tries the addresses again later.
18
19 .B qmail-send
20 prints a readable record of its activities to descriptor 0.
21 It writes commands to
22 .BR qmail-lspawn ,
23 .BR qmail-rspawn ,
24 and
25 .B qmail-clean
26 on descriptors 1, 3, and 5,
27 and reads responses from descriptors 2, 4, and 6.
28 .B qmail-send
29 is responsible for avoiding deadlock.
30
31 If
32 .B qmail-send
33 receives a TERM signal,
34 it will exit cleanly, after waiting
35 (possibly more than a minute)
36 for current delivery attempts to finish.
37
38 If
39 .B qmail-send
40 receives an ALRM signal,
41 it will reschedule every message in the queue for immediate delivery.
42 .SH "CONTROL FILES"
43 .B WARNING:
44 .B qmail-send
45 reads its control files only when it starts.
46 If you change the control files,
47 you must stop and restart
48 .BR qmail-send .
49 Exception:
50 If
51 .B qmail-send
52 receives a HUP signal,
53 it will reread
54 .I locals
55 and
56 .IR virtualdomains .
57 .TP 5
58 .I bouncefrom
59 Bounce username.
60 Default:
61 .BR MAILER-DAEMON .
62 .TP 5
63 .I bouncehost
64 Bounce host.
65 Default:
66 .IR me ,
67 if that is supplied;
68 otherwise the literal name
69 .BR bouncehost ,
70 which is probably not what you want.
71 If a message is permanently undeliverable,
72 .B qmail-send
73 sends a
74 .B single-bounce
75 notice back to the message's envelope sender.
76 The notice is
77 .B From: \fIbouncefrom\fB@\fIbouncehost\fR,
78 although its envelope sender is empty.
79 .TP 5
80 .I concurrencylocal
81 Maximum number of simultaneous local delivery attempts.
82 Default: 10.
83 If 0, local deliveries will be put on hold.
84 .I concurrencylocal
85 is limited at compile time to
86 SPAWN.
87 .TP 5
88 .I concurrencyremote
89 Maximum number of simultaneous remote delivery attempts.
90 Default: 20.
91 If 0, remote deliveries will be put on hold.
92 .I concurrencyremote
93 is limited at compile time to
94 SPAWN.
95 .TP 5
96 .I doublebouncehost
97 Double-bounce host.
98 Default:
99 .IR me ,
100 if that is supplied;
101 otherwise the literal name
102 .BR doublebouncehost ,
103 which is probably not what you want.
104 .TP 5
105 .I doublebounceto
106 User to receive double-bounces.
107 Default:
108 .BR postmaster .
109 If a single-bounce notice is permanently undeliverable,
110 .B qmail-send
111 sends a
112 .B double-bounce
113 notice to
114 .IR doublebounceto\fB@\fIdoublebouncehost .
115 (If that bounces,
116 .B qmail-send
117 gives up.)
118 .TP 5
119 .I envnoathost
120 Presumed domain name for addresses without @ signs.
121 Default:
122 .IR me ,
123 if that is supplied;
124 otherwise the literal name
125 .BR envnoathost ,
126 which is probably not what you want.
127 If
128 .B qmail-send
129 sees an envelope recipient address without an @ sign,
130 it appends
131 .B @\fIenvnoathost\fR.
132 .TP 5
133 .I locals
134 List of domain names that the current host
135 receives mail for,
136 one per line.
137 Default:
138 .IR me ,
139 if that is supplied;
140 otherwise
141 .B qmail-send
142 refuses to run.
143 An address
144 .I user@domain
145 is considered local if
146 .I domain
147 is listed in
148 .IR locals .
149 .TP 5
150 .I percenthack
151 List of domain names where the percent hack is applied.
152 If
153 .I domain
154 is listed in
155 .IR percenthack ,
156 any address of the form
157 .I user%fqdn@domain
158 is rewritten as
159 .IR user@fqdn .
160 .I user
161 may contain %,
162 so the percent hack may be applied repeatedly.
163 .B qmail-send
164 handles
165 .I percenthack
166 before
167 .IR recipientmap .
168 .TP 5
169 .I queuelifetime
170 Number of seconds
171 a message can stay in the queue.
172 Default: 604800 (one week).
173 After this time expires,
174 .B qmail-send
175 will try the message once more,
176 but it will treat any temporary delivery failures as
177 permanent failures.
178 .TP 5
179 .I recipientmap
180 List of redirections, one per line.
181 Each redirection has the form
182 .IR recipient\fB:\fIrewritten ,
183 without any extra spaces.
184 When
185 .B qmail-send
186 sees the address
187 .IR recipient ,
188 it replaces it with
189 .IR rewritten .
190 Both
191 .I recipient
192 and
193 .I rewritten
194 must include domain names.
195 .B qmail-send
196 handles
197 .I recipientmap
198 before
199 .IR locals .
200 .TP 5
201 .I virtualdomains
202 List of virtual domains, one per line.
203 Each virtual domain has the form
204 .IR domain\fB:\fIprepend ,
205 without any extra spaces.
206 When
207 .B qmail-send
208 sees a recipient address at
209 .IR domain ,
210 say
211 .IR user\fB@\fIdomain ,
212 it converts it to
213 .I prepend\fB-\fIuser\fB@\fIdomain
214 and treats it as local.
215 For example, if
216
217 .EX
218 nowhere.mil:joeBREAKfoo
219 .EE
220
221 is in
222 .IR virtualdomains ,
223 and a message arrives for
224 .BR info@nowhere.mil ,
225 .B qmail-send
226 will rewrite the recipient address as
227 .B joeBREAKfoo-info@nowhere.mil
228 and deliver the message locally.
229 .I virtualdomains
230 may contain wildcards:
231
232 .EX
233 .fax:uucpBREAKfax
234 :aliasBREAKcatchall
235 .nowhere.mil:joeBREAKfoo-host
236 .EE
237
238 .I virtualdomains
239 may also contain exceptions:
240 an empty
241 .I prepend
242 means that
243 .I domain
244 is not a virtual domain.
245
246 .B qmail-send
247 handles
248 .I virtualdomains
249 after
250 .IR locals :
251 if a domain is listed in
252 .IR locals ,
253 .I virtualdomains
254 does not apply.
255 .SH "SEE ALSO"
256 nice(1),
257 addresses(5),
258 envelopes(5),
259 qmail-control(5),
260 qmail-log(5),
261 qmail-queue(8),
262 qmail-clean(8),
263 qmail-lspawn(8),
264 qmail-rspawn(8)