]>
Commit | Line | Data |
---|---|---|
6a7ed0b9 | 1 | .TH exim 8 |
2 | .SH exim | |
3 | exim \- Mail Transfer Agent | |
4 | .SH SYNOPSIS | |
5 | .B exim | |
6 | .I "[options] arguments ..." | |
7 | .br | |
8 | .B mailq | |
9 | .I "[options] arguments ..." | |
10 | .br | |
11 | .B rmail | |
12 | .I "[options] arguments ..." | |
13 | .br | |
14 | .B rsmtp | |
15 | .I "[options] arguments ..." | |
16 | .br | |
17 | .B runq | |
18 | .I "[options] arguments ..." | |
19 | .br | |
20 | .B sendmail | |
21 | .I "[options] arguments ..." | |
22 | .SH "DESCRIPTION" | |
23 | .B Exim | |
24 | is a mail transport agent (MTA) developed at the University of | |
25 | Cambridge for use on Unix systems connected to the Internet. It is | |
26 | freely available under the terms of the GNU General Public Licence. In | |
27 | style it is similar to Smail 3, but its facilities are more extensive, | |
28 | and in particular it has some defences against mail bombs and | |
29 | unsolicited junk mail, in the form of options for refusing messages | |
30 | from particular hosts, networks, or senders. | |
31 | .PP | |
32 | Exim's command line takes the standard Unix form of a sequence of | |
33 | options, each starting with a hyphen character, followed by a number | |
34 | of arguments. The options are compatible with the main options of | |
35 | Sendmail, and there are also some additional options, some of which | |
36 | are compatible with Smail 3. Certain combinations of options do not | |
37 | make sense, and provoke an error if used. The form of the arguments | |
38 | depends on which options are set. | |
39 | .PP | |
40 | If Exim is called under the name mailq, it behaves as if the option | |
41 | -bp were present before any other options. This is for compatibility | |
42 | with some systems that contain a command of that name in one of the | |
43 | standard libraries, symbolically linked to /usr/lib/sendmail. | |
44 | .PP | |
45 | If Exim is called under the name rsmtp it behaves as if the option -bS | |
46 | were present before any other options, for compatibility with | |
47 | smail. The -bS option is used for reading in a number of messages in | |
48 | batched SMTP format. | |
49 | .PP | |
50 | If Exim is called under the name rmail it behaves as if the option -i | |
51 | were present before any other options, for compatibility with | |
52 | smail. The -i option is used for reading a message that should not be | |
53 | terminated by a dot on a line by itself. The name rmail is used as an | |
54 | interface by some UUCP systems. | |
55 | .PP | |
56 | If Exim is called under the name runq it behaves as if the option -q | |
57 | were present before any other options, for compatibility with | |
58 | smail. The -q option causes a single queue-runner process to be | |
59 | started. | |
60 | .SH LIMITATIONS | |
61 | For the benefit of those reading this overview to see whether Exim is | |
62 | of interest to them, its limitations are listed first. | |
63 | .TP | |
64 | .B ANSI-C | |
65 | Exim is written in ANSI C. This should not be much of a limitation | |
66 | these days. However, to help with systems that lack a true ANSI C | |
67 | library, Exim avoids making any use of the value returned by the | |
68 | sprintf() function, which is one of the main incompatibilities. It has | |
69 | its own version of strerror() for use with SunOS4 and any other system | |
70 | that lacks this function, and a macro can be defined to turn memmove() | |
71 | into bcopy() if necessary. | |
72 | .TP | |
73 | .B Filenames | |
74 | Exim uses file names that are longer than 14 characters. | |
75 | .TP | |
76 | .B Bangpaths | |
77 | Exim is intended for use as an Internet mailer, and therefore handles | |
78 | addresses in RFC 822 domain format only. It cannot handle 'bang | |
79 | paths', though simple two-component bang paths can be converted by a | |
80 | straightforward rewriting configuration. | |
81 | .TP | |
82 | .B Domains required | |
83 | Exim insists that every address it handles has a domain attached. For | |
84 | incoming local messages, domainless addresses are automatically | |
85 | qualified with a configured domain value. Configuration options | |
86 | specify from which remote systems unqualified addresses are | |
87 | acceptable. | |
88 | .TP | |
89 | .B Transports | |
90 | The only external transport currently implemented is an SMTP transport | |
91 | over a TCP/IP network (using sockets), suitable for machines on the | |
92 | Internet. However, a pipe transport is available, and there are | |
93 | facilities for writing messages to files in 'batched SMTP' format; | |
94 | this can be used to send messages to some other transport | |
95 | mechanism. Batched SMTP input is also catered for. | |
96 | .SH FEATURES | |
97 | Exim follows the same general approach of decentralized control that | |
98 | Smail 3 does. There is no central process doing overall management of | |
99 | mail delivery. However, unlike Smail, the independent delivery | |
100 | processes share data in the form of 'hints', which makes delivery more | |
101 | efficient in some cases. The hints are kept in a number of DBM | |
102 | files. If any of these files are lost, the only effect is to change | |
103 | the pattern of delivery attempts and retries. | |
104 | .PP | |
105 | Many configuration options can be given as expansion strings, and as | |
106 | these can include file lookups, much of Exim's operation can be made | |
107 | table-driven if desired. For example, it is possible to do local | |
108 | delivery on a machine on which the users do not have accounts. | |
109 | .PP | |
110 | Regular expressions are available in a number of configuration | |
111 | parameters. | |
112 | .PP | |
113 | Domain lists can include file lookups, making it possible to support a | |
114 | large number of local domains. | |
115 | .PP | |
116 | Exim has flexible retry algorithms, applicable to mail routing as well as | |
117 | to delivery. | |
118 | .PP | |
119 | Exim contains header and envelope rewriting facilities. | |
120 | .PP | |
121 | Unqualified addresses are accepted only from specified hosts or networks. | |
122 | .PP | |
123 | Exim can perform multiple deliveries down the same SMTP channel after | |
124 | deliveries to a host have been delayed. | |
125 | .PP | |
126 | Exim can be configured to do local deliveries immediately but to leave | |
127 | remote deliveries until the message is picked up by a queue-runner | |
128 | process. This increases the likelihood of multiple messages being sent | |
129 | down a single SMTP connection. | |
130 | .PP | |
131 | When copies of a message have to be delivered to more than one remote | |
132 | host, up to a configured maximum number of remote deliveries can be | |
133 | done in parallel. | |
134 | .PP | |
135 | Exim supports optional checking of incoming return path (sender) and | |
136 | receiver addresses as they are received by SMTP. | |
137 | .PP | |
138 | SMTP calls from specific machines, optionally from specific idents, | |
139 | can be locked out, and incoming SMTP messages from specific senders | |
140 | can also be locked out. | |
141 | .PP | |
142 | It is possible to control which hosts may use the Exim host as a relay | |
143 | for onward transmission of mail; the control can be made to depend on | |
144 | the address domain. | |
145 | .PP | |
146 | Messages on the queue can be 'frozen' and 'thawed' by the | |
147 | administrator. | |
148 | .PP | |
149 | The maximum size of message can be specified. Exim can handle a | |
150 | number of independent local domains on the same machine; each domain | |
151 | can have its own alias files, etc. These are commonly called "virtual | |
152 | domains". | |
153 | .PP | |
154 | Exim stats a user's home directory before looking for a .forward file, | |
155 | in order to detect the case of a missing NFS mount. | |
156 | .PP | |
157 | Exim contains an optional built-in mail filtering facility. This | |
158 | enables users to set up their own mail filtering in a straightfoward | |
159 | manner without the need to run an external program. There can also be | |
160 | a system filter file that applies to all messages. | |
161 | .PP | |
162 | There is support for multiple user mailboxes controlled by prefixes or | |
163 | suffixes on the user name, either via the filter mechanism or through | |
164 | multiple .forward files. | |
165 | .PP | |
166 | Periodic warnings are automatically sent to messages' senders when | |
167 | delivery is delayed - the time between warnings is configurable. | |
168 | .PP | |
169 | A queue run can be manually started to deliver just a particular | |
170 | portion of the queue, or those messages with a recipient whose address | |
171 | contains a given string. | |
172 | .PP | |
173 | Exim can be configured to run as root all the time, except when | |
174 | performing local deliveries, which it always does in a separate | |
175 | process under an appropriate uid and gid. Alternatively, it can be | |
176 | configured to run as root only when needed; in particular, it need not | |
177 | run as root when receiving incoming messages or when sending out | |
178 | messages over SMTP. | |
179 | .PP | |
180 | I have tried to make the wording of delivery failure messages clearer | |
181 | and simpler, for the benefit of those less-experienced people who are | |
182 | now using email. | |
183 | .PP | |
184 | The Exim Monitor is an optional extra; it displays information about | |
185 | Exim's processing in an X window, and an administrator can perform a | |
186 | number of control actions from the window interface. | |
187 | .SH METHOD OF OPERATION | |
188 | When Exim receives a message, it writes two files in its spool | |
189 | directory. The first contains the envelope information, the current | |
190 | status of the message, and the headers, while the second contains the | |
191 | body of the message. The status of the message includes a complete | |
192 | list of recipients and a list of those that have already received the | |
193 | message. The header file gets updated during the course of delivery if | |
194 | necessary. | |
195 | .PP | |
196 | A message remains in the spool directory until it is completely | |
197 | delivered to its recipients or to an error address, or until it is | |
198 | deleted by an administrator or by the user who originally created | |
199 | it. In cases when delivery cannot proceed - for example, when a | |
200 | message can neither be delivered to its recipients nor returned to its | |
201 | sender, the message is marked 'frozen' on the spool, and no more | |
202 | deliveries are attempted. The administrator can thaw such messages | |
203 | when the problem has been corrected, and can also freeze individual | |
204 | messages by hand if necessary. | |
205 | .PP | |
206 | As delivery proceeds, Exim writes timestamped information about each | |
207 | address to a per-message log file; this includes any delivery error | |
208 | messages. This log is solely for the benefit of the administrator. All | |
209 | the information Exim itself needs for delivery is kept in the header | |
210 | spool file. The message log file is deleted with the spool files. If a | |
211 | message is delayed for more than a configured time, a warning message | |
212 | is sent to the sender. This is repeated whenever the same time elapses | |
213 | again without delivery being complete. | |
214 | .PP | |
215 | The main delivery processing elements of Exim are called directors, | |
216 | routers, and transports. Code for a number of these is provided, and | |
217 | compile-time options specify which ones are actually included in the | |
218 | binary. Directors handle addresses that include one of the local | |
219 | domains, routers handle remote addresses, and transports do actual | |
220 | deliveries. | |
221 | .SH TRUSTED AND ADMIN USERS | |
222 | Some Exim options are available only to "trusted users" and others are | |
223 | available only to "admin users". | |
224 | .PP | |
225 | A trusted user is root or the Exim user (if defined) or any user | |
226 | listed in the trusted_users configuration option, or any user, if the | |
227 | currently set group is one of those listed in the trusted_groups | |
228 | configuration option. Trusted users are permitted to use the -f option | |
229 | to specify the senders of messages that are passed to Exim through the | |
230 | local interface, and also to specify host names, host addresses, | |
231 | protocol names, and ident values. Thus they are able to insert | |
232 | messages into Exim's queue locally that have the characteristics of | |
233 | messages received from a remote host. | |
234 | .PP | |
235 | An admin user is root or the Exim user (if defined) or any user that | |
236 | is a member of the Exim group (if defined). The current group does not | |
237 | have to be the Exim group. Admin users are permitted to operate on | |
238 | messages in the queue, for example, to force delivery failures. It is | |
239 | also necessary to be an admin user in order to see the full | |
240 | information provided by the Exim monitor. | |
241 | .SH OPTIONS | |
242 | Exim's command options are as follows: | |
243 | .TP | |
244 | .B -bd | |
245 | Run Exim as a daemon, awaiting incoming SMTP connections. This option | |
246 | can be used only by an admin user. If either of the -d or -dm options | |
247 | are set, the daemon does not disconnect from the controlling | |
248 | terminal. By default, Exim listens for incoming connections on all the | |
249 | host's interfaces, but it can be restricted to specific interfaces by | |
250 | setting the local_interfaces option in the configuration file. The | |
251 | standard SMTP port is used, but this can be varied by means of the -oX | |
252 | option. Most commonly, the -bd option is combined with the -q<time> | |
253 | option, to cause periodic queue runs to happen as well. | |
254 | ||
255 | The process id of a daemon that is both listening and starting queue | |
256 | runners is written to a file called exim-daemon.pid in Exim's spool | |
257 | directory, unless the -oX option is used, in which case the file | |
258 | name is exim-daemon.<port-number>.pid. If a daemon is run with only | |
259 | one of -bd and -q<time>, then that option is added on to the end of | |
260 | the file name, allowing sites that run two separate daemons to | |
261 | distinguish them. | |
262 | ||
263 | It is possible to change the directory in which these pid files are | |
264 | written by changing the setting of PID_FILE_PATH in Local/Makefile. | |
265 | Further details are given in the comments in src/EDITME. | |
266 | ||
267 | The SIGHUP signal can be used to cause the daemon to re-exec itself. | |
268 | This should be done whenever Exim's configuration file is changed, | |
269 | or a new version of Exim is installed. It is not necessary to do | |
270 | this when other files (e.g. alias files) are changed. | |
271 | .TP | |
272 | .B -bf <filename> | |
273 | Run Exim in filter testing mode; the file is the filter file to be | |
274 | tested, and a test message must be supplied on the standard input. | |
275 | If there are no message-dependent tests in the filter, an empty file | |
276 | can be supplied. If the test file does not begin with the special | |
277 | line | |
278 | ||
279 | # Exim filter | |
280 | ||
281 | then it is taken to be a normal .forward file, and is tested for | |
282 | validity under that interpretation. The result of this command, | |
283 | provided no errors are detected, is a list of the actions that Exim | |
284 | would try to take if presented with the message for real. More | |
285 | details of filter testing are given in the separate document | |
286 | entitled "Exim's User interface to mail filtering". | |
287 | ||
288 | When testing a filter file, various parameters that would normally | |
289 | be taken from the envelope recipient address of a message can be set | |
290 | by means of additional command line options. These are: | |
291 | ||
292 | -bfd <domain> default is the qualify domain | |
293 | -bfl <local_part>default is the logged in user | |
294 | -bfp <local_part_prefix> default is null | |
295 | -bfs <local_part_suffix> default is null | |
296 | ||
297 | The local part should always be set to the incoming address with any | |
298 | prefix or suffix stripped, because that is how it appears when a | |
299 | message is actually being delivered. | |
300 | .TP | |
301 | .B -bi | |
302 | Sendmail interprets the -bi option as a request to rebuild its alias | |
303 | file. Exim does not have the concept of a single alias file, and so | |
304 | it cannot mimic this behaviour. However, calls to /usr/lib/sendmail | |
305 | -bi tend to appear in various scripts such as NIS make files, so the | |
306 | option must be recognized. | |
307 | ||
308 | If -bi is encountered, the command specified by the bi_command | |
309 | configuration option is run, under the uid and gid of the caller of | |
310 | Exim. If the -oA option is used, its value is passed to the command | |
311 | as an argument. The command set by bi_command may not contain | |
312 | arguments. The command can use the exim_dbmbuild utility, or some | |
313 | other means, to rebuild alias files if this is required. If the | |
314 | bi_command option is not set, then calling Exim with -bi is a no-op. | |
315 | .TP | |
316 | .B -bm | |
317 | Accept an incoming, locally-generated message on the current input, | |
318 | and deliver it to the addresses given as the command arguments | |
319 | (except when -t is also given - see below). Each argument can be a | |
320 | comma-separated list of RFC 822 addresses. This is the default | |
321 | option, and is assumed if no other conflicting option is present. | |
322 | The message may or may not be delivered immediately, depending on | |
323 | the setting of the -od option and the queue_only and queue_smtp | |
324 | configuration options. | |
325 | ||
326 | The format of the message must be as defined in RFC 822, except | |
327 | that, for compatibility with sendmail and smail, a line of the form | |
328 | ||
329 | From sender Fri Jan 5 12:55 GMT 1996 | |
330 | ||
331 | is permitted to appear at the start of the message. The Solaris 2 | |
332 | version of the "mail" command inserts such a line, though there is | |
333 | no mention of it in the sendmail man page. The sender specified in | |
334 | this line is treated as if it were given as the argument to the -f | |
335 | option. | |
336 | .TP | |
337 | .B -bp | |
338 | List the contents of the mail queue on the current output. Each | |
339 | message on the queue is displayed as in the following example: | |
340 | ||
341 | 25m 2.9K 0t5C6f-0000c8-00 <alice@wonderland.fict.book> | |
342 | red.king@looking-glass.fict.book | |
343 | <other addresses> | |
344 | ||
345 | The first line contains the amount of time the message has been on | |
346 | the queue (in this case 25 minutes), the size of the message (2.9K), | |
347 | the unique identifier for the message, and the message sender, as | |
348 | contained in the envelope. If the message is a delivery error | |
349 | message, the sender address is empty, and appears as <>. If the | |
350 | message is frozen (attempts to deliver it are suspended) then the | |
351 | text '*** frozen ***' is displayed at the end of this line. | |
352 | ||
353 | The recipients of the message (taken from the envelope, not the | |
354 | headers) are displayed on subsequent lines. Those addresses to which | |
355 | the message has already been delivered are marked with the letter D. | |
356 | If an original address gets expanded into several addresses via an | |
357 | alias or forward file, the original is displayed with a 'D' when | |
358 | deliveries for all of its child addresses are completed. | |
359 | .TP | |
360 | .B -bP | |
361 | If this option is given with no arguments, it causes the values of | |
362 | all Exim's main configuration options to be written to the standard | |
363 | output. The values of one or more specific options can be requested | |
364 | by giving their names as arguments, for example: | |
365 | ||
366 | exim -bP qualify_domain local_domains | |
367 | ||
368 | If configure_file is given, the name of the runtime configuration | |
369 | file is output. If log_file_path or pid_file_path are given, the | |
370 | names of the directories where log files and daemon pid files are | |
371 | written are output, respectively. If these values are unset, log | |
372 | files are written in a subdirectory of the spool directory called | |
373 | log, and pid files are written directly into the spool directory. | |
374 | ||
375 | If one of the words director, router, or transport is given, | |
376 | followed by the name of an appropriate driver instance, the option | |
377 | settings for that driver are output. For example: | |
378 | ||
379 | exim -bP transport local_delivery | |
380 | ||
381 | The generic driver options are output first, followed by the | |
382 | driver's private options. A list of the names of drivers of a | |
383 | particular type can be obtained by using one of the words | |
384 | director_list, router_list, or transport_list, and a complete list | |
385 | of all drivers with their option settings can be obtained by using | |
386 | directors, routers, or drivers. | |
387 | .TP | |
388 | .B -brt | |
389 | This option is for testing retry rules, and it must be followed by | |
390 | up to three arguments. It causes Exim to look for a retry rule that | |
391 | matches the values and to output it on the standard output. For | |
392 | example: | |
393 | ||
394 | exim -brt bach.comp.mus | |
395 | Retry rule: *.comp.mus F,2h,15m; FG,4d,30m; | |
396 | ||
397 | See chapter 30 for a description of Exim's retry rules. The first | |
398 | argument, which is required, can be a complete address in the form | |
399 | local_part@domain, or it can be just a domain name. The second | |
400 | argument is an optional second domain name; if no retry rule is | |
401 | found for the first argument, the second is tried. This ties in with | |
402 | Exim's behaviour when looking for retry rules for remote hosts - if | |
403 | no rule is found that matches the host, one that matches the mail | |
404 | domain is sought. The final argument is the name of a specific | |
405 | delivery error, as used in setting up retry rules, for example | |
406 | 'quota_3d'. | |
407 | .TP | |
408 | .B -brw | |
409 | This option is for testing address rewriting rules, and it must be | |
410 | followed by a single argument, consisting of either a local part | |
411 | without a domain, or a complete address with a fully-qualified | |
412 | domain. Exim outputs how this address would be rewritten for each | |
413 | possible place it might appear. | |
414 | .TP | |
415 | .B -bS | |
416 | This option is used for batched SMTP input, where messages have been | |
417 | received from some external source by an alternative transport | |
418 | mechanism. It causes Exim to accept one or more messages by reading | |
419 | SMTP on the standard input, but to generate no responses. All errors | |
420 | are reported by sending mail. If the caller is trusted, then the | |
421 | senders in the MAIL FROM commands are believed; otherwise the sender | |
422 | is always the caller of Exim. Unqualified senders and receivers are | |
423 | not rejected (there seems little point) but instead just get | |
424 | qualified. Receiver verification and administrative rejection is not | |
425 | done, even if configured. HELO and EHLO act as RSET; VRFY, EXPN, ETRN, | |
426 | HELP, and DEBUG act as NOOP; QUIT quits. | |
427 | .TP | |
428 | .B -bs | |
429 | This option causes Exim to accept one or more messages by reading SMTP | |
430 | commands on the standard input, and producing SMTP replies on the | |
431 | standard output. Some user agents use this interface as a way of | |
432 | passing locally-generated messages to the MTA. The option can also be | |
433 | used to run Exim from inetd, as an alternative to using a listening | |
434 | daemon, in which case the standard input is the connected socket. Exim | |
435 | distinguishes between the two cases by attempting to read the IP | |
436 | address of the peer connected to the standard input. If it is not a | |
437 | socket, the call to getpeername() fails, and Exim assumes it is | |
438 | dealing with a local message. | |
439 | ||
440 | If the caller of Exim is trusted, then the senders of messages are | |
441 | taken from the SMTP MAIL FROM commands. Otherwise the content of these | |
442 | commands is ignored and the sender is set up as the calling user. | |
443 | .TP | |
444 | .B -bt | |
445 | Run in address testing mode, in which each argument is taken as an | |
446 | address to be tested. The results are written to the standard | |
447 | output. If no arguments are given, Exim runs in an interactive manner, | |
448 | prompting with > for addresses to be tested. Each address is handled | |
449 | as if it were the recipient address on a message and passed to the | |
450 | appropriate directors or routers. | |
451 | .TP | |
452 | .B -bV | |
453 | Write the current version number, compilation number, and compi- | |
454 | lation date of the exim binary to the standard output. | |
455 | .TP | |
456 | .B -bv | |
457 | Verify the addresses that are given as the arguments to the command, | |
458 | and write the results to the standard output. Verification differs | |
459 | from address testing (the -bt option) in that directors and routers | |
460 | that have no_verify set are skipped, and if the address is accepted by | |
461 | a director or router that has fail_verify set, verification | |
462 | fails. This is the same logic that is used when verifying addresses on | |
463 | incoming messages (see the sender_verify and receiver_verify options). | |
464 | ||
465 | If the -v (or -d) option is not set, the output consists of a single | |
466 | line for each address, stating whether it was verified or not, and | |
467 | giving a reason in the latter case. Otherwise, more details are given | |
468 | of how the address has been handled, and in the case of aliases or | |
469 | forwarding, the generated addresses are also considered. | |
470 | .TP | |
471 | .B -C <filename> | |
472 | Read the runtime configuration from the given file instead of from | |
473 | the default file specified by the CONFIGURE_FILE compile-time set- | |
474 | ting. When this option is used by an unprivileged caller, Exim gives | |
475 | up its root privilege immediately, and runs with the real and | |
476 | effective uid and gid set to those of the caller, to avoid any | |
477 | security exposure. It does not do this if the caller is root or the | |
478 | exim user. The facility is useful for ensuring that configuration | |
479 | files are syntactically correct, but cannot be used for test | |
480 | deliveries, unless the caller is privileged, or unless it's an | |
481 | exotic configuration that does not require privilege. No check is | |
482 | made on the owner or group of the file specified by this option. | |
483 | .TP | |
484 | .B -d<number> | |
485 | Sets a debug level, causing debugging information to be written to the | |
486 | standard error file. Whitespace between -d and the number is | |
487 | optional. If no number is given, 1 is assumed, and the higher the | |
488 | number, the more output is produced. A value of zero turns debugging | |
489 | output off. A value of 9 gives the maximum amount of general | |
490 | information, 10 gives in addition details of the interpretation of | |
491 | filter files, and 11 or higher also turns on the debugging option for | |
492 | DNS lookups. | |
493 | .TP | |
494 | .B -df | |
495 | If this option is set and STDERR_FILE was defined when Exim was built, | |
496 | debugging information is written to the file defined by that variable | |
497 | instead of to the standard error file. This option provides a way of | |
498 | obtaining debugging information when Exim is run from inetd. | |
499 | .TP | |
500 | .B -dm | |
501 | This option causes information about memory allocation and freeing | |
502 | operations to be written to the standard error file. | |
503 | .TP | |
504 | .B -E | |
505 | This option specifies that an incoming message is a locally-generated | |
506 | delivery failure message. It is used internally by Exim when handling | |
507 | delivery failures and is not intended for external use. Its only | |
508 | effect is to stop Exim generating certain messages to the mailmaster, | |
509 | as otherwise message cascades could occur in some situations. As part | |
510 | of the same option, a message id may follow the characters -E. If it | |
511 | does, the log entry for the receipt of the new message contains the | |
512 | id, following 'R=', as a cross reference. | |
513 | .TP | |
514 | .B -ex | |
515 | There are a number of sendmail options starting with -oe which seem to | |
516 | be called by various programs without the leading o in the option. For | |
517 | example, the vacation program uses -eq. Exim treats all options of the | |
518 | form -ex as synonymous with the corresponding -oex options. | |
519 | .TP | |
520 | .B -F <string> | |
521 | Set the sender's full name for use when a locally-generated message | |
522 | is being accepted. In the absence of this option, the user's "gecos" | |
523 | entry from the password file is used. As users are generally | |
524 | permitted to alter their "gecos" entries, no security considerations | |
525 | are involved. White space between -F and the <string> is optional. | |
526 | .TP | |
527 | .B -f <address> | |
528 | Set the address of the sender of a locally-generated message. This | |
529 | option can normally be used only by root or the Exim user or by one | |
530 | of the configured trusted users. In other cases, the sender of a | |
531 | local message is always set up as the user who ran the exim command, | |
532 | and -f is ignored, with one exception. If the special setting -f <> | |
533 | is used by an untrusted user, it does not affect the sender for the | |
534 | purposes of managing the Sender: and From: headers, but it does have | |
535 | the effect of causing any SMTP transmissions to be sent out with | |
536 | ||
537 | MAIL FROM: <> | |
538 | ||
539 | and local deliveries to contain | |
540 | ||
541 | Return-path: <> | |
542 | ||
543 | when configured to contain Return-path: headers. The filtering code | |
544 | treats such a message as an error message, and won't generate | |
545 | messages as a result of reading it. | |
546 | ||
547 | White space between -f and the <string> is optional. The sender of a | |
548 | locally-generated message can also be set by an initial 'From' line | |
549 | in the message - see the description of -bm above. | |
550 | .TP | |
551 | .B -h <number> | |
552 | This option is accepted for compatibility with sendmail, but at | |
553 | present has no effect. (In sendmail it overrides the 'hop count' | |
554 | obtained by counting Received headers.) | |
555 | .TP | |
556 | .B -i | |
557 | This option, which has the same effect as -oi, specifies that a dot | |
558 | on a line by itself should not terminate an incoming, non-SMTP | |
559 | message. I can find no documentation for this option in Solaris 2.4 | |
560 | sendmail, but the mailx command in Solaris 2.4 uses it. | |
561 | .TP | |
562 | .B -M | |
563 | The arguments are interpreted as a list of message ids, and Exim runs | |
564 | a delivery attempt on each message in turn. Retry hints for any of the | |
565 | addresses are overridden - this option forces Exim to try to deliver | |
566 | even if the normal retry time has not yet been reached. If any of the | |
567 | messages is frozen, it is automatically thawed before the delivery | |
568 | attempt, provided that the caller is an admin user. | |
569 | .TP | |
570 | .B -Mar <message-id> <address> <address> ... | |
571 | The first argument must be a message id, and the remaining ones must | |
572 | be email addresses. Exim adds the addresses to the list of recipi- | |
573 | ents of the message. However, if the message is active (in the middle | |
574 | of a delivery attempt), its status is not altered. This option can be | |
575 | used only by an admin user. | |
576 | .TP | |
577 | .B -Meb <message-id> | |
578 | This runs, under /bin/sh, the command defined in the shell variable | |
579 | VISUAL or, if that is not defined, EDITOR or, if that is not defined, | |
580 | the command vi, on a copy of the spool file containing the body of | |
581 | message (eb = Edit Body). If the editor exits normally, then the | |
582 | result of editing replaces the spool file. The message is locked | |
583 | during this process, so no delivery attempts can occur. Note that the | |
584 | first line of the spool file is its own name; care should be taken not | |
585 | to disturb this. The thinking behind providing this feature is that an | |
586 | administrator who has had to mess around with the addresses to get a | |
587 | message delivered might want to add some (grumbly) comment at the | |
588 | start of the message text. This option can be used only by an admin | |
589 | user. | |
590 | .TP | |
591 | .B -Mes <message-id> <address> | |
592 | There must be exactly two arguments. The first argument must be a | |
593 | message id, and the second one an email address. Exim changes the | |
594 | sender address in the message to the given address, which must be a | |
595 | fully qualified address, or '<>'. However, if the message is active | |
596 | (in the middle of a delivery attempt), its status is not altered. | |
597 | This option can be used only by an admin user. | |
598 | .TP | |
599 | .B -Mmad <message-id> | |
600 | Exim marks the all recipient addresses in the message as already | |
601 | delivered. However, if the message is active (in the middle of a | |
602 | delivery attempt), its status is not altered. This option can be used | |
603 | only by an admin user. | |
604 | .TP | |
605 | .B -Mmd <message-id> <address> <address> ... | |
606 | The first argument must be a message id, and the remaining ones must | |
607 | be email addresses. Exim marks the given addresses as already | |
608 | delivered. However, if the message is active (in the middle of a | |
609 | delivery attempt), its status is not altered. This option can be used | |
610 | only by an admin user. | |
611 | .TP | |
612 | .B -MC <transport> <hostname> <sequence number> <message id> | |
613 | This option is not intended for use by outside callers. It is used | |
614 | internally by Exim to invoke another instance of itself to deliver a | |
615 | waiting message using an existing SMTP channel, which is passed as the | |
616 | standard input and output. Details are given in chapter 43. This must | |
617 | be the final option, and the caller must be root or the Exim user in | |
618 | order to use it. | |
619 | .TP | |
620 | .B -Mc | |
621 | The arguments are interpreted as a list of message ids, and Exim runs | |
622 | a delivery attempt on each message in turn, but unlike the -M option, | |
623 | it does check for retry hints, and respects any that are found. This | |
624 | option is not very useful to external callers (except for testing). It | |
625 | is provided for internal use by Exim when it needs to re-invoke itself | |
626 | in order to regain root privilege for a delivery (see chapter 44). | |
627 | .TP | |
628 | .B -Mf | |
629 | The arguments are interpreted as a list of message ids, and each | |
630 | message is marked 'frozen'. This prevents any delivery attempts taking | |
631 | place until the message is 'thawed', either manually or as a result of | |
632 | the auto_thaw configuration option. However, if any of the messages is | |
633 | active (in the middle of a delivery attempt), its status is not | |
634 | altered. This option can be used only by an admin user. | |
635 | .TP | |
636 | .B -Mg | |
637 | The arguments are interpreted as a list of message ids, and Exim gives | |
638 | up trying to deliver those messages. A delivery error message is sent, | |
639 | containing the text 'cancelled by administrator'. However, if any of | |
640 | the messages is active, its status is not altered. This option can be | |
641 | used only by an admin user. | |
642 | .TP | |
643 | .B -Mt | |
644 | The arguments are interpreted as a list of message ids, and each | |
645 | message that was 'frozen' is now 'thawed', so that delivery attempts | |
646 | can resume. However, if any of the messages is active, its status is | |
647 | not altered. This option can be used only by an admin user. | |
648 | .TP | |
649 | .B -Mrm | |
650 | The arguments are interpreted as a list of message ids, and each | |
651 | message is completely removed from Exim's queue, and forgotten. | |
652 | However, if any of the messages is active, its status is not | |
653 | altered. This option can be used only by an admin user or by the user | |
654 | who originally caused the message to be placed on the queue. | |
655 | .TP | |
656 | .B -m | |
657 | This is apparently a synonym for -om that is accepted by sendmail, so | |
658 | Exim treats it that way too. | |
659 | .TP | |
660 | .B -N | |
661 | This is a debugging option that inhibits delivery of a message at the | |
662 | transport level. It implies at least -d1. Exim goes through many of | |
663 | the motions of delivery - it just doesn't actually transport the | |
664 | message, but instead behaves as if it had successfully done so. The | |
665 | log, for example, will contain entries as if the message had been | |
666 | delivered. Only root or the exim user are allowed to use -N with -bd, | |
667 | -q, or -M. In other words, an ordinary user can use it only when | |
668 | supplying an incoming message. | |
669 | .TP | |
670 | .B -oA <file name> | |
671 | This option is used by Sendmail in conjunction with -bi to specify an | |
672 | alternative alias file name. Exim handles -bi differently; see the | |
673 | description above. | |
674 | .TP | |
675 | .B -oB <n> | |
676 | This is a debugging option which limits the maximum number of SMTP | |
677 | deliveries down one channel to <n>, overriding the value set in the | |
678 | smtp transport. If <n> is omitted, the limit is set to 1 (no | |
679 | batching). | |
680 | .TP | |
681 | .B -odb | |
682 | This option applies to all modes in which Exim accepts incoming | |
683 | messages, including the listening daemon. It requests 'background' | |
684 | delivery of such messages, which means that the accepting process | |
685 | automatically starts another delivery process for each message | |
686 | received. Exim does not wait for such processes to complete (it can | |
687 | take some time to perform SMTP deliveries). This is the default action | |
688 | if none of the -od options are present. | |
689 | .TP | |
690 | .B -odf | |
691 | This option (compatible with smail) requests 'foreground' (syn- | |
692 | chronous) delivery when Exim has accepted a locally-generated mess- | |
693 | age. For the daemon it is exactly the same as -odb. For a single | |
694 | message received on the standard input, if the protection regime | |
695 | permits it (see chapter 44), Exim converts the reception process into | |
696 | a delivery process. In other cases, it creates a new delivery process, | |
697 | and then waits for it to complete before proceeding. | |
698 | .TP | |
699 | .B -odi | |
700 | This option is synonymous with -odf. It is provided for compati- | |
701 | bility with sendmail. | |
702 | .TP | |
703 | .B -odq | |
704 | This option applies to all modes in which Exim accepts incoming | |
705 | messages, including the listening daemon. It specifies that the | |
706 | accepting process should not automatically start a delivery attempt | |
707 | for each message received. Messages are placed on the queue, and | |
708 | remain there until a subsequent queue-running process encounters | |
709 | them. The queue_only configuration option has the same effect. | |
710 | .TP | |
711 | .B -odqr | |
712 | This option applies to all modes in which Exim accepts incoming | |
713 | messages, including the listening daemon. It causes Exim to process | |
714 | local addresses when a message is received, but not even to try | |
715 | routing remote addresses. Contrast with -odqs below, which does the | |
716 | routing, but not the delivery. The remote addresses will be picked up | |
717 | by the next queue runner. The queue_remote configuration option has | |
718 | the same effect. | |
719 | .TP | |
720 | .B -odqs | |
721 | This option is a hybrid between -odb and -odq. A delivery process is | |
722 | started for each incoming message, the addresses are all processed, | |
723 | and local deliveries are done in the normal way. However, if any SMTP | |
724 | deliveries are required, they are not done at this time. Such messages | |
725 | remain on the queue until a subsequent queue-running process | |
726 | encounters them. Because routing was done, Exim knows which messages | |
727 | are waiting for which hosts, and so a number of messages for the same | |
728 | host will get sent in a single SMTP connection. The queue_smtp | |
729 | configuration option has the same effect. | |
730 | .TP | |
731 | .B -oem | |
732 | If an error is detected while a non-SMTP message is being received | |
733 | (e.g. a malformed address), the error is reported to the sender in a | |
734 | mail message. This is the default option. After a message has been | |
735 | successfully received, any subsequent delivery errors are always | |
736 | reported in this way. | |
737 | .TP | |
738 | .B -oep | |
739 | If an error is detected while a non-SMTP message is being received, | |
740 | the error is reported by writing a message to the standard error file | |
741 | (stderr). | |
742 | .TP | |
743 | .B -oeq | |
744 | This option is supported for compatibility with sendmail, but has the | |
745 | same effect as -oep. | |
746 | .TP | |
747 | .B -oew | |
748 | This option is supported for compatibility with sendmail, but has the | |
749 | same effect as -oem. | |
750 | .TP | |
751 | .B -oi | |
752 | This option, which has the same effect as -i, specifies that a dot on | |
753 | a line by itself should not terminate an incoming, non-SMTP message. | |
754 | .TP | |
755 | .B -oMa <host address> | |
756 | This option sets the sender host address value, and can be used only | |
757 | by a trusted caller. The value is used in log entries and can appear | |
758 | in Received headers. The option is intended for use when handing to | |
759 | Exim messages received by other means. | |
760 | .TP | |
761 | .B -oMr <protocol name> | |
762 | This option sets the received protocol value, and can be used only by | |
763 | a trusted caller. The value is used in log entries and can appear in | |
764 | Received headers. The option is intended for use when handing to Exim | |
765 | messages received by other means. | |
766 | .TP | |
767 | .B -oMs <host name> | |
768 | This option sets the sender host name value, and can be used only by a | |
769 | trusted caller. The value is used in log entries and can appear in | |
770 | Received headers. The option is intended for use when handing to Exim | |
771 | messages received by other means. | |
772 | .TP | |
773 | .B -oMt <ident string> | |
774 | This option sets the sender ident value, and can be used only by a | |
775 | trusted caller. The value is used in log entries and can appear in | |
776 | Received headers. The option is intended for use when handing to Exim | |
777 | messages received by other means. | |
778 | .TP | |
779 | .B -om | |
780 | In sendmail, this option means 'me too', indicating that the sender of | |
781 | a message should receive a copy of the message if the sender appears | |
782 | in an alias expansion. Exim always does this, so the option does | |
783 | nothing. | |
784 | .TP | |
785 | .B -or <time> | |
786 | This option sets a timeout value for incoming non-SMTP messages. If it | |
787 | is not set, Exim will wait forever for the standard input. The value | |
788 | can also be set using the accept_timeout configuration vari- able. The | |
789 | format used for specifying times is described in section 7.6. | |
790 | .TP -ov | |
791 | This option has exactly the same effect as -v. | |
792 | .TP | |
793 | .B -oX <number> | |
794 | This option is relevant only when the -bd option is also given. It | |
795 | specifies an alternative TCP/IP port number for the listening daemon, | |
796 | and is useful for testing. When used, the process number of the daemon | |
797 | is written to a file whose name is exim- daemon.<number>.pid in Exim's | |
798 | spool directory. | |
799 | .TP | |
800 | .B -q | |
801 | If the -q option is not followed by a time value, it requests a single | |
802 | queue run operation. This option can be used only by an admin | |
803 | user. Exim starts up a delivery process for each (inactive) message on | |
804 | the queue in turn, and waits for it to finish before starting the next | |
805 | one. When all the queued messages have been considered, the original | |
806 | process terminates. In other words, a single pass is made over the | |
807 | waiting mail. Use -q with a time (see below) if you want this to be | |
808 | repeated periodically. | |
809 | ||
810 | Exim processes the waiting messages in an unpredictable order. It | |
811 | isn't very random, but it is likely to be different each time, which | |
812 | is all that matters. If one particular message screws up a remote MTA, | |
813 | other messages to the same MTA have a chance of getting through if | |
814 | they get tried first. | |
815 | ||
816 | However, it is possible to cause the messages to be processed in | |
817 | lexical id order, which is essentially the order in which they | |
818 | arrived, and to start this operation at a particular point by | |
819 | following the -q option with a starting message id. For example: | |
820 | ||
821 | exim -q 0t5C6f-0000c8-00 | |
822 | ||
823 | This causes Exim to skip any messages whose ids are lexically less | |
824 | than the given id. A second id can also be given to stop the queue run | |
825 | before the end. See also the -R option. | |
826 | .TP | |
827 | .B -q <time> | |
828 | This version of the -q option (which again can be run only by an admin | |
829 | user) causes Exim to run as a daemon, starting a queue-running process | |
830 | at intervals specified by the given time value (whose format is | |
831 | described in section 7.6). This form of the -q option is commonly | |
832 | combined with the -bd option, in which case a single daemon process | |
833 | handles both functions. A common way of starting up a combined daemon | |
834 | at system boot time is to use a command such as | |
835 | ||
836 | /opt/exim/bin/exim -bd -q30m | |
837 | ||
838 | Such a daemon listens for incoming SMTP calls, and also fires up a | |
839 | queue-runner process every 30 minutes. The process id of such a daemon | |
840 | is written to a file called exim-daemon.pid in Exim's spool directory, | |
841 | unless the -oX option has been used, in which case the file is called | |
842 | exim-daemon.<port-number>.pid. The location of the pid file can be | |
843 | changed by defining PID_FILE_PATH in Local/Makefile. If a daemon is | |
844 | started without -bd then the -q option used to start it is added to | |
845 | the pid file name. | |
846 | .TP | |
847 | .B -qf | |
848 | This option operates like -q, and may appear with or without a | |
849 | following time. The difference is that a delivery attempt is forced | |
850 | for each message, whereas with -q only those addresses that have | |
851 | passed their retry times are tried. | |
852 | .TP | |
853 | .B -qfl | |
854 | This option operates like -ql, and may appear with or without a | |
855 | following time. The difference is that a delivery attempt is forced | |
856 | for each message, whereas with -ql only those local addresses that | |
857 | have passed their retry times are tried. | |
858 | .TP | |
859 | .B -ql | |
860 | This option operates like -q, and may appear with or without a | |
861 | following time. The difference is that only local addresses are | |
862 | considered for delivery. Note that -ql cannot detect apparently remote | |
863 | addresses that actually turn out to be local when their domains get | |
864 | fully qualified. | |
865 | .TP -R <string> | |
866 | This option is similar to -q with no time value, except that, when | |
867 | scanning the messages on the queue, Exim processes only those that | |
868 | have at least one undelivered address containing the given string, | |
869 | which is checked in a case-independent way. However, once a message is | |
870 | selected, all its addresses are processed. For the first message | |
871 | containing a matching address, Exim overrides any retry information | |
872 | and forces a delivery attempt. This makes it straightforward to | |
873 | initiate delivery for all messages to a given domain after a host has | |
874 | been down for some time. When the SMTP command ETRN is permitted (see | |
875 | the smtp_etrn options), its effect is to run Exim with the -R option. | |
876 | .TP | |
877 | .B -r | |
878 | This is a documented (for sendmail) obsolete alternative name for -f. | |
879 | .TP | |
880 | .B -t | |
881 | When Exim is receiving a locally-generated, non-SMTP message on the | |
882 | current input, the -t option causes the recipients of the message to | |
883 | be obtained from the To, Cc, and Bcc headers in the message instead of | |
884 | from the command arguments. If there are any arguments, they specify | |
885 | addresses to which the message is not to be delivered. That is, the | |
886 | argument addresses are removed from the recipients list obtained from | |
887 | the headers. If a Bcc header is present, it is removed from the | |
888 | message unless there is no To or Cc header, in which case a Bcc header | |
889 | with no data is created, in accordance with RFC 822. | |
890 | .TP | |
891 | .B -v | |
892 | This option has exactly the same effect as -d1; it causes Exim to be | |
893 | 'verbose' and produce some output describing what it is doing on the | |
894 | standard error file. In particular, if an SMTP connection is made, the | |
895 | SMTP dialogue is shown. | |
896 | .TP | |
897 | .B -x | |
898 | AIX uses -x for a private purpose ('mail from a local mail program has | |
899 | National Language Support extended characters in the body of the mail | |
900 | item'). It sets -x when calling the MTA from its mail command. Exim | |
901 | ignores this option. | |
902 | .SH "SEE ALSO" | |
903 | There is extensive documentation available in | |
904 | .I /usr/doc/exim | |
905 | and in the info system regarding exim. | |
906 | Debian users please be sure to have the | |
907 | .B exim-doc | |
908 | package installed. | |
909 | .SH AUTHOR | |
910 | This manual page was stitched together by Christoph Lameter, | |
911 | <clameter@debian.org>, from the original documentation coming with the | |
912 | sourcepackage for the Debian GNU/Linux system, and cleaned up a little | |
913 | by Tim Cutts <tjrc1@scalopus.bio.cam.ac.uk>. |