Commit | Line | Data |
---|---|---|
168e428f | 1 | //////////////////////////////////////////////////////////////////////////// |
f9daeae0 | 2 | $Cambridge: exim/doc/doc-docbook/spec.ascd,v 1.4 2005/12/05 14:38:18 ph10 Exp $ |
168e428f PH |
3 | |
4 | This is the primary source of the Exim Manual. It is an AsciiDoc document | |
5 | that is converted into DocBook XML for subsequent conversion into printing | |
6 | and online formats. The markup used herein is traditional AsciiDoc markup, | |
7 | with some extras. The markup is summarized in a file called AdMarkup.txt. A | |
8 | private AsciiDoc configuration file specifies how the extra markup is to be | |
9 | translated into DocBook XML. You MUST use this private AsciiDoc markup if you | |
10 | want to get sensible results from processing this document. | |
11 | //////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | ||
14 | ||
15 | //////////////////////////////////////////////////////////////////////////// | |
16 | I am abusing the <abstract> DocBook element as the only trivial way of getting | |
17 | this information onto the title verso page in the printed renditions. A better | |
18 | title page would be a useful improvement. The <abstract> element is removed by | |
19 | preprocessing for the HTML renditions, and the whole <docbookinfo> element is | |
20 | removed for ascii output formats. | |
21 | //////////////////////////////////////////////////////////////////////////// | |
22 | ||
23 | Specification of the Exim Mail Transfer Agent | |
24 | ============================================= | |
25 | :abstract: University of Cambridge Computing Service, New Museums Site, Pembroke Street, Cambridge CB2 3QH, England | |
26 | :author: Philip Hazel | |
27 | :copyright: University of Cambridge | |
28 | :cpyear: 2005 | |
068aaea8 | 29 | :date: 01 November 2005 |
168e428f | 30 | :doctitleabbrev: The Exim MTA |
068aaea8 | 31 | :revision: 4.60 |
168e428f PH |
32 | |
33 | ||
34 | ////////////////////////////////////////////////////////////////////////////// | |
35 | ***WARNING*** Do not put anything, not even a titleabbrev, setting before | |
36 | the first chapter (luckily it does not need one) because if you do, AsciiDoc | |
37 | creates an empty <preface> element, which we do not want. | |
38 | ////////////////////////////////////////////////////////////////////////////// | |
39 | ||
40 | Introduction | |
41 | ------------ | |
42 | ||
43 | //////////////////////////////////////////////////////////////////////////// | |
44 | These are definitions of AsciiDoc "attributes" that are in effect "variables" | |
45 | whose values can be substituted. The first makes index entries shorter. The | |
46 | second avoids problems with literal asterisks getting tangled up with bold | |
47 | emphasis quotes. The others are here for convenience of editing. | |
48 | ||
49 | ***WARNING*** The positioning of these definitions, after the first Chapter | |
50 | title, seems to be important. If they are placed earlier, they give rise to | |
51 | incorrect XML. | |
52 | //////////////////////////////////////////////////////////////////////////// | |
53 | ||
54 | :ACL: access control lists (ACLs) | |
55 | :star: * | |
068aaea8 PH |
56 | :previousversion: 4.50 |
57 | :version: 4.60 | |
168e428f PH |
58 | |
59 | ||
60 | //////////////////////////////////////////////////////////////////////////// | |
61 | This chunk of literal XML implements index entries of the form "x, see y" and | |
62 | "x, see also y". It didn't seem worth inventing AsciiDoc markup for this, | |
63 | because is it not something that is likely to change often. | |
64 | //////////////////////////////////////////////////////////////////////////// | |
65 | ||
66 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
67 | <indexterm role="concept"> | |
68 | <primary>$1, $2, etc.</primary> | |
69 | <see><emphasis>numerical variables</emphasis></see> | |
70 | </indexterm> | |
71 | <indexterm role="concept"> | |
72 | <primary>address</primary> | |
73 | <secondary>rewriting</secondary> | |
74 | <see><emphasis>rewriting</emphasis></see> | |
75 | </indexterm> | |
068aaea8 PH |
76 | <indexterm role="concept"> |
77 | <primary>Bounce Address Tag Validation</primary> | |
78 | <see><emphasis>BATV</emphasis></see> | |
79 | </indexterm> | |
80 | <indexterm role="concept"> | |
81 | <primary>Client SMTP Authorization</primary> | |
82 | <see><emphasis>CSA</emphasis></see> | |
83 | </indexterm> | |
168e428f PH |
84 | <indexterm role="concept"> |
85 | <primary>CR character</primary> | |
86 | <see><emphasis>carriage return</emphasis></see> | |
87 | </indexterm> | |
88 | <indexterm role="concept"> | |
89 | <primary>CRL</primary> | |
90 | <see><emphasis>certificate revocation list</emphasis></see> | |
91 | </indexterm> | |
92 | <indexterm role="concept"> | |
93 | <primary>delivery</primary> | |
94 | <secondary>failure report</secondary> | |
95 | <see><emphasis>bounce message</emphasis></see> | |
96 | </indexterm> | |
97 | <indexterm role="concept"> | |
98 | <primary>dialup</primary> | |
99 | <see><emphasis>intermittently connected hosts</emphasis></see> | |
100 | </indexterm> | |
101 | <indexterm role="concept"> | |
102 | <primary>exiscan</primary> | |
103 | <see><emphasis>content scanning</emphasis></see> | |
104 | </indexterm> | |
105 | <indexterm role="concept"> | |
106 | <primary>failover</primary> | |
107 | <see><emphasis>fallback</emphasis></see> | |
108 | </indexterm> | |
109 | <indexterm role="concept"> | |
110 | <primary>fallover</primary> | |
111 | <see><emphasis>fallback</emphasis></see> | |
112 | </indexterm> | |
113 | <indexterm role="concept"> | |
114 | <primary>filter</primary> | |
115 | <secondary>Sieve</secondary> | |
116 | <see><emphasis>Sieve filter</emphasis></see> | |
117 | </indexterm> | |
118 | <indexterm role="concept"> | |
119 | <primary>ident</primary> | |
120 | <see><emphasis>RFC 1413</emphasis></see> | |
121 | </indexterm> | |
122 | <indexterm role="concept"> | |
123 | <primary>LF character</primary> | |
124 | <see><emphasis>linefeed</emphasis></see> | |
125 | </indexterm> | |
126 | <indexterm role="concept"> | |
127 | <primary>maximum</primary> | |
128 | <see><emphasis>limit</emphasis></see> | |
129 | </indexterm> | |
068aaea8 PH |
130 | <indexterm role="concept"> |
131 | <primary>monitor</primary> | |
132 | <see><emphasis>Exim monitor</emphasis></see> | |
133 | </indexterm> | |
168e428f PH |
134 | <indexterm role="concept"> |
135 | <primary>no_<emphasis>xxx</emphasis></primary> | |
136 | <see>entry for xxx</see> | |
137 | </indexterm> | |
138 | <indexterm role="concept"> | |
139 | <primary>NUL</primary> | |
140 | <see><emphasis>binary zero</emphasis></see> | |
141 | </indexterm> | |
142 | <indexterm role="concept"> | |
143 | <primary>passwd file</primary> | |
144 | <see><emphasis>/etc/passwd</emphasis></see> | |
145 | </indexterm> | |
146 | <indexterm role="concept"> | |
147 | <primary>process id</primary> | |
148 | <see><emphasis>pid</emphasis></see> | |
149 | </indexterm> | |
150 | <indexterm role="concept"> | |
151 | <primary>RBL</primary> | |
152 | <see><emphasis>DNS list</emphasis></see> | |
153 | </indexterm> | |
154 | <indexterm role="concept"> | |
155 | <primary>redirection</primary> | |
156 | <see><emphasis>address redirection</emphasis></see> | |
157 | </indexterm> | |
158 | <indexterm role="concept"> | |
159 | <primary>return path</primary> | |
160 | <seealso><emphasis>envelope sender</emphasis></seealso> | |
161 | </indexterm> | |
162 | <indexterm role="concept"> | |
163 | <primary>scanning</primary> | |
164 | <see><emphasis>content scanning</emphasis></see> | |
165 | </indexterm> | |
166 | <indexterm role="concept"> | |
167 | <primary>SSL</primary> | |
168 | <see><emphasis>TLS</emphasis></see> | |
169 | </indexterm> | |
170 | <indexterm role="concept"> | |
171 | <primary>string</primary> | |
172 | <secondary>expansion</secondary> | |
173 | <see><emphasis>expansion</emphasis></see> | |
174 | </indexterm> | |
175 | <indexterm role="concept"> | |
176 | <primary>top bit</primary> | |
177 | <see><emphasis>8-bit characters</emphasis></see> | |
178 | </indexterm> | |
179 | <indexterm role="concept"> | |
180 | <primary>variables</primary> | |
181 | <see><emphasis>expansion, variables</emphasis></see> | |
182 | </indexterm> | |
183 | <indexterm role="concept"> | |
184 | <primary>zero, binary</primary> | |
185 | <see><emphasis>binary zero</emphasis></see> | |
186 | </indexterm> | |
187 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
188 | ||
189 | ||
190 | //////////////////////////////////////////////////////////////////////////// | |
191 | OK, now we start with the real data for this first chapter. | |
192 | //////////////////////////////////////////////////////////////////////////// | |
193 | ||
194 | Exim is a mail transfer agent (MTA) for hosts that are running Unix or | |
195 | Unix-like operating systems. It was designed on the assumption that it would be | |
196 | run on hosts that are permanently connected to the Internet. However, it can be | |
197 | used on intermittently connected hosts with suitable configuration adjustments. | |
198 | ||
199 | Configuration files currently exist for the following operating systems: AIX, | |
068aaea8 PH |
200 | BSD/OS (aka BSDI), Darwin (Mac OS X), DGUX, Dragonfly, FreeBSD, GNU/Hurd, |
201 | GNU/Linux, HI-OSF (Hitachi), HI-UX, HP-UX, IRIX, MIPS RISCOS, NetBSD, OpenBSD, | |
202 | OpenUNIX, QNX, SCO, SCO SVR4.2 (aka UNIX-SV), Solaris (aka SunOS5), SunOS4, | |
203 | Tru64-Unix (formerly Digital UNIX, formerly DEC-OSF1), Ultrix, and Unixware. | |
204 | Some of these operating systems are no longer current and cannot easily be | |
205 | tested, so the configuration files may no longer work in practice. | |
168e428f PH |
206 | |
207 | There are also configuration files for compiling Exim in the Cygwin environment | |
208 | that can be installed on systems running Windows. However, this document does | |
209 | not contain any information about running Exim in the Cygwin environment. | |
210 | ||
211 | The terms and conditions for the use and distribution of Exim are contained in | |
212 | the file _NOTICE_. Exim is distributed under the terms of the GNU General | |
213 | Public Licence, a copy of which may be found in the file _LICENCE_. | |
214 | ||
215 | The use, supply or promotion of Exim for the purpose of sending bulk, | |
216 | unsolicited electronic mail is incompatible with the basic aims of the program, | |
217 | which revolve around the free provision of a service that enhances the quality | |
218 | of personal communications. The author of Exim regards indiscriminate | |
219 | mass-mailing as an antisocial, irresponsible abuse of the Internet. | |
220 | ||
221 | Exim owes a great deal to Smail 3 and its author, Ron Karr. Without the | |
222 | experience of running and working on the Smail 3 code, I could never have | |
223 | contemplated starting to write a new MTA. Many of the ideas and user interfaces | |
224 | were originally taken from Smail 3, though the actual code of Exim is entirely | |
225 | new, and has developed far beyond the initial concept. | |
226 | ||
227 | Many people, both in Cambridge and around the world, have contributed to the | |
228 | development and the testing of Exim, and to porting it to various operating | |
229 | systems. I am grateful to them all. The distribution now contains a file called | |
230 | _ACKNOWLEDGMENTS_, in which I have started recording the names of | |
231 | contributors. | |
232 | ||
233 | ||
234 | ||
235 | Exim documentation | |
236 | ~~~~~~~~~~~~~~~~~~ | |
237 | [revisionflag="changed"] | |
238 | cindex:[documentation] | |
239 | This edition of the Exim specification applies to version {version} of Exim. | |
240 | Substantive changes from the {previousversion} edition are marked in some | |
241 | renditions of the document; this paragraph is so marked if the rendition is | |
242 | capable of showing a change indicator. | |
243 | ||
244 | This document is very much a reference manual; it is not a tutorial. The reader | |
245 | is expected to have some familiarity with the SMTP mail transfer protocol and | |
246 | with general Unix system administration. Although there are some discussions | |
247 | and examples in places, the information is mostly organized in a way that makes | |
248 | it easy to look up, rather than in a natural order for sequential reading. | |
249 | Furthermore, the manual aims to cover every aspect of Exim in detail, including | |
250 | a number of rarely-used, special-purpose features that are unlikely to be of | |
251 | very wide interest. | |
252 | ||
253 | cindex:[books about Exim] | |
254 | An ``easier'' discussion of Exim which provides more in-depth explanatory, | |
255 | introductory, and tutorial material can be found in a book entitled | |
256 | 'The Exim SMTP Mail Server', published by UIT Cambridge | |
257 | (*http://www.uit.co.uk/exim-book/[]*). | |
258 | ||
259 | This book also contains a chapter that gives a general introduction to SMTP and | |
260 | Internet mail. Inevitably, however, the book is unlikely to be fully up-to-date | |
261 | with the latest release of Exim. (Note that the earlier book about Exim, | |
262 | published by O'Reilly, covers Exim 3, and many things have changed in Exim 4.) | |
263 | ||
068aaea8 PH |
264 | [revisionflag="changed"] |
265 | cindex:[Debian,information sources] | |
266 | If you are using a Debian distribution of Exim, you will find information about | |
267 | Debian-specific features in the file | |
268 | &&&& | |
269 | _/usr/share/doc/exim4-base/README.Debian_ | |
270 | &&&& | |
271 | The command ^man update-exim.conf^ is another source of Debian-specific | |
272 | information. | |
273 | ||
168e428f PH |
274 | cindex:[_doc/NewStuff_] |
275 | cindex:[_doc/ChangeLog_] | |
276 | cindex:[change log] | |
277 | As the program develops, there may be features in newer versions that have not | |
278 | yet made it into this document, which is updated only when the most significant | |
279 | digit of the fractional part of the version number changes. Specifications of | |
280 | new features that are not yet in this manual are placed in the file | |
281 | _doc/NewStuff_ in the Exim distribution. | |
282 | ||
283 | Some features may be classified as ``experimental''. These may change | |
284 | incompatibly while they are developing, or even be withdrawn. For this reason, | |
285 | they are not documented in this manual. Information about experimental features | |
286 | can be found in the file _doc/experimental.txt_. | |
287 | ||
288 | All changes to the program (whether new features, bug fixes, or other kinds of | |
289 | change) are noted briefly in the file called _doc/ChangeLog_. | |
290 | ||
291 | cindex:[_doc/spec.txt_] | |
292 | This specification itself is available as an ASCII file in _doc/spec.txt_ so | |
293 | that it can easily be searched with a text editor. Other files in the _doc_ | |
294 | directory are: | |
295 | ||
296 | [frame="none"] | |
297 | `--------------------`------------------------------------------ | |
298 | _OptionLists.txt_ list of all options in alphabetical order | |
299 | _dbm.discuss.txt_ discussion about DBM libraries | |
300 | _exim.8_ a man page of Exim's command line options | |
301 | _experimental.txt_ documentation of experimental features | |
302 | _filter.txt_ specification of the filter language | |
303 | _pcrepattern.txt_ specification of PCRE regular expressions | |
304 | _pcretest.txt_ specification of the PCRE testing program | |
305 | _Exim3.upgrade_ upgrade notes from release 2 to release 3 | |
306 | _Exim4.upgrade_ upgrade notes from release 3 to release 4 | |
307 | ---------------------------------------------------------------- | |
308 | ||
309 | The main specification and the specification of the filtering language are also | |
310 | available in other formats (HTML, PostScript, PDF, and Texinfo). Section | |
311 | <<SECTavail>> below tells you how to get hold of these. | |
312 | ||
313 | ||
314 | ||
315 | FTP and web sites | |
316 | ~~~~~~~~~~~~~~~~~ | |
317 | cindex:[web site] | |
318 | cindex:[FTP site] | |
068aaea8 | 319 | The primary site for Exim source distributions is currently the University of |
168e428f PH |
320 | Cambridge's FTP site, whose contents are described in 'Where to find the Exim |
321 | distribution' below. In addition, there is a web site and an FTP site at | |
322 | %exim.org%. These are now also hosted at the University of Cambridge. The | |
323 | %exim.org% site was previously hosted for a number of years by Energis Squared, | |
324 | formerly Planet Online Ltd, whose support I gratefully acknowledge. | |
325 | ||
326 | As well as Exim distribution tar files, the Exim web site contains a number of | |
327 | differently formatted versions of the documentation, including the | |
328 | cindex:[FAQ] FAQ in both text and HTML formats. The HTML version comes with | |
329 | a keyword-in-context index. A recent addition to the online information is the | |
330 | cindex:[wiki] | |
331 | Exim wiki (*http://www.exim.org/eximwiki/[]*). | |
332 | We hope that this will make it easier for Exim users to contribute examples, | |
333 | tips, and know-how for the benefit of others. | |
334 | ||
335 | ||
336 | ||
337 | Mailing lists | |
338 | ~~~~~~~~~~~~~ | |
339 | cindex:[mailing lists,for Exim users] | |
340 | The following are the three main Exim mailing lists: | |
341 | ||
342 | [frame="none"] | |
343 | `-------------------------------`---------------------------------------- | |
344 | 'exim-users@exim.org' general discussion list | |
345 | 'exim-dev@exim.org' discussion of bugs, enhancements, etc. | |
346 | 'exim-announce@exim.org' moderated, low volume announcements list | |
347 | ------------------------------------------------------------------------- | |
348 | ||
349 | You can subscribe to these lists, change your existing subscriptions, and view | |
350 | or search the archives via the mailing lists link on the Exim home page. The | |
351 | 'exim-users' mailing list is also forwarded to | |
352 | *http://www.egroups.com/list/exim-users[]*, an archiving system with searching | |
353 | capabilities. | |
354 | ||
068aaea8 PH |
355 | [revisionflag="changed"] |
356 | cindex:[Debian,mailing list for] | |
357 | If you are using a Debian distribution of Exim, you may wish to subscribe to | |
358 | the Debian-specific mailing list, which is | |
359 | 'pkg-exim4-users@lists.alioth.debian.org'. | |
360 | ||
168e428f PH |
361 | |
362 | Exim training | |
363 | ~~~~~~~~~~~~~ | |
364 | cindex:[training courses] | |
068aaea8 PH |
365 | From time to time (approximately annually at the time of writing), training |
366 | courses are run by the author of Exim in Cambridge, UK. Details can be found on | |
367 | the web site *http://www-tus.csx.cam.ac.uk/courses/exim/[]*. | |
168e428f PH |
368 | |
369 | ||
370 | Bug reports | |
371 | ~~~~~~~~~~~ | |
372 | cindex:[bug reports] | |
373 | cindex:[reporting bugs] | |
374 | Reports of obvious bugs should be emailed to 'bugs@exim.org'. However, if | |
375 | you are unsure whether some behaviour is a bug or not, the best thing to do is | |
068aaea8 | 376 | to post a message to the 'exim-dev' mailing list and have it discussed. |
168e428f PH |
377 | |
378 | ||
379 | ||
380 | [[SECTavail]] | |
381 | Where to find the Exim distribution | |
382 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
383 | cindex:[FTP site] | |
384 | cindex:[distribution,ftp site] | |
385 | The master ftp site for the Exim distribution is | |
386 | ||
387 | &&& | |
388 | *ftp://ftp.csx.cam.ac.uk/pub/software/email/exim[]* | |
389 | &&& | |
390 | ||
391 | This is mirrored by | |
392 | ||
393 | &&& | |
394 | *ftp://ftp.exim.org/pub/exim[]* | |
395 | &&& | |
396 | ||
397 | The file references that follow are relative to the _exim_ directories at these | |
398 | sites. There are now quite a number of independent mirror sites around the | |
399 | world. Those that I know about are listed in the file called _Mirrors_. | |
400 | ||
401 | Within the _exim_ directory there are subdirectories called _exim3_ (for | |
402 | previous Exim 3 distributions), _exim4_ (for the latest Exim 4 | |
403 | distributions), and _Testing_ for testing versions. In the _exim4_ | |
404 | subdirectory, the current release can always be found in files called | |
405 | ||
406 | &&& | |
407 | _exim-n.nn.tar.gz_ | |
408 | _exim-n.nn.tar.bz2_ | |
409 | &&& | |
410 | ||
411 | where 'n.nn' is the highest such version number in the directory. The two | |
412 | files contain identical data; the only difference is the type of compression. | |
413 | The _.bz2_ file is usually a lot smaller than the _.gz_ file. | |
414 | ||
415 | cindex:[distribution,signing details] | |
416 | cindex:[distribution,public key] | |
417 | cindex:[public key for signed distribution] | |
418 | The distributions are currently signed with Philip Hazel's GPG key. The | |
419 | corresponding public key is available from a number of keyservers, and there is | |
420 | also a copy in the file _Public-Key_. The signatures for the tar bundles are | |
421 | in: | |
422 | ||
423 | &&& | |
424 | _exim-n.nn.tar.gz.sig_ | |
425 | _exim-n.nn.tar.bz2.sig_ | |
426 | &&& | |
427 | ||
428 | For each released version, the log of changes is made separately available in a | |
429 | separate file in the directory _ChangeLogs_ so that it is possible to | |
430 | find out what has changed without having to download the entire distribution. | |
431 | ||
432 | cindex:[documentation,available formats] | |
433 | The main distribution contains ASCII versions of this specification and other | |
434 | documentation; other formats of the documents are available in separate files | |
435 | inside the _exim4_ directory of the FTP site: | |
436 | ||
437 | &&& | |
438 | _exim-html-n.nn.tar.gz_ | |
439 | _exim-pdf-n.nn.tar.gz_ | |
440 | _exim-postscript-n.nn.tar.gz_ | |
441 | _exim-texinfo-n.nn.tar.gz_ | |
442 | &&& | |
443 | ||
444 | These tar files contain only the _doc_ directory, not the complete | |
445 | distribution, and are also available in _.bz2_ as well as _.gz_ forms. | |
446 | cindex:[FAQ] | |
447 | The FAQ is available for downloading in two different formats in these files: | |
448 | ||
449 | &&& | |
450 | _exim4/FAQ.txt.gz_ | |
451 | _exim4/FAQ.html.tar.gz_ | |
452 | &&& | |
453 | ||
454 | The first of these is a single ASCII file that can be searched with a text | |
455 | editor. The second is a directory of HTML files, normally accessed by starting | |
456 | at _index.html_. The HTML version of the FAQ (which is also included in the | |
457 | HTML documentation tarbundle) includes a keyword-in-context index, which is | |
458 | often the most convenient way of finding your way around. | |
459 | ||
460 | ||
461 | Wish list | |
462 | ~~~~~~~~~ | |
463 | cindex:[wish list] | |
464 | A wish list is maintained, containing ideas for new features that have been | |
465 | submitted. From time to time the file is exported to the ftp site into the file | |
466 | _exim4/WishList_. Items are removed from the list if they get implemented. | |
467 | ||
468 | ||
469 | ||
470 | Contributed material | |
471 | ~~~~~~~~~~~~~~~~~~~~ | |
472 | cindex:[contributed material] | |
473 | At the ftp site, there is a directory called _Contrib_ that contains | |
474 | miscellaneous files contributed to the Exim community by Exim users. There is | |
475 | also a collection of contributed configuration examples in | |
476 | _exim4/config.samples.tar.gz_. These samples are referenced from the FAQ. | |
477 | ||
478 | ||
479 | ||
480 | Limitations | |
481 | ~~~~~~~~~~~ | |
482 | - cindex:[limitations of Exim] | |
483 | Exim is designed for use as an Internet MTA, and therefore handles addresses | |
484 | in RFC 2822 domain format only. | |
485 | cindex:[bang paths,not handled by Exim] | |
486 | It cannot handle UUCP ``bang paths'', though simple two-component bang paths can | |
487 | be converted by a straightforward rewriting configuration. This restriction | |
488 | does not prevent Exim from being interfaced to UUCP as a transport mechanism, | |
489 | provided that domain addresses are used. | |
490 | ||
491 | - cindex:[domainless addresses] | |
492 | cindex:[address,without domain] | |
493 | Exim insists that every address it handles has a domain attached. For incoming | |
494 | local messages, domainless addresses are automatically qualified with a | |
495 | configured domain value. Configuration options specify from which remote | |
496 | systems unqualified addresses are acceptable. These are then qualified on | |
497 | arrival. | |
498 | ||
499 | - cindex:[transport,external] | |
500 | cindex:[external transports] | |
501 | The only external transport currently implemented is an SMTP transport over a | |
502 | TCP/IP network (using sockets, including support for IPv6). However, a pipe | |
503 | transport is available, and there are facilities for writing messages to files | |
504 | and pipes, optionally in 'batched SMTP' format; these facilities can be used | |
505 | to send messages to some other transport mechanism such as UUCP, provided it | |
506 | can handle domain-style addresses. Batched SMTP input is also catered for. | |
507 | ||
508 | - Exim is not designed for storing mail for dial-in hosts. When the volumes of | |
509 | such mail are large, it is better to get the messages ``delivered'' into files | |
510 | (that is, off Exim's queue) and subsequently passed on to the dial-in hosts by | |
511 | other means. | |
512 | ||
513 | - Although Exim does have basic facilities for scanning incoming messages, these | |
514 | are not comprehensive enough to do full virus or spam scanning. Such operations | |
515 | are best carried out using additional specialized software packages. If you | |
516 | compile Exim with the content-scanning extension, straightforward interfaces to | |
517 | a number of common scanners are provided. | |
518 | ||
519 | ||
520 | ||
521 | ||
522 | ||
523 | Run time configuration | |
524 | ~~~~~~~~~~~~~~~~~~~~~~ | |
525 | Exim's run time configuration is held in a single text file that is divided | |
526 | into a number of sections. The entries in this file consist of keywords and | |
527 | values, in the style of Smail 3 configuration files. A default configuration | |
528 | file which is suitable for simple online installations is provided in the | |
529 | distribution, and is described in chapter <<CHAPdefconfil>> below. | |
530 | ||
531 | ||
532 | ||
533 | Calling interface | |
534 | ~~~~~~~~~~~~~~~~~ | |
535 | cindex:[Sendmail compatibility,command line interface] | |
536 | Like many MTAs, Exim has adopted the Sendmail command line interface so that it | |
537 | can be a straight replacement for _/usr/lib/sendmail_ or | |
538 | _/usr/sbin/sendmail_ when sending mail, but you do not need to know anything | |
539 | about Sendmail in order to run Exim. For actions other than sending messages, | |
540 | Sendmail-compatible options also exist, but those that produce output (for | |
541 | example, %-bp%, which lists the messages on the queue) do so in Exim's own | |
542 | format. There are also some additional options that are compatible with Smail | |
543 | 3, and some further options that are new to Exim. Chapter <<CHAPcommandline>> | |
544 | documents all Exim's command line options. This information is automatically | |
545 | made into the man page that forms part of the Exim distribution. | |
546 | ||
547 | Control of messages on the queue can be done via certain privileged command | |
548 | line options. There is also an optional monitor program called 'eximon', which | |
549 | displays current information in an X window, and which contains a menu | |
550 | interface to Exim's command line administration options. | |
551 | ||
552 | ||
553 | ||
554 | Terminology | |
555 | ~~~~~~~~~~~ | |
556 | cindex:[terminology definitions] | |
557 | cindex:[body of message,definition of] | |
558 | The 'body' of a message is the actual data that the sender wants to transmit. | |
559 | It is the last part of a message, and is separated from the 'header' (see | |
560 | below) by a blank line. | |
561 | ||
562 | cindex:[bounce message,definition of] | |
563 | When a message cannot be delivered, it is normally returned to the sender in a | |
564 | delivery failure message or a ``non-delivery report'' (NDR). The term 'bounce' | |
565 | is commonly used for this action, and the error reports are often called | |
566 | 'bounce messages'. This is a convenient shorthand for ``delivery failure error | |
567 | report''. Such messages have an empty sender address in the message's | |
568 | 'envelope' (see below) to ensure that they cannot themselves give rise to | |
569 | further bounce messages. | |
570 | ||
571 | The term 'default' appears frequently in this manual. It is used to qualify a | |
572 | value which is used in the absence of any setting in the configuration. It may | |
573 | also qualify an action which is taken unless a configuration setting specifies | |
574 | otherwise. | |
575 | ||
576 | The term 'defer' is used when the delivery of a message to a specific | |
577 | destination cannot immediately take place for some reason (a remote host may be | |
578 | down, or a user's local mailbox may be full). Such deliveries are 'deferred' | |
579 | until a later time. | |
580 | ||
581 | The word 'domain' is sometimes used to mean all but the first component of a | |
582 | host's name. It is 'not' used in that sense here, where it normally | |
583 | refers to the part of an email address following the @ sign. | |
584 | ||
585 | cindex:[envelope, definition of] | |
586 | cindex:[sender,definition of] | |
587 | A message in transit has an associated 'envelope', as well as a header and a | |
588 | body. The envelope contains a sender address (to which bounce messages should | |
589 | be delivered), and any number of recipient addresses. References to the | |
590 | sender or the recipients of a message usually mean the addresses in the | |
591 | envelope. An MTA uses these addresses for delivery, and for returning bounce | |
592 | messages, not the addresses that appear in the header lines. | |
593 | ||
594 | cindex:[message header, definition of] | |
595 | cindex:[header section,definition of] | |
596 | The 'header' of a message is the first part of a message's text, consisting | |
597 | of a number of lines, each of which has a name such as 'From:', 'To:', | |
598 | 'Subject:', etc. Long header lines can be split over several text lines by | |
599 | indenting the continuations. The header is separated from the body by a blank | |
600 | line. | |
601 | ||
602 | cindex:[local part,definition of] | |
603 | cindex:[domain,definition of] | |
604 | The term 'local part', which is taken from RFC 2822, is used to refer to that | |
605 | part of an email address that precedes the @ sign. The part that follows the | |
606 | @ sign is called the 'domain' or 'mail domain'. | |
607 | ||
608 | cindex:[local delivery,definition of] | |
609 | cindex:[remote delivery, definition of] | |
610 | The terms 'local delivery' and 'remote delivery' are used to distinguish | |
611 | delivery to a file or a pipe on the local host from delivery by SMTP over | |
068aaea8 PH |
612 | TCP/IP to another host. As far as Exim is concerned, all hosts other than the |
613 | host it is running on are 'remote'. | |
168e428f PH |
614 | |
615 | cindex:[return path,definition of] | |
616 | 'Return path' is another name that is used for the sender address in a | |
617 | message's envelope. | |
618 | ||
619 | cindex:[queue,definition of] | |
620 | The term 'queue' is used to refer to the set of messages awaiting delivery, | |
621 | because this term is in widespread use in the context of MTAs. However, in | |
622 | Exim's case the reality is more like a pool than a queue, because there is | |
623 | normally no ordering of waiting messages. | |
624 | ||
625 | cindex:[queue runner,definition of] | |
626 | The term 'queue runner' is used to describe a process that scans the queue | |
627 | and attempts to deliver those messages whose retry times have come. This term | |
628 | is used by other MTAs, and also relates to the command %runq%, but in Exim | |
629 | the waiting messages are normally processed in an unpredictable order. | |
630 | ||
631 | cindex:[spool directory,definition of] | |
632 | The term 'spool directory' is used for a directory in which Exim keeps the | |
633 | messages on its queue -- that is, those that it is in the process of | |
634 | delivering. This should not be confused with the directory in which local | |
635 | mailboxes are stored, which is called a ``spool directory'' by some people. In | |
636 | the Exim documentation, ``spool'' is always used in the first sense. | |
637 | ||
638 | ||
639 | ||
640 | ||
641 | ||
642 | ||
643 | //////////////////////////////////////////////////////////////////////////// | |
644 | //////////////////////////////////////////////////////////////////////////// | |
645 | ||
646 | Incorporated code | |
647 | ----------------- | |
648 | cindex:[incorporated code] | |
649 | cindex:[regular expressions,library] | |
650 | cindex:[PCRE] | |
651 | A number of pieces of external code are included in the Exim distribution. | |
652 | ||
653 | - Regular expressions are supported in the main Exim program and in the Exim | |
654 | monitor using the freely-distributable PCRE library, copyright (c) University | |
655 | of Cambridge. The source is distributed in the directory _src/pcre_. However, | |
656 | this is a cut-down version of PCRE. If you want to use the PCRE library in | |
657 | other programs, you should obtain and install the full version from | |
658 | *ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre[]*. | |
659 | ||
660 | - cindex:[cdb,acknowledgement] | |
661 | Support for the cdb (Constant DataBase) lookup method is provided by code | |
662 | contributed by Nigel Metheringham of (at the time he contributed it) Planet | |
663 | Online Ltd. which contains the following statements: | |
664 | + | |
068aaea8 PH |
665 | ++++++++++++++++++++++ |
666 | <blockquote> | |
667 | ++++++++++++++++++++++ | |
668 | + | |
168e428f PH |
669 | Copyright (c) 1998 Nigel Metheringham, Planet Online Ltd |
670 | + | |
671 | This program is free software; you can redistribute it and/or modify it under | |
672 | the terms of the GNU General Public License as published by the Free Software | |
673 | Foundation; either version 2 of the License, or (at your option) any later | |
674 | version. | |
675 | + | |
676 | This code implements Dan Bernstein's Constant DataBase (cdb) spec. Information, | |
677 | the spec and sample code for cdb can be obtained from | |
678 | *http://www.pobox.com/{tl}djb/cdb.html[]*. This implementation borrows some code | |
679 | from Dan Bernstein's implementation (which has no license restrictions applied | |
680 | to it). | |
681 | + | |
068aaea8 PH |
682 | ++++++++++++++++++++++ |
683 | </blockquote> | |
684 | ++++++++++++++++++++++ | |
685 | + | |
168e428f PH |
686 | The implementation is completely contained within the code of Exim. |
687 | It does not link against an external cdb library. | |
688 | ||
689 | - cindex:[SPA authentication] | |
690 | cindex:[Samba project] | |
691 | cindex:[Microsoft Secure Password Authentication] | |
692 | Client support for Microsoft's 'Secure Password Authentication' is provided | |
693 | by code contributed by Marc Prud'hommeaux. Server support was contributed by | |
694 | Tom Kistner. This includes code taken from the Samba project, which is released | |
695 | under the Gnu GPL. | |
696 | ||
697 | - cindex:[Cyrus] | |
698 | cindex:['pwcheck' daemon] | |
699 | cindex:['pwauthd' daemon] | |
700 | Support for calling the Cyrus 'pwcheck' and 'saslauthd' daemons is provided | |
701 | by code taken from the Cyrus-SASL library and adapted by Alexander S. | |
702 | Sabourenkov. The permission notice appears below, in accordance with the | |
703 | conditions expressed therein. | |
704 | + | |
068aaea8 PH |
705 | ++++++++++++++++++++++ |
706 | <blockquote> | |
707 | ++++++++++++++++++++++ | |
708 | + | |
168e428f PH |
709 | Copyright (c) 2001 Carnegie Mellon University. All rights reserved. |
710 | + | |
711 | Redistribution and use in source and binary forms, with or without | |
712 | modification, are permitted provided that the following conditions | |
713 | are met: | |
714 | + | |
715 | . Redistributions of source code must retain the above copyright | |
716 | notice, this list of conditions and the following disclaimer. | |
717 | ||
718 | . Redistributions in binary form must reproduce the above copyright | |
719 | notice, this list of conditions and the following disclaimer in | |
720 | the documentation and/or other materials provided with the | |
721 | distribution. | |
722 | ||
723 | . The name ``Carnegie Mellon University'' must not be used to | |
724 | endorse or promote products derived from this software without | |
725 | prior written permission. For permission or any other legal | |
726 | details, please contact | |
727 | + | |
728 | &&& | |
068aaea8 PH |
729 | Office of Technology Transfer |
730 | Carnegie Mellon University | |
731 | 5000 Forbes Avenue | |
732 | Pittsburgh, PA 15213-3890 | |
733 | (412) 268-4387, fax: (412) 268-7395 | |
734 | tech-transfer@andrew.cmu.edu | |
168e428f | 735 | &&& |
068aaea8 PH |
736 | /// |
737 | The need to indent that block explicitly is a pain. | |
738 | /// | |
168e428f PH |
739 | |
740 | . Redistributions of any form whatsoever must retain the following | |
741 | acknowledgment: | |
742 | + | |
068aaea8 PH |
743 | ``This product includes software developed by Computing Services |
744 | at Carnegie Mellon University (*http://www.cmu.edu/computing/[]*).'' | |
168e428f PH |
745 | + |
746 | CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO | |
747 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
748 | AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE | |
749 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
750 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | |
751 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING | |
752 | OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
753 | ||
068aaea8 PH |
754 | /// |
755 | Note, no "+" line there, because we want to terminate the inner list item | |
756 | before ending the block quote. | |
757 | /// | |
758 | + | |
759 | ++++++++++++++++++++++ | |
760 | </blockquote> | |
761 | ++++++++++++++++++++++ | |
762 | ||
763 | - cindex:[Exim monitor,acknowledgement] | |
168e428f PH |
764 | cindex:[X-windows] |
765 | cindex:[Athena] | |
766 | The Exim Monitor program, which is an X-Window application, includes | |
767 | modified versions of the Athena StripChart and TextPop widgets. | |
768 | This code is copyright by DEC and MIT, and their permission notice appears | |
769 | below, in accordance with the conditions expressed therein. | |
770 | + | |
068aaea8 PH |
771 | ++++++++++++++++++++++ |
772 | <blockquote> | |
773 | ++++++++++++++++++++++ | |
774 | + | |
168e428f PH |
775 | Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, |
776 | and the Massachusetts Institute of Technology, Cambridge, Massachusetts. | |
777 | + | |
778 | All Rights Reserved | |
779 | + | |
780 | Permission to use, copy, modify, and distribute this software and its | |
781 | documentation for any purpose and without fee is hereby granted, | |
782 | provided that the above copyright notice appear in all copies and that | |
783 | both that copyright notice and this permission notice appear in | |
784 | supporting documentation, and that the names of Digital or MIT not be | |
785 | used in advertising or publicity pertaining to distribution of the | |
786 | software without specific, written prior permission. | |
787 | + | |
788 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
789 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
790 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
791 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
792 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
793 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
794 | SOFTWARE. | |
068aaea8 PH |
795 | + |
796 | ++++++++++++++++++++++ | |
797 | </blockquote> | |
798 | ++++++++++++++++++++++ | |
168e428f | 799 | |
068aaea8 | 800 | - Many people have contributed code fragments, some large, some small, that were |
168e428f PH |
801 | not covered by any specific licence requirements. It is assumed that the |
802 | contributors are happy to see their code incoporated into Exim under the GPL. | |
803 | ||
804 | ||
805 | ||
806 | ||
807 | ||
808 | //////////////////////////////////////////////////////////////////////////// | |
809 | //////////////////////////////////////////////////////////////////////////// | |
810 | ||
811 | [titleabbrev="Receiving and delivering mail"] | |
812 | How Exim receives and delivers mail | |
813 | ----------------------------------- | |
814 | ||
815 | ||
816 | Overall philosophy | |
817 | ~~~~~~~~~~~~~~~~~~ | |
818 | cindex:[design philosophy] | |
819 | Exim is designed to work efficiently on systems that are permanently connected | |
820 | to the Internet and are handling a general mix of mail. In such circumstances, | |
821 | most messages can be delivered immediately. Consequently, Exim does not | |
822 | maintain independent queues of messages for specific domains or hosts, though | |
823 | it does try to send several messages in a single SMTP connection after a host | |
824 | has been down, and it also maintains per-host retry information. | |
825 | ||
826 | ||
827 | ||
828 | Policy control | |
829 | ~~~~~~~~~~~~~~ | |
830 | cindex:[policy control,overview] | |
831 | Policy controls are now an important feature of MTAs that are connected to the | |
832 | Internet. Perhaps their most important job is to stop MTAs being abused as | |
833 | ``open relays'' by misguided individuals who send out vast amounts of unsolicited | |
834 | junk, and want to disguise its source. Exim provides flexible facilities for | |
835 | specifying policy controls on incoming mail: | |
836 | ||
837 | - cindex:[{ACL},introduction] | |
838 | Exim 4 (unlike previous versions of Exim) implements policy controls on | |
839 | incoming mail by means of 'Access Control Lists' (ACLs). Each list is a | |
840 | series of statements that may either grant or deny access. ACLs can be used at | |
841 | several places in the SMTP dialogue while receiving a message from a remote | |
842 | host. However, the most common places are after each RCPT command, and at | |
843 | the very end of the message. The sysadmin can specify conditions for accepting | |
844 | or rejecting individual recipients or the entire message, respectively, at | |
845 | these two points (see chapter <<CHAPACL>>). Denial of access results in an SMTP | |
846 | error code. | |
847 | ||
848 | - An ACL is also available for locally generated, non-SMTP messages. In this | |
849 | case, the only available actions are to accept or deny the entire message. | |
850 | ||
851 | - When Exim is compiled with the content-scanning extension, facilities are | |
852 | provided in the ACL mechanism for passing the message to external virus and/or | |
853 | spam scanning software. The result of such a scan is passed back to the ACL, | |
854 | which can then use it to decide what to do with the message. | |
855 | ||
856 | - When a message has been received, either from a remote host or from the local | |
857 | host, but before the final acknowledgement has been sent, a locally supplied C | |
858 | function called 'local_scan()' can be run to inspect the message and decide | |
859 | whether to accept it or not (see chapter <<CHAPlocalscan>>). If the message is | |
860 | accepted, the list of recipients can be modified by the function. | |
861 | ||
862 | - Using the 'local_scan()' mechanism is another way of calling external | |
863 | scanner software. The %SA-Exim% add-on package works this way. It does not | |
864 | require Exim to be compiled with the content-scanning extension. | |
865 | ||
866 | - After a message has been accepted, a further checking mechanism is available in | |
867 | the form of the 'system filter' (see chapter <<CHAPsystemfilter>>). This runs | |
868 | at the start of every delivery process. | |
869 | ||
870 | ||
871 | ||
872 | User filters | |
873 | ~~~~~~~~~~~~ | |
874 | cindex:[filter,introduction] | |
875 | cindex:[Sieve filter] | |
876 | In a conventional Exim configuration, users are able to run private filters by | |
877 | setting up appropriate _.forward_ files in their home directories. See | |
878 | chapter <<CHAPredirect>> (about the ^redirect^ router) for the configuration | |
879 | needed to support this, and the separate document entitled 'Exim's interfaces | |
880 | to mail filtering' for user details. Two different kinds of filtering are | |
881 | available: | |
882 | ||
883 | - Sieve filters are written in the standard filtering language that is defined | |
884 | by RFC 3028. | |
885 | ||
886 | - Exim filters are written in a syntax that is unique to Exim, but which is more | |
887 | powerful than Sieve, which it pre-dates. | |
888 | ||
889 | User filters are run as part of the routing process, described below. | |
890 | ||
891 | ||
892 | ||
893 | [[SECTmessiden]] | |
894 | Message identification | |
895 | ~~~~~~~~~~~~~~~~~~~~~~ | |
896 | cindex:[message ids, details of format] | |
897 | cindex:[format,of message id] | |
898 | cindex:[id of message] | |
899 | cindex:[base62] | |
900 | cindex:[base36] | |
901 | cindex:[Darwin] | |
902 | cindex:[Cygwin] | |
903 | Every message handled by Exim is given a 'message id' which is sixteen | |
904 | characters long. It is divided into three parts, separated by hyphens, for | |
905 | example `16VDhn-0001bo-D3`. Each part is a sequence of letters and digits, | |
906 | normally encoding numbers in base 62. However, in the Darwin operating | |
907 | system (Mac OS X) and when Exim is compiled to run under Cygwin, base 36 | |
908 | (avoiding the use of lower case letters) is used instead, because the message | |
909 | id is used to construct file names, and the names of files in those systems are | |
068aaea8 | 910 | not always case-sensitive. |
168e428f PH |
911 | |
912 | cindex:[pid (process id),re-use of] | |
913 | The detail of the contents of the message id have changed as Exim has evolved. | |
914 | Earlier versions relied on the operating system not re-using a process id (pid) | |
915 | within one second. On modern operating systems, this assumption can no longer | |
916 | be made, so the algorithm had to be changed. To retain backward compatibility, | |
917 | the format of the message id was retained, which is why the following rules are | |
918 | somewhat eccentric: | |
919 | ||
920 | - The first six characters of the message id are the time at which the message | |
921 | started to be received, to a granularity of one second. That is, this field | |
922 | contains the number of seconds since the start of the epoch (the normal Unix | |
923 | way of representing the date and time of day). | |
924 | ||
925 | - After the first hyphen, the next six characters are the id of the process that | |
926 | received the message. | |
927 | ||
928 | - There are two different possibilities for the final two characters: | |
929 | ||
930 | . cindex:[%localhost_number%] | |
931 | If %localhost_number% is not set, this value is the fractional part of the | |
932 | time of reception, normally in units of 1/2000 of a second, but for systems | |
933 | that must use base 36 instead of base 62 (because of case-insensitive file | |
934 | systems), the units are 1/1000 of a second. | |
935 | ||
936 | . If %localhost_number% is set, it is multiplied by 200 (100) and added to | |
937 | the fractional part of the time, which in this case is in units of 1/200 | |
938 | (1/100) of a second. | |
939 | ||
940 | After a message has been received, Exim waits for the clock to tick at the | |
941 | appropriate resolution before proceeding, so that if another message is | |
942 | received by the same process, or by another process with the same (re-used) | |
943 | pid, it is guaranteed that the time will be different. In most cases, the clock | |
944 | will already have ticked while the message was being received. | |
945 | ||
946 | ||
947 | Receiving mail | |
948 | ~~~~~~~~~~~~~~ | |
949 | cindex:[receiving mail] | |
950 | cindex:[message,reception] | |
068aaea8 PH |
951 | The only way Exim can receive mail from another host is using SMTP over |
952 | TCP/IP, in which case the sender and recipient addresses are transferred using | |
168e428f PH |
953 | SMTP commands. However, from a locally running process (such as a user's MUA), |
954 | there are several possibilities: | |
955 | ||
956 | - If the process runs Exim with the %-bm% option, the message is read | |
957 | non-interactively (usually via a pipe), with the recipients taken from the | |
958 | command line, or from the body of the message if %-t% is also used. | |
959 | ||
960 | - If the process runs Exim with the %-bS% option, the message is also read | |
961 | non-interactively, but in this case the recipients are listed at the start of | |
962 | the message in a series of SMTP RCPT commands, terminated by a DATA | |
963 | command. This is so-called ``batch SMTP'' format, | |
964 | but it isn't really SMTP. The SMTP commands are just another way of passing | |
965 | envelope addresses in a non-interactive submission. | |
966 | ||
967 | - If the process runs Exim with the %-bs% option, the message is read | |
968 | interactively, using the SMTP protocol. A two-way pipe is normally used for | |
969 | passing data between the local process and the Exim process. | |
970 | This is ``real'' SMTP and is handled in the same way as SMTP over TCP/IP. For | |
971 | example, the ACLs for SMTP commands are used for this form of submission. | |
972 | ||
973 | - A local process may also make a TCP/IP call to the host's loopback address | |
974 | (127.0.0.1) or any other of its IP addresses. When receiving messages, Exim | |
975 | does not treat the loopback address specially. It treats all such connections | |
976 | in the same way as connections from other hosts. | |
977 | ||
978 | ||
979 | cindex:[message sender, constructed by Exim] | |
980 | cindex:[sender,constructed by Exim] | |
981 | In the three cases that do not involve TCP/IP, the sender address is | |
982 | constructed from the login name of the user that called Exim and a default | |
983 | qualification domain (which can be set by the %qualify_domain% configuration | |
984 | option). For local or batch SMTP, a sender address that is passed using the | |
985 | SMTP MAIL command is ignored. However, the system administrator may allow | |
986 | certain users (``trusted users'') to specify a different sender address | |
987 | unconditionally, or all users to specify certain forms of different sender | |
988 | address. The %-f% option or the SMTP MAIL command is used to specify these | |
989 | different addresses. See section <<SECTtrustedadmin>> for details of trusted | |
990 | users, and the %untrusted_set_sender% option for a way of allowing untrusted | |
991 | users to change sender addresses. | |
992 | ||
993 | Messages received by either of the non-interactive mechanisms are subject to | |
994 | checking by the non-SMTP ACL, if one is defined. Messages received using SMTP | |
995 | (either over TCP/IP, or interacting with a local process) can be checked by a | |
996 | number of ACLs that operate at different times during the SMTP session. Either | |
997 | individual recipients, or the entire message, can be rejected if local policy | |
998 | requirements are not met. The 'local_scan()' function (see chapter | |
999 | <<CHAPlocalscan>>) is run for all incoming messages. | |
1000 | ||
1001 | Exim can be configured not to start a delivery process when a message is | |
1002 | received; this can be unconditional, or depend on the number of incoming SMTP | |
1003 | connections or the system load. In these situations, new messages wait on the | |
1004 | queue until a queue runner process picks them up. However, in standard | |
1005 | configurations under normal conditions, delivery is started as soon as a | |
1006 | message is received. | |
1007 | ||
1008 | ||
1009 | ||
1010 | ||
1011 | ||
1012 | Handling an incoming message | |
1013 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1014 | cindex:[spool directory,files that hold a message] | |
1015 | cindex:[file,how a message is held] | |
1016 | When Exim accepts a message, it writes two files in its spool directory. The | |
1017 | first contains the envelope information, the current status of the message, and | |
1018 | the header lines, and the second contains the body of the message. The names of | |
1019 | the two spool files consist of the message id, followed by `-H` for the | |
1020 | file containing the envelope and header, and `-D` for the data file. | |
1021 | ||
1022 | cindex:[spool directory,_input_ sub-directory] | |
1023 | By default all these message files are held in a single directory called | |
1024 | _input_ inside the general Exim spool directory. Some operating systems do | |
1025 | not perform very well if the number of files in a directory gets very large; to | |
1026 | improve performance in such cases, the %split_spool_directory% option can be | |
1027 | used. This causes Exim to split up the input files into 62 sub-directories | |
1028 | whose names are single letters or digits. | |
1029 | ||
1030 | The envelope information consists of the address of the message's sender and | |
1031 | the addresses of the recipients. This information is entirely separate from | |
1032 | any addresses contained in the header lines. The status of the message includes | |
1033 | a list of recipients who have already received the message. The format of the | |
1034 | first spool file is described in chapter <<CHAPspool>>. | |
1035 | ||
1036 | cindex:[rewriting,addresses] | |
1037 | Address rewriting that is specified in the rewrite section of the configuration | |
1038 | (see chapter <<CHAPrewrite>>) is done once and for all on incoming addresses, | |
1039 | both in the header lines and the envelope, at the time the message is accepted. | |
1040 | If during the course of delivery additional addresses are generated (for | |
1041 | example, via aliasing), these new addresses are rewritten as soon as they are | |
1042 | generated. At the time a message is actually delivered (transported) further | |
1043 | rewriting can take place; because this is a transport option, it can be | |
1044 | different for different forms of delivery. It is also possible to specify the | |
1045 | addition or removal of certain header lines at the time the message is | |
1046 | delivered (see chapters <<CHAProutergeneric>> and <<CHAPtransportgeneric>>). | |
1047 | ||
1048 | ||
1049 | ||
1050 | Life of a message | |
1051 | ~~~~~~~~~~~~~~~~~ | |
1052 | cindex:[message,life of] | |
1053 | cindex:[message,frozen] | |
1054 | A message remains in the spool directory until it is completely delivered to | |
1055 | its recipients or to an error address, or until it is deleted by an | |
1056 | administrator or by the user who originally created it. In cases when delivery | |
1057 | cannot proceed -- for example, when a message can neither be delivered to its | |
1058 | recipients nor returned to its sender, the message is marked ``frozen'' on the | |
1059 | spool, and no more deliveries are attempted. | |
1060 | ||
1061 | cindex:[frozen messages,thawing] | |
1062 | cindex:[message,thawing frozen] | |
1063 | An administrator can ``thaw'' such messages when the problem has been corrected, | |
1064 | and can also freeze individual messages by hand if necessary. In addition, an | |
1065 | administrator can force a delivery error, causing a bounce message to be sent. | |
1066 | ||
068aaea8 | 1067 | [revisionflag="changed"] |
168e428f | 1068 | cindex:[%timeout_frozen_after%] |
068aaea8 PH |
1069 | cindex:[%ignore_bounce_errors_after%] |
1070 | There are options called %ignore_bounce_errors_after% and | |
1071 | %timeout_frozen_after%, which discard frozen messages after a certain time. | |
1072 | The first applies only to frozen bounces, the second to any frozen messages. | |
168e428f PH |
1073 | |
1074 | cindex:[message,log file for] | |
1075 | cindex:[log,file for each message] | |
1076 | While Exim is working on a message, it writes information about each delivery | |
068aaea8 | 1077 | attempt to its main log file. This includes successful, unsuccessful, and |
168e428f PH |
1078 | delayed deliveries for each recipient (see chapter <<CHAPlog>>). The log lines |
1079 | are also written to a separate 'message log' file for each message. These | |
1080 | logs are solely for the benefit of the administrator, and are normally deleted | |
1081 | along with the spool files when processing of a message is complete. | |
1082 | The use of individual message logs can be disabled by setting | |
1083 | %no_message_logs%; this might give an improvement in performance on very | |
1084 | busy systems. | |
1085 | ||
1086 | cindex:[journal file] | |
1087 | cindex:[file,journal] | |
1088 | All the information Exim itself needs to set up a delivery is kept in the first | |
1089 | spool file, along with the header lines. When a successful delivery occurs, the | |
1090 | address is immediately written at the end of a journal file, whose name is the | |
1091 | message id followed by `-J`. At the end of a delivery run, if there are some | |
1092 | addresses left to be tried again later, the first spool file (the `-H` file) | |
1093 | is updated to indicate which these are, and the journal file is then deleted. | |
1094 | Updating the spool file is done by writing a new file and renaming it, to | |
1095 | minimize the possibility of data loss. | |
1096 | ||
1097 | Should the system or the program crash after a successful delivery but before | |
1098 | the spool file has been updated, the journal is left lying around. The next | |
1099 | time Exim attempts to deliver the message, it reads the journal file and | |
1100 | updates the spool file before proceeding. This minimizes the chances of double | |
1101 | deliveries caused by crashes. | |
1102 | ||
1103 | ||
1104 | ||
1105 | [[SECTprocaddress]] | |
1106 | Processing an address for delivery | |
1107 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1108 | cindex:[drivers,definition of] | |
1109 | cindex:[router,definition of] | |
1110 | cindex:[transport,definition of] | |
1111 | The main delivery processing elements of Exim are called 'routers' and | |
1112 | 'transports', and collectively these are known as 'drivers'. Code for a | |
1113 | number of them is provided in the source distribution, and compile-time options | |
1114 | specify which ones are included in the binary. Run time options specify which | |
1115 | ones are actually used for delivering messages. | |
1116 | ||
1117 | cindex:[drivers,instance definition] | |
1118 | Each driver that is specified in the run time configuration is an 'instance' | |
1119 | of that particular driver type. Multiple instances are allowed; for example, | |
1120 | you can set up several different ^smtp^ transports, each with different | |
1121 | option values that might specify different ports or different timeouts. Each | |
1122 | instance has its own identifying name. In what follows we will normally use the | |
1123 | instance name when discussing one particular instance (that is, one specific | |
1124 | configuration of the driver), and the generic driver name when discussing | |
1125 | the driver's features in general. | |
1126 | ||
1127 | A 'router' is a driver that operates on an address, either determining how | |
068aaea8 | 1128 | its delivery should happen, by assigning it to a specific transport, or |
168e428f PH |
1129 | converting the address into one or more new addresses (for example, via an |
1130 | alias file). A router may also explicitly choose to fail an address, causing it | |
1131 | to be bounced. | |
1132 | ||
1133 | A 'transport' is a driver that transmits a copy of the message from Exim's | |
1134 | spool to some destination. There are two kinds of transport: for a 'local' | |
1135 | transport, the destination is a file or a pipe on the local host, whereas for a | |
1136 | 'remote' transport the destination is some other host. A message is passed | |
1137 | to a specific transport as a result of successful routing. If a message has | |
1138 | several recipients, it may be passed to a number of different transports. | |
1139 | ||
1140 | cindex:[preconditions,definition of] | |
1141 | An address is processed by passing it to each configured router instance in | |
1142 | turn, subject to certain preconditions, until a router accepts the address or | |
1143 | specifies that it should be bounced. We will describe this process in more | |
068aaea8 PH |
1144 | detail shortly. First, as a simple example, we consider how each recipient |
1145 | address in a message is processed in a small configuration of three routers. | |
168e428f | 1146 | |
068aaea8 | 1147 | To make this a more concrete example, it is described in terms of some actual |
168e428f PH |
1148 | routers, but remember, this is only an example. You can configure Exim's |
1149 | routers in many different ways, and there may be any number of routers in a | |
1150 | configuration. | |
1151 | ||
1152 | The first router that is specified in a configuration is often one that handles | |
1153 | addresses in domains that are not recognized specially by the local host. These | |
1154 | are typically addresses for arbitrary domains on the Internet. A precondition | |
1155 | is set up which looks for the special domains known to the host (for example, | |
1156 | its own domain name), and the router is run for addresses that do 'not' | |
1157 | match. Typically, this is a router that looks up domains in the DNS in order to | |
1158 | find the hosts to which this address routes. If it succeeds, the address is | |
068aaea8 | 1159 | assigned to a suitable SMTP transport; if it does not succeed, the router is |
168e428f PH |
1160 | configured to fail the address. |
1161 | ||
068aaea8 PH |
1162 | The second router is reached only when the domain is recognized as one that |
1163 | ``belongs'' to the local host. This router does redirection -- also known as | |
1164 | aliasing and forwarding. When it generates one or more new addresses from the | |
1165 | original, each of them is routed independently from the start. Otherwise, the | |
1166 | router may cause an address to fail, or it may simply decline to handle the | |
1167 | address, in which case the address is passed to the next router. | |
168e428f PH |
1168 | |
1169 | The final router in many configurations is one that checks to see if the | |
1170 | address belongs to a local mailbox. The precondition may involve a check to | |
1171 | see if the local part is the name of a login account, or it may look up the | |
1172 | local part in a file or a database. If its preconditions are not met, or if | |
1173 | the router declines, we have reached the end of the routers. When this happens, | |
1174 | the address is bounced. | |
1175 | ||
1176 | ||
1177 | ||
1178 | Processing an address for verification | |
1179 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1180 | cindex:[router,for verification] | |
1181 | cindex:[verifying address, overview] | |
1182 | As well as being used to decide how to deliver to an address, Exim's routers | |
1183 | are also used for 'address verification'. Verification can be requested as | |
1184 | one of the checks to be performed in an ACL for incoming messages, on both | |
1185 | sender and recipient addresses, and it can be tested using the %-bv% and | |
1186 | %-bvs% command line options. | |
1187 | ||
1188 | When an address is being verified, the routers are run in ``verify mode''. This | |
1189 | does not affect the way the routers work, but it is a state that can be | |
1190 | detected. By this means, a router can be skipped or made to behave differently | |
1191 | when verifying. A common example is a configuration in which the first router | |
1192 | sends all messages to a message-scanning program, unless they have been | |
1193 | previously scanned. Thus, the first router accepts all addresses without any | |
1194 | checking, making it useless for verifying. Normally, the %no_verify% option | |
1195 | would be set for such a router, causing it to be skipped in verify mode. | |
1196 | ||
1197 | ||
1198 | ||
1199 | ||
1200 | [[SECTrunindrou]] | |
1201 | Running an individual router | |
1202 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1203 | cindex:[router,running details] | |
1204 | cindex:[preconditions,checking] | |
1205 | cindex:[router,result of running] | |
1206 | As explained in the example above, a number of preconditions are checked before | |
1207 | running a router. If any are not met, the router is skipped, and the address is | |
1208 | passed to the next router. When all the preconditions on a router 'are' met, | |
1209 | the router is run. What happens next depends on the outcome, which is one of | |
1210 | the following: | |
1211 | ||
068aaea8 | 1212 | - 'accept': The router accepts the address, and either assigns it to a |
168e428f PH |
1213 | transport, or generates one or more ``child'' addresses. Processing the original |
1214 | address ceases, | |
1215 | cindex:[%unseen% option] | |
1216 | unless the %unseen% option is set on the router. This option | |
1217 | can be used to set up multiple deliveries with different routing (for example, | |
1218 | for keeping archive copies of messages). When %unseen% is set, the address is | |
1219 | passed to the next router. Normally, however, an 'accept' return marks the | |
1220 | end of routing. | |
1221 | + | |
068aaea8 PH |
1222 | Any child addresses generated by the router are processed independently, |
1223 | starting with the first router by default. It is possible to change this by | |
1224 | setting the %redirect_router% option to specify which router to start at for | |
1225 | child addresses. Unlike %pass_router% (see below) the router specified by | |
168e428f PH |
1226 | %redirect_router% may be anywhere in the router configuration. |
1227 | ||
1228 | - 'pass': The router recognizes the address, but cannot handle it itself. It | |
1229 | requests that the address be passed to another router. By default the address | |
1230 | is passed to the next router, but this can be changed by setting the | |
1231 | %pass_router% option. However, (unlike %redirect_router%) the named router | |
1232 | must be below the current router (to avoid loops). | |
1233 | ||
1234 | - 'decline': The router declines to accept the address because it does not | |
1235 | recognize it at all. By default, the address is passed to the next router, but | |
1236 | this can be prevented by setting the %no_more% option. When %no_more% is set, | |
068aaea8 PH |
1237 | all the remaining routers are skipped. In effect, %no_more% converts 'decline' |
1238 | into 'fail'. | |
168e428f PH |
1239 | |
1240 | - 'fail': The router determines that the address should fail, and queues it for | |
1241 | the generation of a bounce message. There is no further processing of the | |
1242 | original address unless %unseen% is set on the router. | |
1243 | ||
068aaea8 PH |
1244 | - 'defer': The router cannot handle the address at the present time. (A |
1245 | database may be offline, or a DNS lookup may have timed out.) No further | |
1246 | processing of the address happens in this delivery attempt. It is tried again | |
1247 | next time the message is considered for delivery. | |
168e428f PH |
1248 | |
1249 | - 'error': There is some error in the router (for example, a syntax error in | |
1250 | its configuration). The action is as for defer. | |
1251 | ||
1252 | If an address reaches the end of the routers without having been accepted by | |
068aaea8 PH |
1253 | any of them, it is bounced as unrouteable. The default error message in this |
1254 | situation is ``unrouteable address'', but you can set your own message by | |
1255 | making use of the %cannot_route_message% option. This can be set for any | |
1256 | router; the value from the last router that ``saw'' the address is used. | |
168e428f PH |
1257 | |
1258 | Sometimes while routing you want to fail a delivery when some conditions are | |
1259 | met but others are not, instead of passing the address on for further routing. | |
1260 | You can do this by having a second router that explicitly fails the delivery | |
1261 | when the relevant conditions are met. The ^redirect^ router has a ``fail'' | |
1262 | facility for this purpose. | |
1263 | ||
1264 | ||
068aaea8 PH |
1265 | Duplicate addresses |
1266 | ~~~~~~~~~~~~~~~~~~~ | |
1267 | ||
1268 | [revisionflag="changed"] | |
1269 | cindex:[case of local parts] | |
1270 | cindex:[address duplicate, discarding] | |
1271 | Once routing is complete, Exim scans the addresses that are assigned to local | |
1272 | and remote transports, and discards any duplicates that it finds. During this | |
1273 | check, local parts are treated as case-sensitive. | |
1274 | ||
168e428f PH |
1275 | |
1276 | ||
1277 | [[SECTrouprecon]] | |
1278 | Router preconditions | |
1279 | ~~~~~~~~~~~~~~~~~~~~ | |
1280 | cindex:[router preconditions, order of processing] | |
1281 | cindex:[preconditions,order of processing] | |
1282 | The preconditions that are tested for each router are listed below, in the | |
1283 | order in which they are tested. The individual configuration options are | |
1284 | described in more detail in chapter <<CHAProutergeneric>>. | |
1285 | ||
1286 | - The %local_part_prefix% and %local_part_suffix% options can specify that | |
1287 | the local parts handled by the router may or must have certain prefixes and/or | |
1288 | suffixes. If a mandatory affix (prefix or suffix) is not present, the router is | |
1289 | skipped. These conditions are tested first. When an affix is present, it is | |
1290 | removed from the local part before further processing, including the evaluation | |
1291 | of any other conditions. | |
1292 | ||
1293 | - Routers can be designated for use only when not verifying an address, that is, | |
1294 | only when routing it for delivery (or testing its delivery routing). If the | |
1295 | %verify% option is set false, the router is skipped when Exim is verifying an | |
1296 | address. | |
1297 | Setting the %verify% option actually sets two options, %verify_sender% and | |
1298 | %verify_recipient%, which independently control the use of the router for | |
1299 | sender and recipient verification. You can set these options directly if | |
1300 | you want a router to be used for only one type of verification. | |
1301 | ||
1302 | - If the %address_test% option is set false, the router is skipped when Exim is | |
1303 | run with the %-bt% option to test an address routing. This can be helpful when | |
1304 | the first router sends all new messages to a scanner of some sort; it makes it | |
1305 | possible to use %-bt% to test subsequent delivery routing without having to | |
1306 | simulate the effect of the scanner. | |
1307 | ||
1308 | - Routers can be designated for use only when verifying an address, as | |
1309 | opposed to routing it for delivery. The %verify_only% option controls this. | |
1310 | ||
068aaea8 PH |
1311 | - Individual routers can be explicitly skipped when running the routers to |
1312 | check an address given in the SMTP EXPN command (see the %expn% option). | |
168e428f | 1313 | |
068aaea8 PH |
1314 | - If the %domains% option is set, the domain of the address must be in the set |
1315 | of domains that it defines. | |
168e428f | 1316 | |
068aaea8 PH |
1317 | - cindex:[$local_part_prefix$] |
1318 | cindex:[$local_part$] | |
1319 | cindex:[$local_part_suffix$] | |
1320 | If the %local_parts% option is set, the local part of the address must be in | |
168e428f PH |
1321 | the set of local parts that it defines. If %local_part_prefix% or |
1322 | %local_part_suffix% is in use, the prefix or suffix is removed from the local | |
1323 | part before this check. If you want to do precondition tests on local parts | |
1324 | that include affixes, you can do so by using a %condition% option (see below) | |
1325 | that uses the variables $local_part$, $local_part_prefix$, and | |
1326 | $local_part_suffix$ as necessary. | |
1327 | ||
068aaea8 PH |
1328 | - cindex:[$local_user_uid$] |
1329 | cindex:[$local_user_gid$] | |
1330 | cindex:[$home$] | |
1331 | If the %check_local_user% option is set, the local part must be the name of | |
1332 | an account on the local host. If this check succeeds, the uid and gid of the | |
1333 | local user are placed in $local_user_uid$ and $local_user_gid$ and the user's | |
1334 | home directory is placed in $home$; these values can be used in the remaining | |
1335 | preconditions. | |
168e428f PH |
1336 | |
1337 | - If the %router_home_directory% option is set, it is expanded at this point, | |
1338 | because it overrides the value of $home$. If this expansion were left till | |
1339 | later, the value of $home$ as set by %check_local_user% would be used in | |
1340 | subsequent tests. Having two different values of $home$ in the same router | |
1341 | could lead to confusion. | |
1342 | ||
1343 | - If the %senders% option is set, the envelope sender address must be in the set | |
1344 | of addresses that it defines. | |
1345 | ||
1346 | - If the %require_files% option is set, the existence or non-existence of | |
1347 | specified files is tested. | |
1348 | ||
1349 | - cindex:[customizing,precondition] | |
1350 | If the %condition% option is set, it is evaluated and tested. This option uses | |
1351 | an expanded string to allow you to set up your own custom preconditions. | |
1352 | Expanded strings are described in chapter <<CHAPexpand>>. | |
1353 | ||
1354 | ||
1355 | Note that %require_files% comes near the end of the list, so you cannot use it | |
1356 | to check for the existence of a file in which to lookup up a domain, local | |
1357 | part, or sender. However, as these options are all expanded, you can use the | |
1358 | %exists% expansion condition to make such tests within each condition. The | |
1359 | %require_files% option is intended for checking files that the router may be | |
1360 | going to use internally, or which are needed by a specific transport (for | |
1361 | example, _.procmailrc_). | |
1362 | ||
1363 | ||
1364 | ||
1365 | Delivery in detail | |
1366 | ~~~~~~~~~~~~~~~~~~ | |
1367 | cindex:[delivery,in detail] | |
1368 | When a message is to be delivered, the sequence of events is as follows: | |
1369 | ||
1370 | - If a system-wide filter file is specified, the message is passed to it. The | |
1371 | filter may add recipients to the message, replace the recipients, discard the | |
1372 | message, cause a new message to be generated, or cause the message delivery to | |
1373 | fail. The format of the system filter file is the same as for Exim user filter | |
1374 | files, described in the separate document entitled | |
1375 | 'Exim's interfaces to mail filtering'. | |
1376 | cindex:[Sieve filter,not available for system filter] | |
1377 | (*Note*: Sieve cannot be used for system filter files.) | |
1378 | + | |
1379 | Some additional features are available in system filters -- see chapter | |
1380 | <<CHAPsystemfilter>> for details. Note that a message is passed to the system | |
1381 | filter only once per delivery attempt, however many recipients it has. However, | |
1382 | if there are several delivery attempts because one or more addresses could not | |
1383 | be immediately delivered, the system filter is run each time. The filter | |
1384 | condition %first_delivery% can be used to detect the first run of the system | |
1385 | filter. | |
1386 | ||
1387 | - Each recipient address is offered to each configured router in turn, subject | |
1388 | to its preconditions, until one is able to handle it. If no router can handle | |
1389 | the address, that is, if they all decline, the address is failed. Because | |
1390 | routers can be targeted at particular domains, several locally handled domains | |
1391 | can be processed entirely independently of each other. | |
1392 | ||
1393 | - cindex:[routing,loops in] | |
1394 | cindex:[loop,while routing] | |
068aaea8 PH |
1395 | A router that accepts an address may assign it to a local or a remote transport. However, the transport is not run at this time. Instead, the address is |
1396 | placed on a list for the particular transport, which will be run later. | |
1397 | Alternatively, the router may generate one or more new addresses (typically | |
1398 | from alias, forward, or filter files). New addresses are fed back into this | |
1399 | process from the top, but in order to avoid loops, a router ignores any address | |
1400 | which has an identically-named ancestor that was processed by itself. | |
168e428f PH |
1401 | |
1402 | - When all the routing has been done, addresses that have been successfully | |
1403 | handled are passed to their assigned transports. When local transports are | |
1404 | doing real local deliveries, they handle only one address at a time, but if a | |
1405 | local transport is being used as a pseudo-remote transport (for example, to | |
1406 | collect batched SMTP messages for transmission by some other means) multiple | |
1407 | addresses can be handled. Remote transports can always handle more than one | |
1408 | address at a time, but can be configured not to do so, or to restrict multiple | |
1409 | addresses to the same domain. | |
1410 | ||
1411 | - Each local delivery to a file or a pipe runs in a separate process under a | |
1412 | non-privileged uid, and these deliveries are run one at a time. Remote | |
1413 | deliveries also run in separate processes, normally under a uid that is private | |
1414 | to Exim (``the Exim user''), but in this case, several remote deliveries can be | |
1415 | run in parallel. The maximum number of simultaneous remote deliveries for any | |
1416 | one message is set by the %remote_max_parallel% option. | |
1417 | The order in which deliveries are done is not defined, except that all local | |
1418 | deliveries happen before any remote deliveries. | |
1419 | ||
1420 | - cindex:[queue runner] | |
1421 | When it encounters a local delivery during a queue run, Exim checks its retry | |
1422 | database to see if there has been a previous temporary delivery failure for the | |
1423 | address before running the local transport. If there was a previous failure, | |
1424 | Exim does not attempt a new delivery until the retry time for the address is | |
1425 | reached. However, this happens only for delivery attempts that are part of a | |
1426 | queue run. Local deliveries are always attempted when delivery immediately | |
1427 | follows message reception, even if retry times are set for them. This makes for | |
1428 | better behaviour if one particular message is causing problems (for example, | |
1429 | causing quota overflow, or provoking an error in a filter file). | |
1430 | ||
1431 | - cindex:[delivery,retry in remote transports] | |
1432 | Remote transports do their own retry handling, since an address may be | |
1433 | deliverable to one of a number of hosts, each of which may have a different | |
1434 | retry time. If there have been previous temporary failures and no host has | |
1435 | reached its retry time, no delivery is attempted, whether in a queue run or | |
1436 | not. See chapter <<CHAPretry>> for details of retry strategies. | |
1437 | ||
1438 | - If there were any permanent errors, a bounce message is returned to an | |
1439 | appropriate address (the sender in the common case), with details of the error | |
1440 | for each failing address. Exim can be configured to send copies of bounce | |
1441 | messages to other addresses. | |
1442 | ||
1443 | - cindex:[delivery,deferral] | |
1444 | If one or more addresses suffered a temporary failure, the message is left on | |
1445 | the queue, to be tried again later. Delivery of these addresses is said to be | |
1446 | 'deferred'. | |
1447 | ||
1448 | - When all the recipient addresses have either been delivered or bounced, | |
1449 | handling of the message is complete. The spool files and message log are | |
1450 | deleted, though the message log can optionally be preserved if required. | |
1451 | ||
1452 | ||
1453 | ||
1454 | ||
1455 | Retry mechanism | |
1456 | ~~~~~~~~~~~~~~~ | |
1457 | cindex:[delivery,retry mechanism] | |
1458 | cindex:[retry,description of mechanism] | |
1459 | cindex:[queue runner] | |
1460 | Exim's mechanism for retrying messages that fail to get delivered at the first | |
1461 | attempt is the queue runner process. You must either run an Exim daemon that | |
1462 | uses the %-q% option with a time interval to start queue runners at regular | |
1463 | intervals, or use some other means (such as 'cron') to start them. If you do | |
1464 | not arrange for queue runners to be run, messages that fail temporarily at the | |
1465 | first attempt will remain on your queue for ever. A queue runner process works | |
068aaea8 | 1466 | its way through the queue, one message at a time, trying each delivery that has |
168e428f PH |
1467 | passed its retry time. |
1468 | You can run several queue runners at once. | |
1469 | ||
1470 | Exim uses a set of configured rules to determine when next to retry the failing | |
1471 | address (see chapter <<CHAPretry>>). These rules also specify when Exim should | |
1472 | give up trying to deliver to the address, at which point it generates a bounce | |
1473 | message. If no retry rules are set for a particular host, address, and error | |
1474 | combination, no retries are attempted, and temporary errors are treated as | |
1475 | permanent. | |
1476 | ||
1477 | ||
1478 | ||
1479 | Temporary delivery failure | |
1480 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1481 | cindex:[delivery,temporary failure] | |
1482 | There are many reasons why a message may not be immediately deliverable to a | |
1483 | particular address. Failure to connect to a remote machine (because it, or the | |
1484 | connection to it, is down) is one of the most common. Temporary failures may be | |
1485 | detected during routing as well as during the transport stage of delivery. | |
1486 | Local deliveries may be delayed if NFS files are unavailable, or if a mailbox | |
1487 | is on a file system where the user is over quota. Exim can be configured to | |
1488 | impose its own quotas on local mailboxes; where system quotas are set they will | |
1489 | also apply. | |
1490 | ||
1491 | If a host is unreachable for a period of time, a number of messages may be | |
1492 | waiting for it by the time it recovers, and sending them in a single SMTP | |
1493 | connection is clearly beneficial. Whenever a delivery to a remote host is | |
1494 | deferred, | |
1495 | ||
1496 | cindex:[hints database] | |
1497 | Exim makes a note in its hints database, and whenever a successful | |
1498 | SMTP delivery has happened, it looks to see if any other messages are waiting | |
1499 | for the same host. If any are found, they are sent over the same SMTP | |
1500 | connection, subject to a configuration limit as to the maximum number in any | |
1501 | one connection. | |
1502 | ||
1503 | ||
1504 | ||
1505 | ||
1506 | Permanent delivery failure | |
1507 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1508 | cindex:[delivery,permanent failure] | |
1509 | cindex:[bounce message,when generated] | |
1510 | When a message cannot be delivered to some or all of its intended recipients, a | |
1511 | bounce message is generated. Temporary delivery failures turn into permanent | |
1512 | errors when their timeout expires. All the addresses that fail in a given | |
1513 | delivery attempt are listed in a single message. If the original message has | |
1514 | many recipients, it is possible for some addresses to fail in one delivery | |
1515 | attempt and others to fail subsequently, giving rise to more than one bounce | |
1516 | message. The wording of bounce messages can be customized by the administrator. | |
1517 | See chapter <<CHAPemsgcust>> for details. | |
1518 | ||
1519 | cindex:['X-Failed-Recipients:' header line] | |
1520 | Bounce messages contain an 'X-Failed-Recipients:' header line that lists the | |
1521 | failed addresses, for the benefit of programs that try to analyse such messages | |
1522 | automatically. | |
1523 | ||
1524 | cindex:[bounce message,recipient of] | |
1525 | A bounce message is normally sent to the sender of the original message, as | |
1526 | obtained from the message's envelope. For incoming SMTP messages, this is the | |
1527 | address given in the MAIL command. However, when an address is | |
1528 | expanded via a forward or alias file, an alternative address can be specified | |
1529 | for delivery failures of the generated addresses. For a mailing list expansion | |
1530 | (see section <<SECTmailinglists>>) it is common to direct bounce messages to the | |
1531 | manager of the list. | |
1532 | ||
1533 | ||
1534 | ||
1535 | ||
1536 | Failures to deliver bounce messages | |
1537 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1538 | cindex:[bounce message,failure to deliver] | |
1539 | If a bounce message (either locally generated or received from a remote host) | |
1540 | itself suffers a permanent delivery failure, the message is left on the queue, | |
1541 | but it is frozen, awaiting the attention of an administrator. There are options | |
068aaea8 | 1542 | that can be used to make Exim discard such failed messages, or to keep them |
168e428f PH |
1543 | for only a short time (see %timeout_frozen_after% and |
1544 | %ignore_bounce_errors_after%). | |
1545 | ||
1546 | ||
1547 | ||
1548 | ||
1549 | ||
1550 | //////////////////////////////////////////////////////////////////////////// | |
1551 | //////////////////////////////////////////////////////////////////////////// | |
1552 | ||
1553 | Building and installing Exim | |
1554 | ---------------------------- | |
1555 | ||
1556 | cindex:[building Exim] | |
1557 | ||
1558 | Unpacking | |
1559 | ~~~~~~~~~ | |
1560 | Exim is distributed as a gzipped or bzipped tar file which, when upacked, | |
1561 | creates a directory with the name of the current release (for example, | |
1562 | _exim-{version}_) into which the following files are placed: | |
1563 | ||
1564 | [frame="none"] | |
1565 | `--------------------`-------------------------------------------------------- | |
1566 | _ACKNOWLEDGMENTS_ contains some acknowledgments | |
1567 | _CHANGES_ contains a reference to where changes are documented | |
1568 | _LICENCE_ the GNU General Public Licence | |
1569 | _Makefile_ top-level make file | |
1570 | _NOTICE_ conditions for the use of Exim | |
1571 | _README_ list of files, directories and simple build instructions | |
1572 | ------------------------------------------------------------------------------ | |
1573 | ||
1574 | Other files whose names begin with _README_ may also be present. The | |
1575 | following subdirectories are created: | |
1576 | ||
1577 | [frame="none"] | |
1578 | `--------------------`------------------------------------------------ | |
1579 | _Local_ an empty directory for local configuration files | |
1580 | _OS_ OS-specific files | |
1581 | _doc_ documentation files | |
1582 | _exim_monitor_ source files for the Exim monitor | |
1583 | _scripts_ scripts used in the build process | |
1584 | _src_ remaining source files | |
1585 | _util_ independent utilities | |
1586 | ---------------------------------------------------------------------- | |
1587 | ||
1588 | The main utility programs are contained in the _src_ directory, and are built | |
1589 | with the Exim binary. The _util_ directory contains a few optional scripts | |
1590 | that may be useful to some sites. | |
1591 | ||
1592 | ||
1593 | Multiple machine architectures and operating systems | |
1594 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1595 | cindex:[building Exim,multiple OS/architectures] | |
1596 | The building process for Exim is arranged to make it easy to build binaries for | |
1597 | a number of different architectures and operating systems from the same set of | |
1598 | source files. Compilation does not take place in the _src_ directory. Instead, | |
1599 | a 'build directory' is created for each architecture and operating system. | |
1600 | ||
1601 | cindex:[symbolic link,to build directory] | |
1602 | Symbolic links to the sources are installed in this directory, which is where | |
1603 | the actual building takes place. | |
1604 | ||
1605 | In most cases, Exim can discover the machine architecture and operating system | |
1606 | for itself, but the defaults can be overridden if necessary. | |
1607 | ||
1608 | ||
1609 | [[SECTdb]] | |
1610 | DBM libraries | |
1611 | ~~~~~~~~~~~~~ | |
1612 | cindex:[DBM libraries, discussion of] | |
1613 | cindex:[hints database,DBM files used for] | |
1614 | Even if you do not use any DBM files in your configuration, Exim still needs a | |
1615 | DBM library in order to operate, because it uses indexed files for its hints | |
1616 | databases. Unfortunately, there are a number of DBM libraries in existence, and | |
1617 | different operating systems often have different ones installed. | |
1618 | ||
1619 | cindex:[Solaris,DBM library for] | |
1620 | cindex:[IRIX, DBM library for] | |
1621 | cindex:[BSD, DBM library for] | |
1622 | cindex:[Linux, DBM library for] | |
1623 | If you are using Solaris, IRIX, one of the modern BSD systems, or a modern | |
1624 | Linux distribution, the DBM configuration should happen automatically, and you | |
1625 | may be able to ignore this section. Otherwise, you may have to learn more than | |
1626 | you would like about DBM libraries from what follows. | |
1627 | ||
1628 | cindex:['ndbm' DBM library] | |
1629 | Licensed versions of Unix normally contain a library of DBM functions operating | |
1630 | via the 'ndbm' interface, and this is what Exim expects by default. Free | |
1631 | versions of Unix seem to vary in what they contain as standard. In particular, | |
1632 | some early versions of Linux have no default DBM library, and different | |
1633 | distributors have chosen to bundle different libraries with their packaged | |
1634 | versions. However, the more recent releases seem to have standardised on the | |
1635 | Berkeley DB library. | |
1636 | ||
1637 | Different DBM libraries have different conventions for naming the files they | |
1638 | use. When a program opens a file called _dbmfile_, there are four | |
1639 | possibilities: | |
1640 | ||
1641 | . A traditional 'ndbm' implementation, such as that supplied as part of | |
1642 | Solaris, operates on two files called _dbmfile.dir_ and _dbmfile.pag_. | |
1643 | ||
1644 | . cindex:['gdbm' DBM library] | |
1645 | The GNU library, 'gdbm', operates on a single file. If used via its 'ndbm' | |
1646 | compatibility interface it makes two different hard links to it with names | |
1647 | _dbmfile.dir_ and _dbmfile.pag_, but if used via its native interface, the | |
1648 | file name is used unmodified. | |
1649 | ||
1650 | . cindex:[Berkeley DB library] | |
1651 | The Berkeley DB package, if called via its 'ndbm' compatibility interface, | |
1652 | operates on a single file called _dbmfile.db_, but otherwise looks to the | |
1653 | programmer exactly the same as the traditional 'ndbm' implementation. | |
1654 | ||
1655 | . If the Berkeley package is used in its native mode, it operates on a single | |
1656 | file called _dbmfile_; the programmer's interface is somewhat different to | |
1657 | the traditional 'ndbm' interface. | |
1658 | ||
1659 | . To complicate things further, there are several very different versions of the | |
1660 | Berkeley DB package. Version 1.85 was stable for a very long time, releases | |
1661 | 2.'x' and 3.'x' were current for a while, but the latest versions are now | |
1662 | numbered 4.'x'. Maintenance of some of the earlier releases has ceased. All | |
1663 | versions of Berkeley DB can be obtained from | |
1664 | + | |
1665 | &&& | |
1666 | *http://www.sleepycat.com/[]* | |
1667 | &&& | |
1668 | ||
1669 | . cindex:['tdb' DBM library] | |
1670 | Yet another DBM library, called 'tdb', has become available from | |
1671 | + | |
1672 | &&& | |
1673 | *http://download.sourceforge.net/tdb[]* | |
1674 | &&& | |
1675 | + | |
1676 | It has its own interface, and also operates on a single file. | |
1677 | ||
1678 | cindex:[USE_DB] | |
1679 | cindex:[DBM libraries, configuration for building] | |
1680 | Exim and its utilities can be compiled to use any of these interfaces. In order | |
1681 | to use any version of the Berkeley DB package in native mode, you must set | |
1682 | USE_DB in an appropriate configuration file (typically | |
1683 | _Local/Makefile_). For example: | |
1684 | ||
1685 | USE_DB=yes | |
1686 | ||
1687 | Similarly, for gdbm you set USE_GDBM, and for tdb you set USE_TDB. An | |
1688 | error is diagnosed if you set more than one of these. | |
1689 | ||
1690 | At the lowest level, the build-time configuration sets none of these options, | |
1691 | thereby assuming an interface of type (1). However, some operating system | |
1692 | configuration files (for example, those for the BSD operating systems and | |
1693 | Linux) assume type (4) by setting USE_DB as their default, and the | |
1694 | configuration files for Cygwin set USE_GDBM. Anything you set in | |
1695 | _Local/Makefile_, however, overrides these system defaults. | |
1696 | ||
1697 | As well as setting USE_DB, USE_GDBM, or USE_TDB, it may also be | |
1698 | necessary to set DBMLIB, to cause inclusion of the appropriate library, as | |
1699 | in one of these lines: | |
1700 | ||
1701 | DBMLIB = -ldb | |
1702 | DBMLIB = -ltdb | |
1703 | ||
1704 | Settings like that will work if the DBM library is installed in the standard | |
1705 | place. Sometimes it is not, and the library's header file may also not be in | |
1706 | the default path. You may need to set INCLUDE to specify where the header | |
1707 | file is, and to specify the path to the library more fully in DBMLIB, as in | |
1708 | this example: | |
1709 | ||
1710 | INCLUDE=-I/usr/local/include/db-4.1 | |
1711 | DBMLIB=/usr/local/lib/db-4.1/libdb.a | |
1712 | ||
1713 | ||
1714 | There is further detailed discussion about the various DBM libraries in the | |
1715 | file _doc/dbm.discuss.txt_ in the Exim distribution. | |
1716 | ||
1717 | ||
1718 | ||
1719 | Pre-building configuration | |
1720 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1721 | cindex:[building Exim,pre-building configuration] | |
1722 | cindex:[configuration for building Exim] | |
1723 | cindex:[_Local/Makefile_] | |
1724 | cindex:[_src/EDITME_] | |
1725 | Before building Exim, a local configuration file that specifies options | |
1726 | independent of any operating system has to be created with the name | |
1727 | _Local/Makefile_. A template for this file is supplied as the file | |
1728 | _src/EDITME_, and it contains full descriptions of all the option settings | |
1729 | therein. These descriptions are therefore not repeated here. If you are | |
1730 | building Exim for the first time, the simplest thing to do is to copy | |
1731 | _src/EDITME_ to _Local/Makefile_, then read it and edit it appropriately. | |
1732 | ||
1733 | There are three settings that you must supply, because Exim will not build | |
1734 | without them. They are the location of the run time configuration file | |
1735 | (CONFIGURE_FILE), the directory in which Exim binaries will be installed | |
1736 | (BIN_DIRECTORY), and the identity of the Exim user (EXIM_USER and | |
1737 | maybe EXIM_GROUP as well). The value of CONFIGURE_FILE can in fact be | |
1738 | a colon-separated list of file names; Exim uses the first of them that exists. | |
1739 | ||
1740 | There are a few other parameters that can be specified either at build time or | |
1741 | at run time, to enable the same binary to be used on a number of different | |
1742 | machines. However, if the locations of Exim's spool directory and log file | |
1743 | directory (if not within the spool directory) are fixed, it is recommended that | |
1744 | you specify them in _Local/Makefile_ instead of at run time, so that errors | |
1745 | detected early in Exim's execution (such as a malformed configuration file) can | |
1746 | be logged. | |
1747 | ||
1748 | cindex:[content scanning,specifying at build time] | |
068aaea8 | 1749 | Exim's interfaces for calling virus and spam scanning software directly from |
168e428f PH |
1750 | access control lists are not compiled by default. If you want to include these |
1751 | facilities, you need to set | |
1752 | ||
1753 | WITH_CONTENT_SCAN=yes | |
1754 | ||
1755 | in your _Local/Makefile_. For details of the facilities themselves, see | |
1756 | chapter <<CHAPexiscan>>. | |
1757 | ||
1758 | ||
1759 | cindex:[_Local/eximon.conf_] | |
1760 | cindex:[_exim_monitor/EDITME_] | |
1761 | If you are going to build the Exim monitor, a similar configuration process is | |
1762 | required. The file _exim_monitor/EDITME_ must be edited appropriately for | |
1763 | your installation and saved under the name _Local/eximon.conf_. If you are | |
1764 | happy with the default settings described in _exim_monitor/EDITME_, | |
1765 | _Local/eximon.conf_ can be empty, but it must exist. | |
1766 | ||
1767 | This is all the configuration that is needed in straightforward cases for known | |
1768 | operating systems. However, the building process is set up so that it is easy | |
1769 | to override options that are set by default or by operating-system-specific | |
1770 | configuration files, for example to change the name of the C compiler, which | |
1771 | defaults to %gcc%. See section <<SECToverride>> below for details of how to do | |
1772 | this. | |
1773 | ||
1774 | ||
1775 | ||
1776 | Support for iconv() | |
1777 | ~~~~~~~~~~~~~~~~~~~ | |
1778 | cindex:['iconv()' support] | |
d1e83bff | 1779 | cindex:[RFC 2047] |
168e428f PH |
1780 | The contents of header lines in messages may be encoded according to the rules |
1781 | described RFC 2047. This makes it possible to transmit characters that are not | |
1782 | in the ASCII character set, and to label them as being in a particular | |
1783 | character set. When Exim is inspecting header lines by means of the %\$h_% | |
1784 | mechanism, it decodes them, and translates them into a specified character set | |
1785 | (default ISO-8859-1). The translation is possible only if the operating system | |
1786 | supports the 'iconv()' function. | |
1787 | ||
1788 | However, some of the operating systems that supply 'iconv()' do not support | |
1789 | very many conversions. The GNU %libiconv% library (available from | |
1790 | *http://www.gnu.org/software/libiconv/[]*) can be installed on such systems to | |
1791 | remedy this deficiency, as well as on systems that do not supply 'iconv()' at | |
1792 | all. After installing %libiconv%, you should add | |
1793 | ||
1794 | HAVE_ICONV=yes | |
1795 | ||
1796 | to your _Local/Makefile_ and rebuild Exim. | |
1797 | ||
1798 | ||
1799 | ||
1800 | [[SECTinctlsssl]] | |
1801 | Including TLS/SSL encryption support | |
1802 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1803 | cindex:[TLS,including support for TLS] | |
1804 | cindex:[encryption,including support for] | |
1805 | cindex:[SUPPORT_TLS] | |
1806 | cindex:[OpenSSL,building Exim with] | |
1807 | cindex:[GnuTLS,building Exim with] | |
1808 | Exim can be built to support encrypted SMTP connections, using the STARTTLS | |
1809 | command as per RFC 2487. It can also support legacy clients that expect to | |
1810 | start a TLS session immediately on connection to a non-standard port (see the | |
1811 | %tls_on_connect_ports% runtime option and the %-tls-on-connect% command | |
1812 | line option). | |
1813 | ||
1814 | If you want to build Exim with TLS support, you must first install either the | |
1815 | OpenSSL or GnuTLS library. There is no cryptographic code in Exim itself for | |
1816 | implementing SSL. | |
1817 | ||
1818 | If OpenSSL is installed, you should set | |
1819 | ||
1820 | SUPPORT_TLS=yes | |
1821 | TLS_LIBS=-lssl -lcrypto | |
1822 | ||
1823 | in _Local/Makefile_. You may also need to specify the locations of the | |
1824 | OpenSSL library and include files. For example: | |
1825 | ||
1826 | SUPPORT_TLS=yes | |
1827 | TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto | |
1828 | TLS_INCLUDE=-I/usr/local/openssl/include/ | |
1829 | ||
1830 | cindex:[USE_GNUTLS] | |
1831 | If GnuTLS is installed, you should set | |
1832 | ||
1833 | SUPPORT_TLS=yes | |
1834 | USE_GNUTLS=yes | |
1835 | TLS_LIBS=-lgnutls -ltasn1 -lgcrypt | |
1836 | ||
1837 | in _Local/Makefile_, and again you may need to specify the locations of the | |
1838 | library and include files. For example: | |
1839 | ||
1840 | SUPPORT_TLS=yes | |
1841 | USE_GNUTLS=yes | |
1842 | TLS_LIBS=-L/usr/gnu/lib -lgnutls -ltasn1 -lgcrypt | |
1843 | TLS_INCLUDE=-I/usr/gnu/include | |
1844 | ||
1845 | You do not need to set TLS_INCLUDE if the relevant directory is already | |
1846 | specified in INCLUDE. Details of how to configure Exim to make use of TLS | |
1847 | are given in chapter <<CHAPTLS>>. | |
1848 | ||
1849 | ||
1850 | ||
1851 | ||
1852 | Use of tcpwrappers | |
1853 | ~~~~~~~~~~~~~~~~~~ | |
1854 | cindex:[tcpwrappers, building Exim to support] | |
1855 | cindex:[USE_TCP_WRAPPERS] | |
1856 | Exim can be linked with the 'tcpwrappers' library in order to check incoming | |
1857 | SMTP calls using the 'tcpwrappers' control files. This may be a convenient | |
1858 | alternative to Exim's own checking facilities for installations that are | |
1859 | already making use of 'tcpwrappers' for other purposes. To do this, you should | |
1860 | set USE_TCP_WRAPPERS in _Local/Makefile_, arrange for the file | |
1861 | _tcpd.h_ to be available at compile time, and also ensure that the library | |
1862 | _libwrap.a_ is available at link time, typically by including %-lwrap% in | |
1863 | EXTRALIBS_EXIM. For example, if 'tcpwrappers' is installed in | |
1864 | _/usr/local_, you might have | |
1865 | ||
1866 | USE_TCP_WRAPPERS=yes | |
1867 | CFLAGS=-O -I/usr/local/include | |
1868 | EXTRALIBS_EXIM=-L/usr/local/lib -lwrap | |
1869 | ||
1870 | in _Local/Makefile_. The name to use in the 'tcpwrappers' control files is | |
1871 | ``exim''. For example, the line | |
1872 | ||
1873 | exim : LOCAL 192.168.1. .friendly.domain.example | |
1874 | ||
1875 | in your _/etc/hosts.allow_ file allows connections from the local host, from | |
1876 | the subnet 192.168.1.0/24, and from all hosts in 'friendly.domain.example'. | |
1877 | All other connections are denied. Consult the 'tcpwrappers' documentation for | |
1878 | further details. | |
1879 | ||
1880 | ||
1881 | ||
1882 | Including support for IPv6 | |
1883 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1884 | cindex:[IPv6,including support for] | |
1885 | Exim contains code for use on systems that have IPv6 support. Setting | |
1886 | `HAVE_IPV6=YES` in _Local/Makefile_ causes the IPv6 code to be included; | |
1887 | it may also be necessary to set IPV6_INCLUDE and IPV6_LIBS on systems | |
1888 | where the IPv6 support is not fully integrated into the normal include and | |
1889 | library files. | |
1890 | ||
1891 | Two different types of DNS record for handling IPv6 addresses have been | |
1892 | defined. AAAA records (analagous to A records for IPv4) are in use, and are | |
1893 | currently seen as the mainstream. Another record type called A6 was proposed | |
1894 | as better than AAAA because it had more flexibility. However, it was felt to be | |
1895 | over-complex, and its status was reduced to ``experimental''. It is not known | |
1896 | if anyone is actually using A6 records. Exim has support for A6 records, but | |
1897 | this is included only if you set `SUPPORT_A6=YES` in _Local/Makefile_. The | |
1898 | support has not been tested for some time. | |
1899 | ||
1900 | ||
1901 | ||
1902 | The building process | |
1903 | ~~~~~~~~~~~~~~~~~~~~ | |
1904 | cindex:[build directory] | |
1905 | Once _Local/Makefile_ (and _Local/eximon.conf_, if required) have been | |
1906 | created, run 'make' at the top level. It determines the architecture and | |
1907 | operating system types, and creates a build directory if one does not exist. | |
1908 | For example, on a Sun system running Solaris 8, the directory | |
1909 | _build-SunOS5-5.8-sparc_ is created. | |
1910 | cindex:[symbolic link,to source files] | |
1911 | Symbolic links to relevant source files are installed in the build directory. | |
1912 | ||
1913 | *Warning*: The %-j% (parallel) flag must not be used with 'make'; the | |
1914 | building process fails if it is set. | |
1915 | ||
1916 | If this is the first time 'make' has been run, it calls a script that builds | |
1917 | a make file inside the build directory, using the configuration files from the | |
1918 | _Local_ directory. The new make file is then passed to another instance of | |
1919 | 'make'. This does the real work, building a number of utility scripts, and | |
1920 | then compiling and linking the binaries for the Exim monitor (if configured), a | |
1921 | number of utility programs, and finally Exim itself. The command 'make | |
1922 | makefile' can be used to force a rebuild of the make file in the build | |
1923 | directory, should this ever be necessary. | |
1924 | ||
1925 | If you have problems building Exim, check for any comments there may be in the | |
1926 | _README_ file concerning your operating system, and also take a look at the | |
1927 | FAQ, where some common problems are covered. | |
1928 | ||
1929 | ||
1930 | ||
068aaea8 PH |
1931 | Output from ``make'' |
1932 | ~~~~~~~~~~~~~~~~~~~~ | |
1933 | ||
1934 | [revisionflag="changed"] | |
1935 | The output produced by the 'make' process for compile lines is often very | |
1936 | unreadable, because these lines can be very long. For this reason, the normal | |
1937 | output is suppressed by default, and instead output similar to that which | |
1938 | appears when compiling the 2.6 Linux kernel is generated: just a short line for | |
1939 | each module that is being compiled or linked. However, it is still possible to | |
1940 | get the full output, by calling 'make' like this: | |
1941 | ||
1942 | FULLECHO='' make -e | |
1943 | ||
1944 | The value of FULLECHO defaults to ``@'', the flag character that suppresses | |
1945 | command reflection in 'make'. When you ask for the full output, it is | |
1946 | given in addition to the the short output. | |
1947 | ||
1948 | ||
1949 | ||
168e428f PH |
1950 | |
1951 | [[SECToverride]] | |
1952 | Overriding build-time options for Exim | |
1953 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
1954 | cindex:[build-time options, overriding] | |
1955 | The main make file that is created at the beginning of the building process | |
1956 | consists of the concatenation of a number of files which set configuration | |
1957 | values, followed by a fixed set of 'make' instructions. If a value is set | |
1958 | more than once, the last setting overrides any previous ones. This provides a | |
1959 | convenient way of overriding defaults. The files that are concatenated are, in | |
1960 | order: | |
1961 | ||
1962 | &&& | |
1963 | _OS/Makefile-Default_ | |
1964 | _OS/Makefile-_<'ostype'> | |
1965 | _Local/Makefile_ | |
1966 | _Local/Makefile-_<'ostype'> | |
1967 | _Local/Makefile-_<'archtype'> | |
1968 | _Local/Makefile-_<'ostype'>-<'archtype'> | |
1969 | _OS/Makefile-Base_ | |
1970 | &&& | |
1971 | ||
1972 | cindex:[_Local/Makefile_] | |
1973 | cindex:[building Exim,operating system type] | |
1974 | cindex:[building Exim,architecture type] | |
1975 | where <'ostype'> is the operating system type and <'archtype'> is the | |
1976 | architecture type. _Local/Makefile_ is required to exist, and the building | |
1977 | process fails if it is absent. The other three _Local_ files are optional, | |
1978 | and are often not needed. | |
1979 | ||
1980 | The values used for <'ostype'> and <'archtype'> are obtained from scripts | |
1981 | called _scripts/os-type_ and _scripts/arch-type_ respectively. If either of | |
1982 | the environment variables EXIM_OSTYPE or EXIM_ARCHTYPE is set, their | |
1983 | values are used, thereby providing a means of forcing particular settings. | |
1984 | Otherwise, the scripts try to get values from the %uname% command. If this | |
1985 | fails, the shell variables OSTYPE and ARCHTYPE are inspected. A number | |
1986 | of 'ad hoc' transformations are then applied, to produce the standard names | |
1987 | that Exim expects. You can run these scripts directly from the shell in order | |
1988 | to find out what values are being used on your system. | |
1989 | ||
1990 | ||
1991 | _OS/Makefile-Default_ contains comments about the variables that are set | |
1992 | therein. Some (but not all) are mentioned below. If there is something that | |
1993 | needs changing, review the contents of this file and the contents of the make | |
1994 | file for your operating system (_OS/Makefile-<ostype>_) to see what the | |
1995 | default values are. | |
1996 | ||
1997 | ||
1998 | cindex:[building Exim,overriding default settings] | |
1999 | If you need to change any of the values that are set in _OS/Makefile-Default_ | |
2000 | or in _OS/Makefile-<ostype>_, or to add any new definitions, you do not | |
2001 | need to change the original files. Instead, you should make the changes by | |
2002 | putting the new values in an appropriate _Local_ file. For example, | |
2003 | cindex:[Tru64-Unix build-time settings] | |
2004 | when building Exim in many releases of the Tru64-Unix (formerly Digital UNIX, | |
2005 | formerly DEC-OSF1) operating system, it is necessary to specify that the C | |
2006 | compiler is called 'cc' rather than 'gcc'. Also, the compiler must be | |
2007 | called with the option %-std1%, to make it recognize some of the features of | |
2008 | Standard C that Exim uses. (Most other compilers recognize Standard C by | |
2009 | default.) To do this, you should create a file called _Local/Makefile-OSF1_ | |
2010 | containing the lines | |
2011 | ||
2012 | CC=cc | |
2013 | CFLAGS=-std1 | |
2014 | ||
2015 | If you are compiling for just one operating system, it may be easier to put | |
2016 | these lines directly into _Local/Makefile_. | |
2017 | ||
2018 | Keeping all your local configuration settings separate from the distributed | |
2019 | files makes it easy to transfer them to new versions of Exim simply by copying | |
2020 | the contents of the _Local_ directory. | |
2021 | ||
2022 | ||
2023 | cindex:[NIS lookup type,including support for] | |
2024 | cindex:[NIS+ lookup type,including support for] | |
2025 | cindex:[LDAP,including support for] | |
2026 | cindex:[lookup,inclusion in binary] | |
2027 | Exim contains support for doing LDAP, NIS, NIS+, and other kinds of file | |
2028 | lookup, but not all systems have these components installed, so the default is | |
2029 | not to include the relevant code in the binary. All the different kinds of file | |
2030 | and database lookup that Exim supports are implemented as separate code modules | |
2031 | which are included only if the relevant compile-time options are set. In the | |
2032 | case of LDAP, NIS, and NIS+, the settings for _Local/Makefile_ are: | |
2033 | ||
2034 | LOOKUP_LDAP=yes | |
2035 | LOOKUP_NIS=yes | |
2036 | LOOKUP_NISPLUS=yes | |
2037 | ||
2038 | and similar settings apply to the other lookup types. They are all listed in | |
068aaea8 | 2039 | _src/EDITME_. In many cases the relevant include files and interface |
168e428f PH |
2040 | libraries need to be installed before compiling Exim. |
2041 | cindex:[cdb,including support for] | |
068aaea8 PH |
2042 | However, there are some optional lookup types (such as cdb) for which |
2043 | the code is entirely contained within Exim, and no external include | |
168e428f PH |
2044 | files or libraries are required. When a lookup type is not included in the |
2045 | binary, attempts to configure Exim to use it cause run time configuration | |
2046 | errors. | |
2047 | ||
2048 | cindex:[Perl,including support for] | |
2049 | Exim can be linked with an embedded Perl interpreter, allowing Perl | |
2050 | subroutines to be called during string expansion. To enable this facility, | |
2051 | ||
2052 | EXIM_PERL=perl.o | |
2053 | ||
2054 | must be defined in _Local/Makefile_. Details of this facility are given in | |
2055 | chapter <<CHAPperl>>. | |
2056 | ||
2057 | cindex:[X11 libraries, location of] | |
2058 | The location of the X11 libraries is something that varies a lot between | |
068aaea8 | 2059 | operating systems, and there may be different versions of X11 to cope |
168e428f PH |
2060 | with. Exim itself makes no use of X11, but if you are compiling the Exim |
2061 | monitor, the X11 libraries must be available. | |
2062 | The following three variables are set in _OS/Makefile-Default_: | |
2063 | ||
2064 | X11=/usr/X11R6 | |
2065 | XINCLUDE=-I$(X11)/include | |
2066 | XLFLAGS=-L$(X11)/lib | |
2067 | ||
2068 | These are overridden in some of the operating-system configuration files. For | |
2069 | example, in _OS/Makefile-SunOS5_ there is | |
2070 | ||
2071 | X11=/usr/openwin | |
2072 | XINCLUDE=-I$(X11)/include | |
2073 | XLFLAGS=-L$(X11)/lib -R$(X11)/lib | |
2074 | ||
2075 | If you need to override the default setting for your operating system, place a | |
2076 | definition of all three of these variables into your | |
2077 | _Local/Makefile-<ostype>_ file. | |
2078 | ||
2079 | cindex:[EXTRALIBS] | |
2080 | If you need to add any extra libraries to the link steps, these can be put in a | |
2081 | variable called EXTRALIBS, which appears in all the link commands, but by | |
2082 | default is not defined. In contrast, EXTRALIBS_EXIM is used only on the | |
2083 | command for linking the main Exim binary, and not for any associated utilities. | |
2084 | ||
2085 | cindex:[DBM libraries, configuration for building] | |
2086 | There is also DBMLIB, which appears in the link commands for binaries that | |
2087 | use DBM functions (see also section <<SECTdb>>). Finally, there is | |
2088 | EXTRALIBS_EXIMON, which appears only in the link step for the Exim monitor | |
2089 | binary, and which can be used, for example, to include additional X11 | |
2090 | libraries. | |
2091 | ||
2092 | cindex:[configuration file,editing] | |
2093 | The make file copes with rebuilding Exim correctly if any of the configuration | |
2094 | files are edited. However, if an optional configuration file is deleted, it is | |
2095 | necessary to touch the associated non-optional file (that is, _Local/Makefile_ | |
2096 | or _Local/eximon.conf_) before rebuilding. | |
2097 | ||
2098 | ||
2099 | OS-specific header files | |
2100 | ~~~~~~~~~~~~~~~~~~~~~~~~ | |
2101 | cindex:[_os.h_] | |
2102 | cindex:[building Exim,OS-specific C header files] | |
2103 | The _OS_ directory contains a number of files with names of the form | |
2104 | _os.h-<ostype>_. These are system-specific C header files that should not | |
2105 | normally need to be changed. There is a list of macro settings that are | |
2106 | recognized in the file _OS/os.configuring_, which should be consulted if you | |
2107 | are porting Exim to a new operating system. | |
2108 | ||
2109 | ||
2110 | ||
2111 | Overriding build-time options for the monitor | |
2112 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2113 | cindex:[building Eximon,overriding default options] | |
2114 | A similar process is used for overriding things when building the Exim monitor, | |
2115 | where the files that are involved are | |
2116 | ||
2117 | &&& | |
2118 | _OS/eximon.conf-Default_ | |
2119 | _OS/eximon.conf-_<'ostype'> | |
2120 | _Local/eximon.conf_ | |
2121 | _Local/eximon.conf-_<'ostype'> | |
2122 | _Local/eximon.conf-_<'archtype'> | |
2123 | _Local/eximon.conf-_<'ostype'>-<'archtype'> | |
2124 | &&& | |
2125 | ||
2126 | cindex:[_Local/eximon.conf_] | |
2127 | As with Exim itself, the final three files need not exist, and in this case the | |
2128 | _OS/eximon.conf-<ostype>_ file is also optional. The default values in | |
2129 | _OS/eximon.conf-Default_ can be overridden dynamically by setting environment | |
2130 | variables of the same name, preceded by EXIMON_. For example, setting | |
2131 | EXIMON_LOG_DEPTH in the environment overrides the value of | |
2132 | LOG_DEPTH at run time. | |
2133 | ||
2134 | ||
2135 | ||
2136 | ||
2137 | Installing Exim binaries and scripts | |
2138 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2139 | cindex:[installing Exim] | |
2140 | cindex:[BIN_DIRECTORY] | |
068aaea8 PH |
2141 | The command 'make install' runs the 'exim_install' script with no arguments. |
2142 | The script copies binaries and utility scripts into the directory whose name is | |
2143 | specified by the BIN_DIRECTORY setting in _Local/Makefile_. | |
2144 | cindex:[setuid,installing Exim with] | |
2145 | The install script copies files only if they are newer than the files they are | |
2146 | going to replace. The Exim binary is required to be owned by root and have the | |
2147 | 'setuid' bit set, for normal configurations. Therefore, you must run 'make | |
2148 | install' as root so that it can set up the Exim binary in this way. However, in | |
2149 | some special situations (for example, if a host is doing no local deliveries) | |
2150 | it may be possible to run Exim without making the binary setuid root (see | |
2151 | chapter <<CHAPsecurity>> for details). | |
168e428f PH |
2152 | |
2153 | cindex:[CONFIGURE_FILE] | |
2154 | Exim's run time configuration file is named by the CONFIGURE_FILE setting | |
2155 | in _Local/Makefile_. If this names a single file, and the file does not | |
2156 | exist, the default configuration file _src/configure.default_ is copied there | |
2157 | by the installation script. If a run time configuration file already exists, it | |
2158 | is left alone. If CONFIGURE_FILE is a colon-separated list, naming several | |
2159 | alternative files, no default is installed. | |
2160 | ||
2161 | cindex:[system aliases file] | |
2162 | cindex:[_/etc/aliases_] | |
2163 | One change is made to the default configuration file when it is installed: the | |
2164 | default configuration contains a router that references a system aliases file. | |
2165 | The path to this file is set to the value specified by | |
2166 | SYSTEM_ALIASES_FILE in _Local/Makefile_ (_/etc/aliases_ by default). | |
2167 | If the system aliases file does not exist, the installation script creates it, | |
2168 | and outputs a comment to the user. | |
2169 | ||
2170 | The created file contains no aliases, but it does contain comments about the | |
2171 | aliases a site should normally have. Mail aliases have traditionally been | |
2172 | kept in _/etc/aliases_. However, some operating systems are now using | |
2173 | _/etc/mail/aliases_. You should check if yours is one of these, and change | |
2174 | Exim's configuration if necessary. | |
2175 | ||
2176 | The default configuration uses the local host's name as the only local domain, | |
2177 | and is set up to do local deliveries into the shared directory _/var/mail_, | |
2178 | running as the local user. System aliases and _.forward_ files in users' home | |
2179 | directories are supported, but no NIS or NIS+ support is configured. Domains | |
2180 | other than the name of the local host are routed using the DNS, with delivery | |
2181 | over SMTP. | |
2182 | ||
168e428f PH |
2183 | It is possible to install Exim for special purposes (such as building a binary |
2184 | distribution) in a private part of the file system. You can do this by a | |
2185 | command such as | |
2186 | ||
2187 | make DESTDIR=/some/directory/ install | |
2188 | ||
2189 | This has the effect of pre-pending the specified directory to all the file | |
2190 | paths, except the name of the system aliases file that appears in the default | |
2191 | configuration. (If a default alias file is created, its name 'is' modified.) | |
2192 | For backwards compatibility, ROOT is used if DESTDIR is not set, | |
2193 | but this usage is deprecated. | |
2194 | ||
2195 | cindex:[installing Exim,what is not installed] | |
2196 | Running 'make install' does not copy the Exim 4 conversion script | |
2197 | 'convert4r4', or the 'pcretest' test program. You will probably run the | |
2198 | first of these only once (if you are upgrading from Exim 3), and the second | |
2199 | isn't really part of Exim. None of the documentation files in the _doc_ | |
2200 | directory are copied, except for the info files when you have set | |
2201 | INFO_DIRECTORY, as described in section <<SECTinsinfdoc>> below. | |
2202 | ||
2203 | For the utility programs, old versions are renamed by adding the suffix _.O_ | |
2204 | to their names. The Exim binary itself, however, is handled differently. It is | |
2205 | installed under a name that includes the version number and the compile number, | |
2206 | for example _exim-{version}-1_. The script then arranges for a symbolic link | |
2207 | called _exim_ to point to the binary. If you are updating a previous version | |
2208 | of Exim, the script takes care to ensure that the name _exim_ is never absent | |
2209 | from the directory (as seen by other processes). | |
2210 | ||
2211 | cindex:[installing Exim,testing the script] | |
2212 | If you want to see what the 'make install' will do before running it for | |
2213 | real, you can pass the %-n% option to the installation script by this command: | |
2214 | ||
2215 | make INSTALL_ARG=-n install | |
2216 | ||
2217 | The contents of the variable INSTALL_ARG are passed to the installation | |
2218 | script. You do not need to be root to run this test. Alternatively, you can run | |
2219 | the installation script directly, but this must be from within the build | |
2220 | directory. For example, from the top-level Exim directory you could use this | |
2221 | command: | |
2222 | ||
2223 | (cd build-SunOS5-5.5.1-sparc; ../scripts/exim_install -n) | |
2224 | ||
2225 | cindex:[installing Exim,install script options] | |
2226 | There are two other options that can be supplied to the installation script. | |
2227 | ||
2228 | - %-no_chown% bypasses the call to change the owner of the installed binary | |
2229 | to root, and the call to make it a setuid binary. | |
2230 | ||
2231 | - %-no_symlink% bypasses the setting up of the symbolic link _exim_ to the | |
2232 | installed binary. | |
2233 | ||
2234 | INSTALL_ARG can be used to pass these options to the script. For example: | |
2235 | ||
2236 | make INSTALL_ARG=-no_symlink install | |
2237 | ||
2238 | ||
2239 | The installation script can also be given arguments specifying which files are | |
2240 | to be copied. For example, to install just the Exim binary, and nothing else, | |
2241 | without creating the symbolic link, you could use: | |
2242 | ||
2243 | make INSTALL_ARG='-no_symlink exim' install | |
2244 | ||
2245 | ||
2246 | ||
2247 | ||
2248 | [[SECTinsinfdoc]] | |
2249 | Installing info documentation | |
2250 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2251 | cindex:[installing Exim,'info' documentation] | |
2252 | Not all systems use the GNU 'info' system for documentation, and for this | |
2253 | reason, the Texinfo source of Exim's documentation is not included in the main | |
2254 | distribution. Instead it is available separately from the ftp site (see section | |
2255 | <<SECTavail>>). | |
2256 | ||
2257 | If you have defined INFO_DIRECTORY in _Local/Makefile_ and the Texinfo | |
2258 | source of the documentation is found in the source tree, running 'make | |
2259 | install' automatically builds the info files and installs them. | |
2260 | ||
2261 | ||
2262 | ||
2263 | Setting up the spool directory | |
2264 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2265 | cindex:[spool directory,creating] | |
2266 | When it starts up, Exim tries to create its spool directory if it does not | |
2267 | exist. The Exim uid and gid are used for the owner and group of the spool | |
2268 | directory. Sub-directories are automatically created in the spool directory as | |
2269 | necessary. | |
2270 | ||
2271 | ||
2272 | ||
2273 | ||
2274 | Testing | |
2275 | ~~~~~~~ | |
2276 | cindex:[testing,installation] | |
2277 | Having installed Exim, you can check that the run time configuration file is | |
2278 | syntactically valid by running the following command, which assumes that the | |
2279 | Exim binary directory is within your PATH environment variable: | |
2280 | ||
2281 | exim -bV | |
2282 | ||
2283 | If there are any errors in the configuration file, Exim outputs error messages. | |
2284 | Otherwise it outputs the version number and build date, | |
2285 | the DBM library that is being used, and information about which drivers and | |
2286 | other optional code modules are included in the binary. | |
2287 | Some simple routing tests can be done by using the address testing option. For | |
2288 | example, | |
2289 | ||
2290 | exim -bt <local username> | |
2291 | ||
2292 | should verify that it recognizes a local mailbox, and | |
2293 | ||
2294 | exim -bt <remote address> | |
2295 | ||
2296 | a remote one. Then try getting it to deliver mail, both locally and remotely. | |
2297 | This can be done by passing messages directly to Exim, without going through a | |
2298 | user agent. For example: | |
2299 | ||
068aaea8 PH |
2300 | .... |
2301 | exim -v postmaster@your.domain.example | |
2302 | From: user@your.domain.example | |
2303 | To: postmaster@your.domain.example | |
2304 | Subject: Testing Exim | |
168e428f | 2305 | |
068aaea8 PH |
2306 | This is a test message. |
2307 | ^D | |
2308 | .... | |
168e428f PH |
2309 | |
2310 | The %-v% option causes Exim to output some verification of what it is doing. | |
2311 | In this case you should see copies of three log lines, one for the message's | |
2312 | arrival, one for its delivery, and one containing ``Completed''. | |
2313 | ||
2314 | cindex:[delivery,problems with] | |
2315 | If you encounter problems, look at Exim's log files ('mainlog' and | |
2316 | 'paniclog') to see if there is any relevant information there. Another source | |
2317 | of information is running Exim with debugging turned on, by specifying the | |
2318 | %-d% option. If a message is stuck on Exim's spool, you can force a delivery | |
2319 | with debugging turned on by a command of the form | |
2320 | ||
2321 | exim -d -M <message-id> | |
2322 | ||
2323 | You must be root or an ``admin user'' in order to do this. The %-d% option | |
2324 | produces rather a lot of output, but you can cut this down to specific areas. | |
2325 | For example, if you use %-d-all+route% only the debugging information relevant | |
2326 | to routing is included. (See the %-d% option in chapter <<CHAPcommandline>> for | |
2327 | more details.) | |
2328 | ||
2329 | cindex:[``sticky'' bit] | |
2330 | cindex:[lock files] | |
2331 | One specific problem that has shown up on some sites is the inability to do | |
2332 | local deliveries into a shared mailbox directory, because it does not have the | |
2333 | ``sticky bit'' set on it. By default, Exim tries to create a lock file before | |
2334 | writing to a mailbox file, and if it cannot create the lock file, the delivery | |
2335 | is deferred. You can get round this either by setting the ``sticky bit'' on the | |
2336 | directory, or by setting a specific group for local deliveries and allowing | |
2337 | that group to create files in the directory (see the comments above the | |
2338 | ^local_delivery^ transport in the default configuration file). Another | |
2339 | approach is to configure Exim not to use lock files, but just to rely on | |
2340 | 'fcntl()' locking instead. However, you should do this only if all user | |
2341 | agents also use 'fcntl()' locking. For further discussion of locking issues, | |
2342 | see chapter <<CHAPappendfile>>. | |
2343 | ||
2344 | One thing that cannot be tested on a system that is already running an MTA is | |
2345 | the receipt of incoming SMTP mail on the standard SMTP port. However, the | |
2346 | %-oX% option can be used to run an Exim daemon that listens on some other | |
2347 | port, or 'inetd' can be used to do this. The %-bh% option and the | |
2348 | 'exim_checkaccess' utility can be used to check out policy controls on | |
2349 | incoming SMTP mail. | |
2350 | ||
2351 | Testing a new version on a system that is already running Exim can most easily | |
2352 | be done by building a binary with a different CONFIGURE_FILE setting. From | |
2353 | within the run time configuration, all other file and directory names | |
2354 | that Exim uses can be altered, in order to keep it entirely clear of the | |
2355 | production version. | |
2356 | ||
2357 | ||
2358 | Replacing another MTA with Exim | |
2359 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2360 | cindex:[replacing another MTA] | |
2361 | Building and installing Exim for the first time does not of itself put it in | |
2362 | general use. The name by which the system's MTA is called by mail user agents | |
2363 | is either _/usr/sbin/sendmail_, or _/usr/lib/sendmail_ (depending on the | |
2364 | operating system), and it is necessary to make this name point to the 'exim' | |
2365 | binary in order to get the user agents to pass messages to Exim. This is | |
2366 | normally done by renaming any existing file and making _/usr/sbin/sendmail_ | |
2367 | or _/usr/lib/sendmail_ | |
2368 | ||
2369 | cindex:[symbolic link,to 'exim' binary] | |
2370 | a symbolic link to the 'exim' binary. It is a good idea to remove any setuid | |
2371 | privilege and executable status from the old MTA. It is then necessary to stop | |
2372 | and restart the mailer daemon, if one is running. | |
2373 | ||
2374 | cindex:[FreeBSD, MTA indirection] | |
2375 | cindex:[_/etc/mail/mailer.conf_] | |
2376 | Some operating systems have introduced alternative ways of switching MTAs. For | |
2377 | example, if you are running FreeBSD, you need to edit the file | |
2378 | _/etc/mail/mailer.conf_ instead of setting up a symbolic link as just | |
2379 | described. A typical example of the contents of this file for running Exim is | |
2380 | as follows: | |
2381 | ||
2382 | sendmail /usr/exim/bin/exim | |
2383 | send-mail /usr/exim/bin/exim | |
2384 | mailq /usr/exim/bin/exim -bp | |
2385 | newaliases /usr/bin/true | |
2386 | ||
2387 | ||
2388 | Once you have set up the symbolic link, or edited _/etc/mail/mailer.conf_, | |
2389 | your Exim installation is ``live''. Check it by sending a message from your | |
2390 | favourite user agent. | |
2391 | ||
2392 | You should consider what to tell your users about the change of MTA. Exim may | |
2393 | have different capabilities to what was previously running, and there are | |
2394 | various operational differences such as the text of messages produced by | |
2395 | command line options and in bounce messages. If you allow your users to make | |
2396 | use of Exim's filtering capabilities, you should make the document entitled | |
2397 | 'Exim's interface to mail filtering' | |
2398 | available to them. | |
2399 | ||
2400 | ||
2401 | ||
2402 | Upgrading Exim | |
2403 | ~~~~~~~~~~~~~~ | |
2404 | cindex:[upgrading Exim] | |
2405 | If you are already running Exim on your host, building and installing a new | |
2406 | version automatically makes it available to MUAs, or any other programs that | |
2407 | call the MTA directly. However, if you are running an Exim daemon, you do need | |
2408 | to send it a HUP signal, to make it re-exec itself, and thereby pick up the new | |
2409 | binary. You do not need to stop processing mail in order to install a new | |
068aaea8 PH |
2410 | version of Exim. The install script does not modify an existing runtime |
2411 | configuration file. | |
2412 | ||
168e428f PH |
2413 | |
2414 | ||
2415 | ||
2416 | Stopping the Exim daemon on Solaris | |
2417 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2418 | cindex:[Solaris,stopping Exim on] | |
2419 | The standard command for stopping the mailer daemon on Solaris is | |
2420 | ||
2421 | /etc/init.d/sendmail stop | |
2422 | ||
2423 | If _/usr/lib/sendmail_ has been turned into a symbolic link, this script | |
2424 | fails to stop Exim because it uses the command 'ps -e' and greps the output | |
2425 | for the text ``sendmail''; this is not present because the actual program name | |
2426 | (that is, ``exim'') is given by the 'ps' command with these options. A solution | |
2427 | is to replace the line that finds the process id with something like | |
2428 | ||
2429 | pid=`cat /var/spool/exim/exim-daemon.pid` | |
2430 | ||
2431 | to obtain the daemon's pid directly from the file that Exim saves it in. | |
2432 | ||
2433 | Note, however, that stopping the daemon does not ``stop Exim''. Messages can | |
2434 | still be received from local processes, and if automatic delivery is configured | |
2435 | (the normal case), deliveries will still occur. | |
2436 | ||
2437 | ||
2438 | ||
2439 | ||
2440 | //////////////////////////////////////////////////////////////////////////// | |
2441 | //////////////////////////////////////////////////////////////////////////// | |
2442 | ||
2443 | [[CHAPcommandline]] | |
2444 | The Exim command line | |
2445 | --------------------- | |
2446 | cindex:[command line,options] | |
2447 | cindex:[options,command line] | |
2448 | Exim's command line takes the standard Unix form of a sequence of options, | |
2449 | each starting with a hyphen character, followed by a number of arguments. The | |
2450 | options are compatible with the main options of Sendmail, and there are also | |
2451 | some additional options, some of which are compatible with Smail 3. Certain | |
2452 | combinations of options do not make sense, and provoke an error if used. | |
2453 | The form of the arguments depends on which options are set. | |
2454 | ||
2455 | ||
2456 | Setting options by program name | |
2457 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
2458 | cindex:['mailq'] | |
2459 | If Exim is called under the name 'mailq', it behaves as if the option %-bp% | |
2460 | were present before any other options. | |
2461 | The %-bp% option requests a listing of the contents of the mail queue on the | |
2462 | standard output. | |
2463 | This feature is for compatibility with some systems that contain a command of | |
2464 | that name in one of the standard libraries, symbolically linked to | |
2465 | _/usr/sbin/sendmail_ or _/usr/lib/sendmail_. | |
2466 | ||
2467 | cindex:['rsmtp'] | |
2468 | If Exim is called under the name 'rsmtp' it behaves as if the option %-bS% | |
2469 | were present before any other options, for compatibility with Smail. The %-bS% | |
2470 | option is used for reading in a number of messages in batched SMTP format. | |
2471 | ||
2472 | cindex:['rmail'] | |
2473 | If Exim is called under the name 'rmail' it behaves as if the %-i% and | |
2474 | %-oee% options were present before any other options, for compatibility with | |
2475 | Smail. The name 'rmail' is used as an interface by some UUCP systems. | |
2476 | ||
2477 | cindex:['runq'] | |
2478 | cindex:[queue runner] | |
2479 | If Exim is called under the name 'runq' it behaves as if the option %-q% were | |
2480 | present before any other options, for compatibility with Smail. The %-q% | |
2481 | option causes a single queue runner process to be started. | |
2482 | ||
2483 | cindex:['newaliases'] | |
2484 | cindex:[alias file,building] | |
2485 | cindex:[Sendmail compatibility,calling Exim as 'newaliases'] | |
2486 | If Exim is called under the name 'newaliases' it behaves as if the option | |
2487 | %-bi% were present before any other options, for compatibility with Sendmail. | |
2488 | This option is used for rebuilding Sendmail's alias file. Exim does not have | |
2489 | the concept of a single alias file, but can be configured to run a given | |
2490 | command if called with the %-bi% option. | |
2491 | ||
2492 | ||
2493 | [[SECTtrustedadmin]] | |
2494 | Trusted and admin users | |
2495 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
2496 | Some Exim options are available only to 'trusted users' and others are | |
2497 | available only to 'admin users'. In the description below, the phrases ``Exim | |
2498 | user'' and ``Exim group'' mean the user and group defined by EXIM_USER and | |
2499 | EXIM_GROUP in _Local/Makefile_ or set by the %exim_user% and | |
2500 | %exim_group% options. These do not necessarily have to use the name ``exim''. | |
2501 | ||
2502 | - cindex:[trusted user,definition of] | |
2503 | cindex:[user, trusted definition of] | |
2504 | The trusted users are root, the Exim user, any user listed in the | |
2505 | %trusted_users% configuration option, and any user whose current group or any | |
2506 | supplementary group is one of those listed in the %trusted_groups% | |
2507 | configuration option. Note that the Exim group is not automatically trusted. | |
2508 | + | |
2509 | cindex:[``From'' line] | |
2510 | cindex:[envelope sender] | |
2511 | Trusted users are always permitted to use the %-f% option or a leading ``From '' | |
2512 | line to specify the envelope sender of a message that is passed to Exim through | |
2513 | the local interface (see the %-bm% and %-f% options below). See the | |
2514 | %untrusted_set_sender% option for a way of permitting non-trusted users to | |
2515 | set envelope senders. | |
2516 | + | |
2517 | cindex:['From:' header line] | |
2518 | cindex:['Sender:' header line] | |
2519 | For a trusted user, there is never any check on the contents of the 'From:' | |
2520 | header line, and a 'Sender:' line is never added. Furthermore, any existing | |
2521 | 'Sender:' line in incoming local (non-TCP/IP) messages is not removed. | |
2522 | + | |
2523 | Trusted users may also specify a host name, host address, interface address, | |
2524 | protocol name, ident value, and authentication data when submitting a message | |
2525 | locally. Thus, they are able to insert messages into Exim's queue locally that | |
2526 | have the characteristics of messages received from a remote host. Untrusted | |
2527 | users may in some circumstances use %-f%, but can never set the other values | |
2528 | that are available to trusted users. | |
2529 | ||
2530 | - cindex:[user, admin definition of] | |
2531 | cindex:[admin user,definition of] | |
2532 | The admin users are root, the Exim user, and any user that is a member of the | |
2533 | Exim group or of any group listed in the %admin_groups% configuration option. | |
2534 | The current group does not have to be one of these groups. | |
2535 | + | |
2536 | Admin users are permitted to list the queue, and to carry out certain | |
2537 | operations on messages, for example, to force delivery failures. It is also | |
2538 | necessary to be an admin user in order to see the full information provided by | |
2539 | the Exim monitor, and full debugging output. | |
2540 | + | |
2541 | By default, the use of the %-M%, %-q%, %-R%, and %-S% options to cause Exim | |
2542 | to attempt delivery of messages on its queue is restricted to admin users. | |
2543 | However, this restriction can be relaxed by setting the %prod_requires_admin% | |
2544 | option false (that is, specifying %no_prod_requires_admin%). | |
2545 | + | |
2546 | Similarly, the use of the %-bp% option to list all the messages in the queue | |
2547 | is restricted to admin users unless %queue_list_requires_admin% is set | |
2548 | false. | |
2549 | ||
2550 | ||
2551 | *Warning*: If you configure your system so that admin users are able to | |
2552 | edit Exim's configuration file, you are giving those users an easy way of | |
2553 | getting root. There is further discussion of this issue at the start of chapter | |
2554 | <<CHAPconf>>. | |
2555 | ||
2556 | ||
2557 | ||
2558 | ||
2559 | Command line options | |
2560 | ~~~~~~~~~~~~~~~~~~~~ | |
2561 | The command options are described in alphabetical order below. | |
2562 | ||
2563 | /// | |
2564 | We insert a stylized DocBook comment here, to identify the start of the command | |
2565 | line options. This is for the benefit of the Perl script that automatically | |
2566 | creates a man page for the options. | |
2567 | /// | |
2568 | ||
2569 | ++++ | |
2570 | <!-- === Start of command line options === --> | |
2571 | ++++ | |
2572 | ||
2573 | ||
2574 | *{hh}*:: | |
2575 | oindex:[{hh}] | |
2576 | cindex:[options, command line; terminating] | |
2577 | This is a pseudo-option whose only purpose is to terminate the options and | |
2578 | therefore to cause subsequent command line items to be treated as arguments | |
2579 | rather than options, even if they begin with hyphens. | |
2580 | ||
2581 | *--help*:: | |
2582 | oindex:[%{hh}help%] | |
2583 | This option causes Exim to output a few sentences stating what it is. | |
2584 | The same output is generated if the Exim binary is called with no options and | |
2585 | no arguments. | |
2586 | ||
2587 | *-B*<'type'>:: | |
2588 | oindex:[%-B%] | |
2589 | cindex:[8-bit characters] | |
2590 | cindex:[Sendmail compatibility,8-bit characters] | |
2591 | This is a Sendmail option for selecting 7 or 8 bit processing. Exim is 8-bit | |
2592 | clean; it ignores this option. | |
2593 | ||
2594 | *-bd*:: | |
2595 | oindex:[%-bd%] | |
2596 | cindex:[daemon] | |
2597 | cindex:[SMTP listener] | |
2598 | cindex:[queue runner] | |
2599 | This option runs Exim as a daemon, awaiting incoming SMTP connections. Usually | |
2600 | the %-bd% option is combined with the %-q%<'time'> option, to specify that | |
2601 | the daemon should also initiate periodic queue runs. | |
2602 | + | |
2603 | The %-bd% option can be used only by an admin user. If either of the %-d% | |
2604 | (debugging) or %-v% (verifying) options are set, the daemon does not | |
2605 | disconnect from the controlling terminal. When running this way, it can be | |
2606 | stopped by pressing ctrl-C. | |
2607 | + | |
2608 | By default, Exim listens for incoming connections to the standard SMTP port on | |
2609 | all the host's running interfaces. However, it is possible to listen on other | |
2610 | ports, on multiple ports, and only on specific interfaces. Chapter | |
2611 | <<CHAPinterfaces>> contains a description of the options that control this. | |
2612 | + | |
2613 | When a listening daemon | |
2614 | cindex:[daemon,process id (pid)] | |
2615 | cindex:[pid (process id),of daemon] | |
2616 | is started without the use of %-oX% (that is, without overriding the normal | |
2617 | configuration), it writes its process id to a file called _exim-daemon.pid_ in | |
2618 | Exim's spool directory. This location can be overridden by setting | |
2619 | PID_FILE_PATH in _Local/Makefile_. The file is written while Exim is still | |
2620 | running as root. | |
2621 | + | |
2622 | When %-oX% is used on the command line to start a listening daemon, the | |
2623 | process id is not written to the normal pid file path. However, %-oP% can be | |
2624 | used to specify a path on the command line if a pid file is required. | |
2625 | + | |
2626 | The SIGHUP signal | |
2627 | cindex:[SIGHUP] | |
2628 | can be used to cause the daemon to re-exec itself. This should be done whenever | |
2629 | Exim's configuration file, or any file that is incorporated into it by means of | |
2630 | the %.include% facility, is changed, and also whenever a new version of Exim is | |
2631 | installed. It is not necessary to do this when other files that are referenced | |
2632 | from the configuration (for example, alias files) are changed, because these | |
2633 | are reread each time they are used. | |
2634 | ||
2635 | *-bdf*:: | |
2636 | oindex:[%-bdf%] | |
2637 | This option has the same effect as %-bd% except that it never disconnects from | |
2638 | the controlling terminal, even when no debugging is specified. | |
2639 | ||
2640 | *-be*:: | |
2641 | oindex:[%-be%] | |
2642 | cindex:[testing,string expansion] | |
2643 | cindex:[expansion,testing] | |
2644 | Run Exim in expansion testing mode. Exim discards its root privilege, to | |
2645 | prevent ordinary users from using this mode to read otherwise inaccessible | |
2646 | files. If no arguments are given, Exim runs interactively, prompting for lines | |
2647 | of data. | |
2648 | + | |
2649 | If Exim was built with USE_READLINE=yes in _Local/Makefile_, it tries | |
2650 | to load the %libreadline% library dynamically whenever the %-be% option is | |
2651 | used without command line arguments. If successful, it uses the 'readline()' | |
2652 | function, which provides extensive line-editing facilities, for reading the | |
2653 | test data. A line history is supported. | |
2654 | + | |
2655 | Long expansion expressions can be split over several lines by using backslash | |
068aaea8 | 2656 | continuations. As in Exim's run time configuration, white space at the start of |
168e428f PH |
2657 | continuation lines is ignored. Each argument or data line is passed through the |
2658 | string expansion mechanism, and the result is output. Variable values from the | |
2659 | configuration file (for example, $qualify_domain$) are available, but no | |
2660 | message-specific values (such as $domain$) are set, because no message is | |
2661 | being processed. | |
2662 | ||
2663 | *-bF*~<'filename'>:: | |
2664 | oindex:[%-bF%] | |
2665 | cindex:[system filter,testing] | |
2666 | cindex:[testing,system filter] | |
2667 | This option is the same as %-bf% except that it assumes that the filter being | |
2668 | tested is a system filter. The additional commands that are available only in | |
2669 | system filters are recognized. | |
2670 | ||
2671 | *-bf*~<'filename'>:: | |
2672 | oindex:[%-bf%] | |
2673 | cindex:[filter,testing] | |
2674 | cindex:[testing,filter file] | |
2675 | cindex:[forward file,testing] | |
2676 | cindex:[testing,forward file] | |
2677 | cindex:[Sieve filter,testing] | |
2678 | This option runs Exim in user filter testing mode; the file is the filter file | |
2679 | to be tested, and a test message must be supplied on the standard input. If | |
2680 | there are no message-dependent tests in the filter, an empty file can be | |
2681 | supplied. | |
2682 | + | |
2683 | If you want to test a system filter file, use %-bF% instead of %-bf%. You can | |
2684 | use both %-bF% and %-bf% on the same command, in order to | |
2685 | test a system filter and a user filter in the same run. For example: | |
2686 | ||
2687 | exim -bF /system/filter -bf /user/filter </test/message | |
2688 | + | |
2689 | This is helpful when the system filter adds header lines or sets filter | |
2690 | variables that are used by the user filter. | |
2691 | + | |
2692 | If the test filter file does not begin with one of the special lines | |
2693 | ||
2694 | # Exim filter | |
2695 | # Sieve filter | |
2696 | + | |
2697 | it is taken to be a normal _.forward_ file, and is tested for validity under | |
2698 | that interpretation. See sections <<SECTitenonfilred>> to <<SECTspecitredli>> for a | |
2699 | description of the possible contents of non-filter redirection lists. | |
2700 | + | |
2701 | The result of an Exim command that uses %-bf%, provided no errors are | |
2702 | detected, is a list of the actions that Exim would try to take if presented | |
2703 | with the message for real. More details of filter testing are given in the | |
2704 | separate document entitled 'Exim's interfaces to mail filtering'. | |
2705 | + | |
2706 | When testing a filter file, | |
2707 | cindex:[``From'' line] | |
2708 | cindex:[envelope sender] | |
2709 | cindex:[%-f% option,for filter testing] | |
2710 | the envelope sender can be set by the %-f% option, | |
2711 | or by a ``From '' line at the start of the test message. Various parameters that | |
2712 | would normally be taken from the envelope recipient address of the message can | |
2713 | be set by means of additional command line options (see the next four options). | |
2714 | ||
2715 | *-bfd*~<'domain'>:: | |
2716 | oindex:[%-bfd%] | |
068aaea8 | 2717 | cindex:[$qualify_domain$] |
168e428f PH |
2718 | This sets the domain of the recipient address when a filter file is being |
2719 | tested by means of the %-bf% option. The default is the value of | |
2720 | $qualify_domain$. | |
2721 | ||
2722 | *-bfl*~<'local~part'>:: | |
2723 | oindex:[%-bfl%] | |
2724 | This sets the local part of the recipient address when a filter file is being | |
2725 | tested by means of the %-bf% option. The default is the username of the | |
2726 | process that calls Exim. A local part should be specified with any prefix or | |
2727 | suffix stripped, because that is how it appears to the filter when a message is | |
2728 | actually being delivered. | |
2729 | ||
2730 | *-bfp*~<'prefix'>:: | |
2731 | oindex:[%-bfp%] | |
2732 | This sets the prefix of the local part of the recipient address when a filter | |
2733 | file is being tested by means of the %-bf% option. The default is an empty | |
2734 | prefix. | |
2735 | ||
2736 | *-bfs*~<'suffix'>:: | |
2737 | oindex:[%-bfs%] | |
2738 | This sets the suffix of the local part of the recipient address when a filter | |
2739 | file is being tested by means of the %-bf% option. The default is an empty | |
2740 | suffix. | |
2741 | ||
2742 | *-bh*~<'IP~address'>:: | |
2743 | oindex:[%-bh%] | |
2744 | cindex:[testing,incoming SMTP] | |
2745 | cindex:[SMTP,testing incoming] | |
2746 | cindex:[testing,relay control] | |
2747 | cindex:[relaying,testing configuration] | |
2748 | cindex:[policy control,testing] | |
2749 | cindex:[debugging,%-bh% option] | |
2750 | This option runs a fake SMTP session as if from the given IP address, using the | |
2751 | standard input and output. The IP address may include a port number at the end, | |
2752 | after a full stop. For example: | |
2753 | ||
2754 | exim -bh 10.9.8.7.1234 | |
2755 | exim -bh fe80::a00:20ff:fe86:a061.5678 | |
2756 | + | |
2757 | When an IPv6 address is given, it is converted into canonical form. In the case | |
2758 | of the second example above, the value of $sender_host_address$ after | |
2759 | conversion to the canonical form is `fe80:0000:0000:0a00:20ff:fe86:a061.5678`. | |
2760 | + | |
2761 | Comments as to what is going on are written to the standard error file. These | |
2762 | include lines beginning with ``LOG'' for anything that would have been logged. | |
2763 | This facility is provided for testing configuration options for incoming | |
2764 | messages, to make sure they implement the required policy. For example, you can | |
2765 | test your relay controls using %-bh%. | |
2766 | + | |
2767 | *Warning 1*: | |
2768 | cindex:[RFC 1413] | |
2769 | You cannot test features of the configuration that rely on | |
2770 | ident (RFC 1413) callouts. These cannot be done when testing using | |
2771 | %-bh% because there is no incoming SMTP connection. | |
2772 | + | |
2773 | *Warning 2*: Address verification callouts (see section <<SECTcallver>>) are | |
2774 | also skipped when testing using %-bh%. If you want these callouts to occur, | |
2775 | use %-bhc% instead. | |
2776 | + | |
2777 | Messages supplied during the testing session are discarded, and nothing is | |
2778 | written to any of the real log files. There may be pauses when DNS (and other) | |
2779 | lookups are taking place, and of course these may time out. The %-oMi% option | |
2780 | can be used to specify a specific IP interface and port if this is important. | |
2781 | + | |
2782 | The 'exim_checkaccess' utility is a ``packaged'' version of %-bh% whose | |
2783 | output just states whether a given recipient address from a given host is | |
2784 | acceptable or not. See section <<SECTcheckaccess>>. | |
2785 | ||
2786 | *-bhc*~<'IP~address'>:: | |
2787 | oindex:[%-bhc%] | |
2788 | This option operates in the same way as %-bh%, except that address | |
2789 | verification callouts are performed if required. This includes consulting and | |
2790 | updating the callout cache database. | |
2791 | ||
2792 | *-bi*:: | |
2793 | oindex:[%-bi%] | |
2794 | cindex:[alias file,building] | |
2795 | cindex:[building alias file] | |
2796 | cindex:[Sendmail compatibility,%-bi% option] | |
2797 | Sendmail interprets the %-bi% option as a request to rebuild its alias file. | |
2798 | Exim does not have the concept of a single alias file, and so it cannot mimic | |
2799 | this behaviour. However, calls to _/usr/lib/sendmail_ with the %-bi% option | |
2800 | tend to appear in various scripts such as NIS make files, so the option must be | |
2801 | recognized. | |
2802 | + | |
2803 | If %-bi% is encountered, the command specified by the %bi_command% | |
2804 | configuration option is run, under the uid and gid of the caller of Exim. If | |
2805 | the %-oA% option is used, its value is passed to the command as an argument. | |
2806 | The command set by %bi_command% may not contain arguments. The command can use | |
2807 | the 'exim_dbmbuild' utility, or some other means, to rebuild alias files if | |
2808 | this is required. If the %bi_command% option is not set, calling Exim with | |
2809 | %-bi% is a no-op. | |
2810 | ||
2811 | *-bm*:: | |
2812 | oindex:[%-bm%] | |
2813 | cindex:[local message reception] | |
2814 | This option runs an Exim receiving process that accepts an incoming, | |
2815 | locally-generated message on the current input. The recipients are given as the | |
2816 | command arguments (except when %-t% is also present -- see below). Each | |
2817 | argument can be a comma-separated list of RFC 2822 addresses. This is the | |
2818 | default option for selecting the overall action of an Exim call; it is assumed | |
2819 | if no other conflicting option is present. | |
2820 | + | |
2821 | If any addresses in the message are unqualified (have no domain), they are | |
2822 | qualified by the values of the %qualify_domain% or %qualify_recipient% | |
2823 | options, as appropriate. The %-bnq% option (see below) provides a way of | |
2824 | suppressing this for special cases. | |
2825 | + | |
2826 | Policy checks on the contents of local messages can be enforced by means of | |
2827 | the non-SMTP ACL. See chapter <<CHAPACL>> for details. | |
2828 | + | |
2829 | The return code | |
2830 | cindex:[return code,for %-bm%] | |
2831 | is zero if the message is successfully accepted. Otherwise, the | |
2832 | action is controlled by the %-oe'x'% option setting -- see below. | |
2833 | + | |
2834 | The format | |
2835 | cindex:[message,format] | |
2836 | cindex:[format,message] | |
2837 | cindex:[``From'' line] | |
2838 | cindex:[UUCP,``From'' line] | |
2839 | cindex:[Sendmail compatibility,``From'' line] | |
2840 | of the message must be as defined in RFC 2822, except that, for | |
2841 | compatibility with Sendmail and Smail, a line in one of the forms | |
2842 | ||
2843 | From sender Fri Jan 5 12:55 GMT 1997 | |
2844 | From sender Fri, 5 Jan 97 12:55:01 | |
2845 | + | |
2846 | (with the weekday optional, and possibly with additional text after the date) | |
2847 | is permitted to appear at the start of the message. There appears to be no | |
2848 | authoritative specification of the format of this line. Exim recognizes it by | |
2849 | matching against the regular expression defined by the %uucp_from_pattern% | |
2850 | option, which can be changed if necessary. | |
2851 | + | |
2852 | The | |
2853 | cindex:[%-f% option,overriding ``From'' line] | |
2854 | specified sender is treated as if it were given as the argument to the | |
2855 | %-f% option, but if a %-f% option is also present, its argument is used in | |
2856 | preference to the address taken from the message. The caller of Exim must be a | |
2857 | trusted user for the sender of a message to be set in this way. | |
2858 | ||
2859 | *-bnq*:: | |
2860 | oindex:[%-bnq%] | |
2861 | cindex:[address qualification, suppressing] | |
2862 | By default, Exim automatically qualifies unqualified addresses (those | |
2863 | without domains) that appear in messages that are submitted locally (that | |
2864 | is, not over TCP/IP). This qualification applies both to addresses in | |
2865 | envelopes, and addresses in header lines. Sender addresses are qualified using | |
2866 | %qualify_domain%, and recipient addresses using %qualify_recipient% (which | |
2867 | defaults to the value of %qualify_domain%). | |
2868 | + | |
2869 | Sometimes, qualification is not wanted. For example, if %-bS% (batch SMTP) is | |
2870 | being used to re-submit messages that originally came from remote hosts after | |
2871 | content scanning, you probably do not want to qualify unqualified addresses in | |
2872 | header lines. (Such lines will be present only if you have not enabled a header | |
2873 | syntax check in the appropriate ACL.) | |
2874 | + | |
2875 | The %-bnq% option suppresses all qualification of unqualified addresses in | |
2876 | messages that originate on the local host. When this is used, unqualified | |
2877 | addresses in the envelope provoke errors (causing message rejection) and | |
2878 | unqualified addresses in header lines are left alone. | |
2879 | ||
2880 | ||
2881 | *-bP*:: | |
2882 | oindex:[%-bP%] | |
2883 | cindex:[configuration options, extracting] | |
2884 | cindex:[options,configuration -- extracting] | |
2885 | If this option is given with no arguments, it causes the values of all Exim's | |
2886 | main configuration options to be written to the standard output. The values | |
2887 | of one or more specific options can be requested by giving their names as | |
2888 | arguments, for example: | |
2889 | ||
2890 | exim -bP qualify_domain hold_domains | |
2891 | + | |
2892 | However, any option setting that is preceded by the word ``hide'' in the | |
2893 | configuration file is not shown in full, except to an admin user. For other | |
2894 | users, the output is as in this example: | |
2895 | ||
2896 | mysql_servers = <value not displayable> | |
2897 | + | |
2898 | If %configure_file% is given as an argument, the name of the run time | |
2899 | configuration file is output. | |
2900 | If a list of configuration files was supplied, the value that is output here | |
2901 | is the name of the file that was actually used. | |
2902 | + | |
2903 | cindex:[daemon,process id (pid)] | |
2904 | cindex:[pid (process id),of daemon] | |
2905 | If %log_file_path% or %pid_file_path% are given, the names of the directories | |
2906 | where log files and daemon pid files are written are output, respectively. If | |
2907 | these values are unset, log files are written in a sub-directory of the spool | |
2908 | directory called %log%, and the pid file is written directly into the spool | |
2909 | directory. | |
2910 | + | |
2911 | If %-bP% is followed by a name preceded by `+`, for example, | |
2912 | ||
2913 | exim -bP +local_domains | |
2914 | + | |
2915 | it searches for a matching named list of any type (domain, host, address, or | |
2916 | local part) and outputs what it finds. | |
2917 | + | |
2918 | If | |
2919 | cindex:[options,router -- extracting] | |
2920 | cindex:[options,transport -- extracting] | |
2921 | one of the words %router%, %transport%, or %authenticator% is given, | |
2922 | followed by the name of an appropriate driver instance, the option settings for | |
2923 | that driver are output. For example: | |
2924 | ||
2925 | exim -bP transport local_delivery | |
2926 | + | |
2927 | The generic driver options are output first, followed by the driver's private | |
2928 | options. A list of the names of drivers of a particular type can be obtained by | |
2929 | using one of the words %router_list%, %transport_list%, or | |
2930 | %authenticator_list%, and a complete list of all drivers with their option | |
2931 | settings can be obtained by using %routers%, %transports%, or %authenticators%. | |
2932 | ||
2933 | ||
2934 | *-bp*:: | |
2935 | oindex:[%-bp%] | |
2936 | cindex:[queue,listing messages on] | |
2937 | cindex:[listing,messages on the queue] | |
2938 | This option requests a listing of the contents of the mail queue on the | |
2939 | standard output. If the %-bp% option is followed by a list of message ids, | |
2940 | just those messages are listed. By default, this option can be used only by an | |
2941 | admin user. However, the %queue_list_requires_admin% option can be set false | |
2942 | to allow any user to see the queue. | |
2943 | + | |
2944 | Each message on the queue is displayed as in the following example: | |
2945 | ||
2946 | 25m 2.9K 0t5C6f-0000c8-00 <alice@wonderland.fict.example> | |
2947 | red.king@looking-glass.fict.example | |
2948 | <other addresses> | |
2949 | + | |
2950 | The | |
2951 | cindex:[message,size in queue listing] | |
2952 | cindex:[size,of message] | |
2953 | first line contains the length of time the message has been on the queue | |
2954 | (in this case 25 minutes), the size of the message (2.9K), the unique local | |
2955 | identifier for the message, and the message sender, as contained in the | |
2956 | envelope. For bounce messages, the sender address is empty, and appears as | |
2957 | ``<>''. If the message was submitted locally by an untrusted user who overrode | |
2958 | the default sender address, the user's login name is shown in parentheses | |
2959 | before the sender address. | |
2960 | + | |
2961 | If | |
2962 | cindex:[frozen messages,in queue listing] | |
2963 | the message is frozen (attempts to deliver it are suspended) then the text | |
2964 | ``\*\*\* frozen \*\*\*'' is displayed at the end of this line. | |
2965 | + | |
2966 | The recipients of the message (taken from the envelope, not the headers) are | |
2967 | displayed on subsequent lines. Those addresses to which the message has already | |
2968 | been delivered are marked with the letter D. If an original address gets | |
2969 | expanded into several addresses via an alias or forward file, the original is | |
2970 | displayed with a D only when deliveries for all of its child addresses are | |
2971 | complete. | |
2972 | ||
2973 | ||
2974 | *-bpa*:: | |
2975 | oindex:[%-bpa%] | |
2976 | This option operates like %-bp%, but in addition it shows delivered addresses | |
2977 | that were generated from the original top level address(es) in each message by | |
2978 | alias or forwarding operations. These addresses are flagged with ``+D'' instead | |
2979 | of just ``D''. | |
2980 | ||
2981 | ||
2982 | *-bpc*:: | |
2983 | oindex:[%-bpc%] | |
2984 | cindex:[queue,count of messages on] | |
2985 | This option counts the number of messages on the queue, and writes the total | |
2986 | to the standard output. It is restricted to admin users, unless | |
2987 | %queue_list_requires_admin% is set false. | |
2988 | ||
2989 | ||
2990 | *-bpr*:: | |
2991 | oindex:[%-bpr%] | |
2992 | This option operates like %-bp%, but the output is not sorted into | |
2993 | chronological order of message arrival. This can speed it up when there are | |
2994 | lots of messages on the queue, and is particularly useful if the output is | |
2995 | going to be post-processed in a way that doesn't need the sorting. | |
2996 | ||
2997 | *-bpra*:: | |
2998 | oindex:[%-bpra%] | |
2999 | This option is a combination of %-bpr% and %-bpa%. | |
3000 | ||
3001 | *-bpru*:: | |
3002 | oindex:[%-bpru%] | |
3003 | This option is a combination of %-bpr% and %-bpu%. | |
3004 | ||
3005 | ||
3006 | *-bpu*:: | |
3007 | oindex:[%-bpu%] | |
3008 | This option operates like %-bp% but shows only undelivered top-level addresses | |
3009 | for each message displayed. Addresses generated by aliasing or forwarding are | |
3010 | not shown, unless the message was deferred after processing by a router with | |
3011 | the %one_time% option set. | |
3012 | ||
3013 | ||
3014 | *-brt*:: | |
3015 | oindex:[%-brt%] | |
3016 | cindex:[testing,retry configuration] | |
3017 | cindex:[retry,configuration testing] | |
3018 | This option is for testing retry rules, and it must be followed by up to three | |
3019 | arguments. It causes Exim to look for a retry rule that matches the values | |
3020 | and to write it to the standard output. For example: | |
3021 | ||
3022 | exim -brt bach.comp.mus.example | |
3023 | Retry rule: *.comp.mus.example F,2h,15m; F,4d,30m; | |
3024 | + | |
3025 | See chapter <<CHAPretry>> for a description of Exim's retry rules. The first | |
3026 | argument, which is required, can be a complete address in the form | |
3027 | 'local_part@domain', or it can be just a domain name. The second argument is | |
3028 | an optional second domain name; if no retry rule is found for the first | |
3029 | argument, the second is tried. This ties in with Exim's behaviour when looking | |
3030 | for retry rules for remote hosts -- if no rule is found that matches the host, | |
3031 | one that matches the mail domain is sought. The final argument is the name of a | |
3032 | specific delivery error, as used in setting up retry rules, for example | |
3033 | ``quota_3d''. | |
3034 | ||
3035 | *-brw*:: | |
3036 | oindex:[%-brw%] | |
3037 | cindex:[testing,rewriting] | |
3038 | cindex:[rewriting,testing] | |
3039 | This option is for testing address rewriting rules, and it must be followed by | |
3040 | a single argument, consisting of either a local part without a domain, or a | |
3041 | complete address with a fully qualified domain. Exim outputs how this address | |
3042 | would be rewritten for each possible place it might appear. See chapter | |
3043 | <<CHAPrewrite>> for further details. | |
3044 | ||
3045 | *-bS*:: | |
3046 | oindex:[%-bS%] | |
3047 | cindex:[SMTP,batched incoming] | |
3048 | cindex:[batched SMTP input] | |
3049 | This option is used for batched SMTP input, which is an alternative interface | |
3050 | for non-interactive local message submission. A number of messages can be | |
3051 | submitted in a single run. However, despite its name, this is not really SMTP | |
3052 | input. Exim reads each message's envelope from SMTP commands on the standard | |
3053 | input, but generates no responses. If the caller is trusted, or | |
3054 | %untrusted_set_sender% is set, the senders in the SMTP MAIL commands are | |
3055 | believed; otherwise the sender is always the caller of Exim. | |
3056 | + | |
3057 | The message itself is read from the standard input, in SMTP format (leading | |
3058 | dots doubled), terminated by a line containing just a single dot. An error is | |
3059 | provoked if the terminating dot is missing. A further message may then follow. | |
3060 | + | |
3061 | As for other local message submissions, the contents of incoming batch SMTP | |
3062 | messages can be checked using the non-SMTP ACL (see chapter <<CHAPACL>>). | |
3063 | Unqualified addresses are automatically qualified using %qualify_domain% and | |
3064 | %qualify_recipient%, as appropriate, unless the %-bnq% option is used. | |
3065 | + | |
3066 | Some other SMTP commands are recognized in the input. HELO and EHLO act | |
3067 | as RSET; VRFY, EXPN, ETRN, and HELP act as NOOP; | |
3068 | QUIT quits, ignoring the rest of the standard input. | |
3069 | + | |
3070 | cindex:[return code,for %-bS%] | |
3071 | If any error is encountered, reports are written to the standard output and | |
3072 | error streams, and Exim gives up immediately. The return code is 0 if no error | |
3073 | was detected; it is 1 if one or more messages were accepted before the error | |
3074 | was detected; otherwise it is 2. | |
3075 | + | |
3076 | More details of input using batched SMTP are given in section | |
3077 | <<SECTincomingbatchedSMTP>>. | |
3078 | ||
3079 | *-bs*:: | |
3080 | oindex:[%-bs%] | |
3081 | cindex:[SMTP,local input] | |
3082 | cindex:[local SMTP input] | |
3083 | This option causes Exim to accept one or more messages by reading SMTP commands | |
3084 | on the standard input, and producing SMTP replies on the standard output. SMTP | |
3085 | policy controls, as defined in ACLs (see chapter <<CHAPACL>>) are applied. | |
3086 | Some user agents use this interface as a way of passing locally-generated | |
3087 | messages to the MTA. | |
3088 | + | |
3089 | In | |
3090 | cindex:[sender,source of] | |
3091 | this usage, if the caller of Exim is trusted, or %untrusted_set_sender% is | |
3092 | set, the senders of messages are taken from the SMTP MAIL commands. | |
3093 | Otherwise the content of these commands is ignored and the sender is set up as | |
3094 | the calling user. Unqualified addresses are automatically qualified using | |
3095 | %qualify_domain% and %qualify_recipient%, as appropriate, unless the %-bnq% | |
3096 | option is used. | |
3097 | + | |
3098 | cindex:[inetd] | |
3099 | The | |
3100 | %-bs% option is also used to run Exim from 'inetd', as an alternative to using | |
3101 | a listening daemon. Exim can distinguish the two cases by checking whether the | |
3102 | standard input is a TCP/IP socket. When Exim is called from 'inetd', the source | |
3103 | of the mail is assumed to be remote, and the comments above concerning senders | |
3104 | and qualification do not apply. In this situation, Exim behaves in exactly the | |
3105 | same way as it does when receiving a message via the listening daemon. | |
3106 | ||
3107 | *-bt*:: | |
3108 | oindex:[%-bt%] | |
3109 | cindex:[testing,addresses] | |
3110 | cindex:[address,testing] | |
3111 | This option runs Exim in address testing mode, in which each argument is taken | |
3112 | as an address to be tested for deliverability. The results are written to the | |
3113 | standard output. If a test fails, and the caller is not an admin user, no | |
3114 | details of the failure are output, because these might contain sensitive | |
3115 | information such as usernames and passwords for database lookups. | |
3116 | + | |
3117 | If no arguments are given, Exim runs in an interactive manner, prompting with a | |
3118 | right angle bracket for addresses to be tested. | |
3119 | + | |
3120 | Unlike the %-be% test option, you cannot arrange for Exim to use the | |
3121 | 'readline()' function, because it is running as 'root' and there are | |
3122 | security issues. | |
3123 | + | |
3124 | Each address is handled as if it were the recipient address of a message | |
3125 | (compare the %-bv% option). It is passed to the routers and the result is | |
3126 | written to the standard output. However, any router that has | |
3127 | %no_address_test% set is bypassed. This can make %-bt% easier to use for | |
3128 | genuine routing tests if your first router passes everything to a scanner | |
3129 | program. | |
3130 | + | |
3131 | The | |
3132 | cindex:[return code,for %-bt%] | |
3133 | return code is 2 if any address failed outright; it is 1 if no address | |
3134 | failed outright but at least one could not be resolved for some reason. Return | |
3135 | code 0 is given only when all addresses succeed. | |
3136 | + | |
3137 | *Warning*: %-bt% can only do relatively simple testing. If any of the | |
3138 | routers in the configuration makes any tests on the sender address of a | |
3139 | message, | |
3140 | cindex:[%-f% option,for address testing] | |
3141 | you can use the %-f% option to set an appropriate sender when running | |
3142 | %-bt% tests. Without it, the sender is assumed to be the calling user at the | |
3143 | default qualifying domain. However, if you have set up (for example) routers | |
3144 | whose behaviour depends on the contents of an incoming message, you cannot test | |
3145 | those conditions using %-bt%. The %-N% option provides a possible way of | |
3146 | doing such tests. | |
3147 | ||
3148 | *-bV*:: | |
3149 | oindex:[%-bV%] | |
3150 | cindex:[version number of Exim, verifying] | |
3151 | This option causes Exim to write the current version number, compilation | |
3152 | number, and compilation date of the 'exim' binary to the standard output. | |
3153 | It also lists the DBM library this is being used, the optional modules (such as | |
3154 | specific lookup types), the drivers that are included in the binary, and the | |
3155 | name of the run time configuration file that is in use. | |
3156 | + | |
3157 | As part of its operation, %-bV% causes Exim to read and syntax check its | |
3158 | configuration file. However, this is a static check only. It cannot check | |
3159 | values that are to be expanded. For example, although a misspelt ACL verb is | |
3160 | detected, an error in the verb's arguments is not. You cannot rely on %-bV% | |
3161 | alone to discover (for example) all the typos in the configuration; some | |
3162 | realistic testing is needed. The %-bh% and %-N% options provide more dynamic | |
3163 | testing facilities. | |
3164 | ||
3165 | *-bv*:: | |
3166 | oindex:[%-bv%] | |
3167 | cindex:[verifying address, using %-bv%] | |
3168 | cindex:[address,verification] | |
3169 | This option runs Exim in address verification mode, in which each argument is | |
3170 | taken as an address to be verified. During normal operation, verification | |
3171 | happens mostly as a consequence processing a %verify% condition in an ACL (see | |
3172 | chapter <<CHAPACL>>). If you want to test an entire ACL, see the %-bh% option. | |
3173 | + | |
3174 | If verification fails, and the caller is not an admin user, no details of the | |
3175 | failure are output, because these might contain sensitive information such as | |
3176 | usernames and passwords for database lookups. | |
3177 | + | |
3178 | If no arguments are given, Exim runs in an interactive manner, prompting with a | |
3179 | right angle bracket for addresses to be verified. | |
3180 | + | |
3181 | Unlike the %-be% test option, you cannot arrange for Exim to use the | |
3182 | 'readline()' function, because it is running as 'exim' and there are | |
3183 | security issues. | |
3184 | + | |
3185 | Verification differs from address testing (the %-bt% option) in that routers | |
3186 | that have %no_verify% set are skipped, and if the address is accepted by a | |
3187 | router that has %fail_verify% set, verification fails. The address is verified | |
3188 | as a recipient if %-bv% is used; to test verification for a sender address, | |
3189 | %-bvs% should be used. | |
3190 | + | |
3191 | If the %-v% option is not set, the output consists of a single line for each | |
3192 | address, stating whether it was verified or not, and giving a reason in the | |
3193 | latter case. Otherwise, more details are given of how the address has been | |
3194 | handled, and in the case of address redirection, all the generated addresses | |
3195 | are also considered. Without %-v%, generating more than one address by | |
3196 | redirection causes verification to end sucessfully. | |
3197 | + | |
3198 | The | |
3199 | cindex:[return code,for %-bv%] | |
3200 | return code is 2 if any address failed outright; it is 1 if no address | |
3201 | failed outright but at least one could not be resolved for some reason. Return | |
3202 | code 0 is given only when all addresses succeed. | |
3203 | + | |
3204 | If any of the routers in the configuration makes any tests on the sender | |
3205 | address of a message, you should use the %-f% option to set an appropriate | |
3206 | sender when running %-bv% tests. Without it, the sender is assumed to be the | |
3207 | calling user at the default qualifying domain. | |
3208 | ||
3209 | *-bvs*:: | |
3210 | oindex:[%-bvs%] | |
3211 | This option acts like %-bv%, but verifies the address as a sender rather | |
3212 | than a recipient address. This affects any rewriting and qualification that | |
3213 | might happen. | |
3214 | ||
3215 | *-C*~<'filelist'>:: | |
3216 | oindex:[%-C%] | |
3217 | cindex:[configuration file,alternate] | |
3218 | cindex:[CONFIGURE_FILE] | |
3219 | cindex:[alternate configuration file] | |
3220 | This option causes Exim to find the run time configuration file from the given | |
3221 | list instead of from the list specified by the CONFIGURE_FILE | |
3222 | compile-time setting. Usually, the list will consist of just a single file | |
3223 | name, but it can be a colon-separated list of names. In this case, the first | |
3224 | file that exists is used. Failure to open an existing file stops Exim from | |
3225 | proceeding any further along the list, and an error is generated. | |
3226 | + | |
3227 | When this option is used by a caller other than root or the Exim user, and the | |
3228 | list is different from the compiled-in list, Exim gives up its root privilege | |
3229 | immediately, and runs with the real and effective uid and gid set to those of | |
3230 | the caller. However, if ALT_CONFIG_ROOT_ONLY is defined in | |
3231 | _Local/Makefile_, root privilege is retained for %-C% only if the caller of | |
3232 | Exim is root. | |
3233 | + | |
3234 | That is, the Exim user is no longer privileged in this regard. This build-time | |
3235 | option is not set by default in the Exim source distribution tarbundle. | |
3236 | However, if you are using a ``packaged'' version of Exim (source or binary), the | |
3237 | packagers might have enabled it. | |
3238 | + | |
3239 | Setting ALT_CONFIG_ROOT_ONLY locks out the possibility of testing a | |
3240 | configuration using %-C% right through message reception and delivery, even if | |
3241 | the caller is root. The reception works, but by that time, Exim is running as | |
3242 | the Exim user, so when it re-execs to regain privilege for the delivery, the | |
3243 | use of %-C% causes privilege to be lost. However, root can test reception and | |
3244 | delivery using two separate commands (one to put a message on the queue, using | |
3245 | %-odq%, and another to do the delivery, using %-M%). | |
3246 | + | |
3247 | If ALT_CONFIG_PREFIX is defined _in Local/Makefile_, it specifies a | |
3248 | prefix string with which any file named in a %-C% command line option | |
3249 | must start. In addition, the file name must not contain the sequence `/../`. | |
3250 | However, if the value of the %-C% option is identical to the value of | |
3251 | CONFIGURE_FILE in _Local/Makefile_, Exim ignores %-C% and proceeds as | |
3252 | usual. There is no default setting for ALT_CONFIG_PREFIX; when it is | |
3253 | unset, any file name can be used with %-C%. | |
3254 | + | |
3255 | ALT_CONFIG_PREFIX can be used to confine alternative configuration files | |
3256 | to a directory to which only root has access. This prevents someone who has | |
3257 | broken into the Exim account from running a privileged Exim with an arbitrary | |
3258 | configuration file. | |
3259 | + | |
3260 | The %-C% facility is useful for ensuring that configuration files are | |
3261 | syntactically correct, but cannot be used for test deliveries, unless the | |
3262 | caller is privileged, or unless it is an exotic configuration that does not | |
3263 | require privilege. No check is made on the owner or group of the files | |
3264 | specified by this option. | |
3265 | ||
3266 | *-D*<'macro'>=<'value'>:: | |
3267 | oindex:[%-D%] | |
3268 | cindex:[macro,setting on command line] | |
3269 | This option can be used to override macro definitions in the configuration file | |
3270 | (see section <<SECTmacrodefs>>). However, like %-C%, if it is used by an | |
3271 | unprivileged caller, it causes Exim to give up its root privilege. | |
3272 | If DISABLE_D_OPTION is defined in _Local/Makefile_, the use of %-D% is | |
3273 | completely disabled, and its use causes an immediate error exit. | |
3274 | + | |
3275 | The entire option (including equals sign if present) must all be within one | |
3276 | command line item. %-D% can be used to set the value of a macro to the empty | |
3277 | string, in which case the equals sign is optional. These two commands are | |
3278 | synonymous: | |
3279 | ||
3280 | exim -DABC ... | |
3281 | exim -DABC= ... | |
3282 | + | |
3283 | To include spaces in a macro definition item, quotes must be used. If you use | |
3284 | quotes, spaces are permitted around the macro name and the equals sign. For | |
3285 | example: | |
3286 | ||
3287 | exim '-D ABC = something' ... | |
3288 | + | |
3289 | %-D% may be repeated up to 10 times on a command line. | |
3290 | ||
3291 | *-d*<'debug~options'>:: | |
3292 | oindex:[%-d%] | |
3293 | cindex:[debugging,list of selectors] | |
3294 | cindex:[debugging,%-d% option] | |
3295 | This option causes debugging information to be written to the standard | |
3296 | error stream. It is restricted to admin users because debugging output may show | |
3297 | database queries that contain password information. Also, the details of users' | |
068aaea8 PH |
3298 | filter files should be protected. When %-d% is used, %-v% is assumed. If %-d% |
3299 | is given on its own, a lot of standard debugging data is output. This can be | |
3300 | reduced, or increased to include some more rarely needed information, by | |
3301 | directly following %-d% with a string made up of names preceded by plus or | |
3302 | minus characters. These add or remove sets of debugging data, respectively. For | |
168e428f | 3303 | example, %-d+filter% adds filter debugging, whereas %-d-all+filter% selects |
068aaea8 PH |
3304 | only filter debugging. Note that no spaces are allowed in the debug setting. |
3305 | The available debugging categories are: | |
168e428f PH |
3306 | + |
3307 | &&& | |
3308 | `acl ` ACL interpretation | |
3309 | `auth ` authenticators | |
3310 | `deliver ` general delivery logic | |
3311 | `dns ` DNS lookups (see also resolver) | |
3312 | `dnsbl ` DNS black list (aka RBL) code | |
3313 | `exec ` arguments for ^^execv()^^ calls | |
3314 | `expand ` detailed debugging for string expansions | |
3315 | `filter ` filter handling | |
3316 | `hints_lookup ` hints data lookups | |
3317 | `host_lookup ` all types of name-to-IP address handling | |
3318 | `ident ` ident lookup | |
3319 | `interface ` lists of local interfaces | |
3320 | `lists ` matching things in lists | |
3321 | `load ` system load checks | |
3322 | `local_scan ` can be used by ^^local_scan()^^ (see chapter <<CHAPlocalscan>>) | |
3323 | `lookup ` general lookup code and all lookups | |
3324 | `memory ` memory handling | |
3325 | `pid ` add pid to debug output lines | |
3326 | `process_info ` setting info for the process log | |
3327 | `queue_run ` queue runs | |
3328 | `receive ` general message reception logic | |
3329 | `resolver ` turn on the DNS resolver's debugging output | |
3330 | `retry ` retry handling | |
3331 | `rewrite ` address rewriting | |
3332 | `route ` address routing | |
3333 | `timestamp ` add timestamp to debug output lines | |
3334 | `tls ` TLS logic | |
3335 | `transport ` transports | |
3336 | `uid ` changes of uid/gid and looking up uid/gid | |
3337 | `verify ` address verification logic | |
068aaea8 | 3338 | `all ` almost all of the above (see below), and also %-v% |
168e428f PH |
3339 | &&& |
3340 | + | |
068aaea8 PH |
3341 | [revisionflag="changed"] |
3342 | The `all` option excludes `memory` when used as `+all`, but includes it for | |
3343 | `-all`. The reason for this is that `+all` is something that people tend to use | |
3344 | when generating debug output for Exim maintainers. If `+memory` is included, an | |
3345 | awful lot of output that is very rarely of interest is generated, so it now has | |
3346 | to be explicitly requested. However, `-all` does turn everything off. | |
3347 | + | |
168e428f PH |
3348 | The |
3349 | cindex:[resolver, debugging output] | |
3350 | cindex:[DNS resolver, debugging output] | |
3351 | `resolver` option produces output only if the DNS resolver was compiled | |
3352 | with DEBUG enabled. This is not the case in some operating systems. Also, | |
3353 | unfortunately, debugging output from the DNS resolver is written to stdout | |
3354 | rather than stderr. | |
3355 | + | |
3356 | The default (%-d% with no argument) omits `expand`, `filter`, | |
3357 | `interface`, `load`, `memory`, `pid`, `resolver`, and `timestamp`. | |
3358 | However, the `pid` selector is forced when debugging is turned on for a | |
3359 | daemon, which then passes it on to any re-executed Exims. Exim also | |
3360 | automatically adds the pid to debug lines when several remote deliveries are | |
3361 | run in parallel. | |
3362 | + | |
3363 | The `timestamp` selector causes the current time to be inserted at the start | |
3364 | of all debug output lines. This can be useful when trying to track down delays | |
3365 | in processing. | |
3366 | + | |
3367 | If the %debug_print% option is set in any driver, it produces output whenever | |
3368 | any debugging is selected, or if %-v% is used. | |
3369 | ||
3370 | *-dd*<'debug~options'>:: | |
3371 | oindex:[%-dd%] | |
3372 | This option behaves exactly like %-d% except when used on a command that | |
3373 | starts a daemon process. In that case, debugging is turned off for the | |
3374 | subprocesses that the daemon creates. Thus, it is useful for monitoring the | |
3375 | behaviour of the daemon without creating as much output as full debugging does. | |
3376 | ||
3377 | *-dropcr*:: | |
3378 | oindex:[%-dropcr%] | |
3379 | This is an obsolete option that is now a no-op. It used to affect the way Exim | |
3380 | handled CR and LF characters in incoming messages. What happens now is | |
3381 | described in section <<SECTlineendings>>. | |
3382 | ||
3383 | *-E*:: | |
3384 | oindex:[%-E%] | |
3385 | cindex:[bounce message,generating] | |
3386 | This option specifies that an incoming message is a locally-generated delivery | |
3387 | failure report. It is used internally by Exim when handling delivery failures | |
3388 | and is not intended for external use. Its only effect is to stop Exim | |
3389 | generating certain messages to the postmaster, as otherwise message cascades | |
3390 | could occur in some situations. As part of the same option, a message id may | |
3391 | follow the characters %-E%. If it does, the log entry for the receipt of the | |
3392 | new message contains the id, following ``R='', as a cross-reference. | |
3393 | ||
3394 | *-e*'x':: | |
3395 | oindex:[%-e'x'%] | |
3396 | There are a number of Sendmail options starting with %-oe% which seem to be | |
3397 | called by various programs without the leading %o% in the option. For example, | |
3398 | the %vacation% program uses %-eq%. Exim treats all options of the form | |
3399 | %-e'x'% as synonymous with the corresponding %-oe'x'% options. | |
3400 | ||
3401 | *-F*~<'string'>:: | |
3402 | oindex:[%-F%] | |
3403 | cindex:[sender,name] | |
3404 | cindex:[name,of sender] | |
3405 | This option sets the sender's full name for use when a locally-generated | |
3406 | message is being accepted. In the absence of this option, the user's 'gecos' | |
3407 | entry from the password data is used. As users are generally permitted to alter | |
3408 | their 'gecos' entries, no security considerations are involved. White space | |
3409 | between %-F% and the <'string'> is optional. | |
3410 | ||
3411 | *-f*~<'address'>:: | |
3412 | oindex:[%-f%] | |
3413 | cindex:[sender,address] | |
3414 | cindex:[address,sender] | |
3415 | cindex:[trusted user] | |
3416 | cindex:[envelope sender] | |
3417 | cindex:[user,trusted] | |
3418 | This option sets the address of the envelope sender of a locally-generated | |
3419 | message (also known as the return path). The option can normally be used only | |
3420 | by a trusted user, but %untrusted_set_sender% can be set to allow untrusted | |
3421 | users to use it. | |
3422 | + | |
3423 | Processes running as root or the Exim user are always trusted. Other | |
3424 | trusted users are defined by the %trusted_users% or %trusted_groups% options. | |
3425 | In the absence of %-f%, or if the caller is not trusted, the sender of a local | |
3426 | message is set to the caller's login name at the default qualify domain. | |
3427 | + | |
3428 | There is one exception to the restriction on the use of %-f%: an empty sender | |
3429 | can be specified by any user, trusted or not, to create a message that can | |
3430 | never provoke a bounce. An empty sender can be specified either as an empty | |
3431 | string, or as a pair of angle brackets with nothing between them, as in these | |
3432 | examples of shell commands: | |
3433 | ||
3434 | exim -f '<>' user@domain | |
3435 | exim -f "" user@domain | |
3436 | + | |
3437 | In addition, the use of %-f% is not restricted when testing a filter file with | |
3438 | %-bf% or when testing or verifying addresses using the %-bt% or %-bv% | |
3439 | options. | |
3440 | + | |
3441 | Allowing untrusted users to change the sender address does not of itself make | |
3442 | it possible to send anonymous mail. Exim still checks that the 'From:' header | |
3443 | refers to the local user, and if it does not, it adds a 'Sender:' header, | |
3444 | though this can be overridden by setting %no_local_from_check%. | |
3445 | + | |
3446 | White | |
3447 | cindex:[``From'' line] | |
3448 | space between %-f% and the <'address'> is optional (that is, they can be given | |
3449 | as two arguments or one combined argument). The sender of a locally-generated | |
3450 | message can also be set (when permitted) by an initial ``From '' line in the | |
3451 | message -- see the description of %-bm% above -- but if %-f% is also present, | |
3452 | it overrides ``From''. | |
3453 | ||
3454 | *-G*:: | |
3455 | oindex:[%-G%] | |
3456 | cindex:[Sendmail compatibility,%-G% option ignored] | |
3457 | This is a Sendmail option which is ignored by Exim. | |
3458 | ||
3459 | *-h*~<'number'>:: | |
3460 | oindex:[%-h%] | |
3461 | cindex:[Sendmail compatibility,%-h% option ignored] | |
3462 | This option is accepted for compatibility with Sendmail, but has no effect. (In | |
3463 | Sendmail it overrides the ``hop count'' obtained by counting 'Received:' | |
3464 | headers.) | |
3465 | ||
3466 | *-i*:: | |
3467 | oindex:[%-i%] | |
3468 | cindex:[Solaris,'mail' command] | |
3469 | cindex:[dot in incoming, non-SMTP message] | |
3470 | This option, which has the same effect as %-oi%, specifies that a dot on a line | |
3471 | by itself should not terminate an incoming, non-SMTP message. I can find no | |
3472 | documentation for this option in Solaris 2.4 Sendmail, but the 'mailx' command | |
3473 | in Solaris 2.4 uses it. See also %-ti%. | |
3474 | ||
3475 | *-M*~<'message~id'>~<'message~id'>~...:: | |
3476 | oindex:[%-M%] | |
3477 | cindex:[forcing delivery] | |
3478 | cindex:[delivery,forcing attempt] | |
3479 | cindex:[frozen messages,forcing delivery] | |
3480 | This option requests Exim to run a delivery attempt on each message in turn. If | |
3481 | any of the messages are frozen, they are automatically thawed before the | |
3482 | delivery attempt. The settings of %queue_domains%, %queue_smtp_domains%, and | |
3483 | %hold_domains% are ignored. | |
3484 | + | |
3485 | Retry | |
3486 | cindex:[hints database,overriding retry hints] | |
3487 | hints for any of the addresses are overridden -- Exim tries to deliver even if | |
3488 | the normal retry time has not yet been reached. This option requires the caller | |
3489 | to be an admin user. However, there is an option called %prod_requires_admin% | |
3490 | which can be set false to relax this restriction (and also the same requirement | |
3491 | for the %-q%, %-R%, and %-S% options). | |
068aaea8 PH |
3492 | + |
3493 | [revisionflag="changed"] | |
3494 | The deliveries happen synchronously, that is, the original Exim process does | |
3495 | not terminate until all the delivery attempts have finished. No output is | |
3496 | produced unless there is a serious error. If you want to see what is happening, | |
3497 | use the %-v% option as well, or inspect Exim's main log. | |
168e428f PH |
3498 | |
3499 | *-Mar*~<'message~id'>~<'address'>~<'address'>~...:: | |
3500 | oindex:[%-Mar%] | |
3501 | cindex:[message,adding recipients] | |
3502 | cindex:[recipient,adding] | |
3503 | This option requests Exim to add the addresses to the list of recipients of the | |
3504 | message (``ar'' for ``add recipients''). The first argument must be a message id, | |
3505 | and the remaining ones must be email addresses. However, if the message is | |
3506 | active (in the middle of a delivery attempt), it is not altered. This option | |
3507 | can be used only by an admin user. | |
3508 | ||
3509 | *-MC*~<'transport'>~<'hostname'>~<'sequence~number'>~<'message~id'>:: | |
3510 | oindex:[%-MC%] | |
3511 | cindex:[SMTP,passed connection] | |
3512 | cindex:[SMTP,multiple deliveries] | |
3513 | cindex:[multiple SMTP deliveries] | |
3514 | This option is not intended for use by external callers. It is used internally | |
3515 | by Exim to invoke another instance of itself to deliver a waiting message using | |
3516 | an existing SMTP connection, which is passed as the standard input. Details are | |
3517 | given in chapter <<CHAPSMTP>>. This must be the final option, and the caller must | |
3518 | be root or the Exim user in order to use it. | |
3519 | ||
3520 | *-MCA*:: | |
3521 | oindex:[%-MCA%] | |
3522 | This option is not intended for use by external callers. It is used internally | |
3523 | by Exim in conjunction with the %-MC% option. It signifies that the connection | |
3524 | to the remote host has been authenticated. | |
3525 | ||
3526 | *-MCP*:: | |
3527 | oindex:[%-MCP%] | |
3528 | This option is not intended for use by external callers. It is used internally | |
3529 | by Exim in conjunction with the %-MC% option. It signifies that the server to | |
3530 | which Exim is connected supports pipelining. | |
3531 | ||
3532 | *-MCQ*~<'process~id'>~<'pipe~fd'>:: | |
3533 | oindex:[%-MCQ%] | |
3534 | This option is not intended for use by external callers. It is used internally | |
3535 | by Exim in conjunction with the %-MC% option when the original delivery was | |
3536 | started by a queue runner. It passes on the process id of the queue runner, | |
3537 | together with the file descriptor number of an open pipe. Closure of the pipe | |
3538 | signals the final completion of the sequence of processes that are passing | |
3539 | messages through the same SMTP connection. | |
3540 | ||
3541 | *-MCS*:: | |
3542 | oindex:[%-MCS%] | |
3543 | This option is not intended for use by external callers. It is used internally | |
3544 | by Exim in conjunction with the %-MC% option, and passes on the fact that the | |
3545 | SMTP SIZE option should be used on messages delivered down the existing | |
3546 | connection. | |
3547 | ||
3548 | *-MCT*:: | |
3549 | oindex:[%-MCT%] | |
3550 | This option is not intended for use by external callers. It is used internally | |
3551 | by Exim in conjunction with the %-MC% option, and passes on the fact that the | |
3552 | host to which Exim is connected supports TLS encryption. | |
3553 | ||
3554 | *-Mc*~<'message~id'>~<'message~id'>~...:: | |
3555 | oindex:[%-Mc%] | |
3556 | cindex:[hints database,not overridden by %-Mc%] | |
3557 | cindex:[delivery,manually started -- not forced] | |
3558 | This option requests Exim to run a delivery attempt on each message in turn, | |
3559 | but unlike the %-M% option, it does check for retry hints, and respects any | |
3560 | that are found. This option is not very useful to external callers. It is | |
3561 | provided mainly for internal use by Exim when it needs to re-invoke itself in | |
3562 | order to regain root privilege for a delivery (see chapter <<CHAPsecurity>>). | |
3563 | However, %-Mc% can be useful when testing, in order to run a delivery that | |
3564 | respects retry times and other options such as %hold_domains% that are | |
3565 | overridden when %-M% is used. Such a delivery does not count as a queue run. | |
3566 | If you want to run a specific delivery as if in a queue run, you should use | |
3567 | %-q% with a message id argument. A distinction between queue run deliveries | |
3568 | and other deliveries is made in one or two places. | |
3569 | ||
3570 | *-Mes*~<'message~id'>~<'address'>:: | |
3571 | oindex:[%-Mes%] | |
3572 | cindex:[message,changing sender] | |
3573 | cindex:[sender,changing] | |
3574 | This option requests Exim to change the sender address in the message to the | |
3575 | given address, which must be a fully qualified address or ``<>'' (``es'' for ``edit | |
3576 | sender''). There must be exactly two arguments. The first argument must be a | |
3577 | message id, and the second one an email address. However, if the message is | |
3578 | active (in the middle of a delivery attempt), its status is not altered. This | |
3579 | option can be used only by an admin user. | |
3580 | ||
3581 | *-Mf*~<'message~id'>~<'message~id'>~...:: | |
3582 | oindex:[%-Mf%] | |
3583 | cindex:[freezing messages] | |
3584 | cindex:[message,manually freezing] | |
3585 | This option requests Exim to mark each listed message as ``frozen''. This | |
3586 | prevents any delivery attempts taking place until the message is ``thawed'', | |
3587 | either manually or as a result of the %auto_thaw% configuration option. | |
3588 | However, if any of the messages are active (in the middle of a delivery | |
3589 | attempt), their status is not altered. This option can be used only by an admin | |
3590 | user. | |
3591 | ||
3592 | *-Mg*~<'message~id'>~<'message~id'>~...:: | |
3593 | oindex:[%-Mg%] | |
3594 | cindex:[giving up on messages] | |
3595 | cindex:[message,abandoning delivery attempts] | |
3596 | cindex:[delivery,abandoning further attempts] | |
3597 | This option requests Exim to give up trying to deliver the listed messages, | |
3598 | including any that are frozen. However, if any of the messages are active, | |
3599 | their status is not altered. For non-bounce messages, a delivery error message | |
3600 | is sent to the sender, containing the text ``cancelled by administrator''. | |
3601 | Bounce messages are just discarded. This option can be used only by an admin | |
3602 | user. | |
3603 | ||
3604 | *-Mmad*~<'message~id'>~<'message~id'>~...:: | |
3605 | oindex:[%-Mmad%] | |
3606 | cindex:[delivery,cancelling all] | |
3607 | This option requests Exim to mark all the recipient addresses in the messages | |
3608 | as already delivered (``mad'' for ``mark all delivered''). However, if any | |
3609 | message is active (in the middle of a delivery attempt), its status is not | |
3610 | altered. This option can be used only by an admin user. | |
3611 | ||
3612 | *-Mmd*~<'message~id'>~<'address'>~<'address'>~...:: | |
3613 | oindex:[%-Mmd%] | |
3614 | cindex:[delivery,cancelling by address] | |
3615 | cindex:[recipient,removing] | |
3616 | cindex:[removing recipients] | |
3617 | This option requests Exim to mark the given addresses as already delivered | |
3618 | (``md'' for ``mark delivered''). The first argument must be a message id, and | |
3619 | the remaining ones must be email addresses. These are matched to recipient | |
3620 | addresses in the message in a case-sensitive manner. If the message is active | |
3621 | (in the middle of a delivery attempt), its status is not altered. This option | |
3622 | can be used only by an admin user. | |
3623 | ||
3624 | *-Mrm*~<'message~id'>~<'message~id'>~...:: | |
3625 | oindex:[%-Mrm%] | |
3626 | cindex:[removing messages] | |
3627 | cindex:[abandoning mail] | |
3628 | cindex:[message,manually discarding] | |
3629 | This option requests Exim to remove the given messages from the queue. No | |
3630 | bounce messages are sent; each message is simply forgotten. However, if any of | |
3631 | the messages are active, their status is not altered. This option can be used | |
3632 | only by an admin user or by the user who originally caused the message to be | |
3633 | placed on the queue. | |
3634 | ||
3635 | *-Mt*~<'message~id'>~<'message~id'>~...:: | |
3636 | oindex:[%-Mt%] | |
3637 | cindex:[thawing messages] | |
3638 | cindex:[unfreezing messages] | |
3639 | cindex:[frozen messages,thawing] | |
3640 | cindex:[message,thawing frozen] | |
3641 | This option requests Exim to ``thaw'' any of the listed messages that are | |
3642 | ``frozen'', so that delivery attempts can resume. However, if any of the messages | |
3643 | are active, their status is not altered. This option can be used only by an | |
3644 | admin user. | |
3645 | ||
3646 | *-Mvb*~<'message~id'>:: | |
3647 | oindex:[%-Mvb%] | |
3648 | cindex:[listing,message body] | |
3649 | cindex:[message,listing body of] | |
3650 | This option causes the contents of the message body (-D) spool file to be | |
3651 | written to the standard output. This option can be used only by an admin user. | |
3652 | ||
3653 | *-Mvh*~<'message~id'>:: | |
3654 | oindex:[%-Mvh%] | |
3655 | cindex:[listing,message headers] | |
3656 | cindex:[header lines,listing] | |
3657 | cindex:[message,listing header lines] | |
3658 | This option causes the contents of the message headers (-H) spool file to be | |
3659 | written to the standard output. This option can be used only by an admin user. | |
3660 | ||
3661 | *-Mvl*~<'message~id'>:: | |
3662 | oindex:[%-Mvl%] | |
3663 | cindex:[listing,message log] | |
3664 | cindex:[message,listing message log] | |
3665 | This option causes the contents of the message log spool file to be written to | |
3666 | the standard output. This option can be used only by an admin user. | |
3667 | ||
3668 | *-m*:: | |
3669 | oindex:[%-m%] | |
3670 | This is apparently a synonym for %-om% that is accepted by Sendmail, so Exim | |
3671 | treats it that way too. | |
3672 | ||
3673 | *-N*:: | |
3674 | oindex:[%-N%] | |
3675 | cindex:[debugging,%-N% option] | |
3676 | cindex:[debugging,suppressing delivery] | |
3677 | This is a debugging option that inhibits delivery of a message at the transport | |
3678 | level. It implies %-v%. Exim goes through many of the motions of delivery -- | |
3679 | it just doesn't actually transport the message, but instead behaves as if it | |
3680 | had successfully done so. However, it does not make any updates to the retry | |
3681 | database, and the log entries for deliveries are flagged with ``\*>'' rather | |
3682 | than ``=>''. | |
3683 | + | |
3684 | Because %-N% discards any message to which it applies, only root or the Exim | |
3685 | user are allowed to use it with %-bd%, %-q%, %-R% or %-M%. In other words, | |
3686 | an ordinary user can use it only when supplying an incoming message to which it | |
3687 | will apply. Although transportation never fails when %-N% is set, an address | |
3688 | may be deferred because of a configuration problem on a transport, or a routing | |
3689 | problem. Once %-N% has been used for a delivery attempt, it sticks to the | |
3690 | message, and applies to any subsequent delivery attempts that may happen for | |
3691 | that message. | |
3692 | ||
3693 | *-n*:: | |
3694 | oindex:[%-n%] | |
3695 | cindex:[Sendmail compatibility,%-n% option ignored] | |
3696 | This option is interpreted by Sendmail to mean ``no aliasing''. It is ignored by | |
3697 | Exim. | |
3698 | ||
3699 | *-O*~<'data'>:: | |
3700 | oindex:[%-O%] | |
3701 | This option is interpreted by Sendmail to mean `set option`. It is ignored by | |
3702 | Exim. | |
3703 | ||
3704 | *-oA*~<'file~name'>:: | |
3705 | oindex:[%-oA%] | |
3706 | cindex:[Sendmail compatibility,%-oA% option] | |
3707 | This option is used by Sendmail in conjunction with %-bi% to specify an | |
3708 | alternative alias file name. Exim handles %-bi% differently; see the | |
3709 | description above. | |
3710 | ||
3711 | *-oB*~<'n'>:: | |
3712 | oindex:[%-oB%] | |
3713 | cindex:[SMTP,passed connection] | |
3714 | cindex:[SMTP,multiple deliveries] | |
3715 | cindex:[multiple SMTP deliveries] | |
3716 | This is a debugging option which limits the maximum number of messages that can | |
3717 | be delivered down one SMTP connection, overriding the value set in any ^smtp^ | |
3718 | transport. If <'n'> is omitted, the limit is set to 1. | |
3719 | ||
3720 | *-odb*:: | |
3721 | oindex:[%-odb%] | |
3722 | cindex:[background delivery] | |
3723 | cindex:[delivery,in the background] | |
3724 | This option applies to all modes in which Exim accepts incoming messages, | |
3725 | including the listening daemon. It requests ``background'' delivery of such | |
3726 | messages, which means that the accepting process automatically starts a | |
3727 | delivery process for each message received, but does not wait for the delivery | |
3728 | processes to finish. | |
3729 | + | |
3730 | When all the messages have been received, the reception process exits, | |
3731 | leaving the delivery processes to finish in their own time. The standard output | |
3732 | and error streams are closed at the start of each delivery process. | |
3733 | This is the default action if none of the %-od% options are present. | |
3734 | + | |
3735 | If one of the queueing options in the configuration file | |
3736 | (%queue_only% or %queue_only_file%, for example) is in effect, %-odb% | |
3737 | overrides it if %queue_only_override% is set true, which is the default | |
3738 | setting. If %queue_only_override% is set false, %-odb% has no effect. | |
3739 | ||
3740 | *-odf*:: | |
3741 | oindex:[%-odf%] | |
3742 | cindex:[foreground delivery] | |
3743 | cindex:[delivery,in the foreground] | |
3744 | This option requests ``foreground'' (synchronous) delivery when Exim has accepted | |
3745 | a locally-generated message. (For the daemon it is exactly the same as | |
3746 | %-odb%.) A delivery process is automatically started to deliver the | |
3747 | message, and Exim waits for it to complete before proceeding. | |
3748 | + | |
3749 | The original Exim reception process does not finish until the delivery | |
3750 | process for the final message has ended. The standard error stream is left open | |
3751 | during deliveries. | |
3752 | + | |
3753 | However, like %-odb%, this option has no effect if %queue_only_override% is | |
3754 | false and one of the queueing options in the configuration file is in effect. | |
3755 | + | |
3756 | If there is a temporary delivery error during foreground delivery, the | |
3757 | message is left on the queue for later delivery, and the original reception | |
068aaea8 | 3758 | process exits. See chapter <<CHAPnonqueueing>> for a way of setting up a |
168e428f PH |
3759 | restricted configuration that never queues messages. |
3760 | ||
3761 | ||
3762 | *-odi*:: | |
3763 | oindex:[%-odi%] | |
3764 | This option is synonymous with %-odf%. It is provided for compatibility with | |
3765 | Sendmail. | |
3766 | ||
3767 | *-odq*:: | |
3768 | oindex:[%-odq%] | |
3769 | cindex:[non-immediate delivery] | |
3770 | cindex:[delivery,suppressing immediate] | |
3771 | cindex:[queueing incoming messages] | |
3772 | This option applies to all modes in which Exim accepts incoming messages, | |
3773 | including the listening daemon. It specifies that the accepting process should | |
3774 | not automatically start a delivery process for each message received. Messages | |
3775 | are placed on the queue, and remain there until a subsequent queue runner | |
3776 | process encounters them. There are several configuration options (such as | |
3777 | %queue_only%) that can be used to queue incoming messages under certain | |
3778 | conditions. This option overrides all of them and also %-odqs%. It always | |
3779 | forces queueing. | |
3780 | ||
3781 | *-odqs*:: | |
3782 | oindex:[%-odqs%] | |
3783 | cindex:[SMTP,delaying delivery] | |
3784 | This option is a hybrid between %-odb%/%-odi% and %-odq%. | |