html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}body{font-size:62.5%;font-family:Verdana,Arial,Helvetica,Sans-Serif}h1,h2,h3,h4,h5,h6{font-family:serif;line-height:1.7;font-weight:bold}h1{font-size:3.0em;text-align:center}h2{font-size:2.2em;text-align:center}h3{font-size:1.7em}h4{font-size:1.5em}h5{font-size:1.3em}h6{font-size:1.1em}@media all and (max-width:640px){h1{font-size:2.4em}h2{font-size:1.4em}h3{font-size:1.25em}h4{font-size:1.2em}h5{font-size:1.15em}h6{font-size:1.1em}}a{color:#037094}a:visited{color:#335024}a:hover,a:visited:hover{color:#000}html,body{height:100%;background-color:#fff}.hidden{display:none}#inner ul,#inner ol{padding:0 0 1em 4em}#inner p,#inner pre{margin-bottom:1em}#inner pre{font-family:monospace;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}#content{padding:0 1em}@media all and (max-width:640px){#content{padding:0}}#header{position:absolute;top:0;left:0;height:2em;width:100%;line-height:2;background-color:#000;z-index:1000;background-color:#1f3c5a;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#032044',endColorstr='#1f3c5a');background:-webkit-gradient(linear,left top,left bottom,from(#032044),to(#1f3c5a));background:-moz-linear-gradient(top,#032044,#1f3c5a)}@media all and (max-width:640px){#header{height:2.5em;line-height:2.5}}body > #header.fixed{position:fixed}#header a{color:#fff;white-space:nowrap}#header a:hover{color:#aaf}#header,.nav{opacity:0.925}#outer{position:absolute;top:0;left:0;width:100%;min-height:100%;height:auto !important;height:100%;background-color:#fff}#outer .left_bar,#outer .right_bar{display:none}#outer > .left_bar.display,#outer > .right_bar.display{display:block;position:absolute;top:0;width:10%;height:100%;background-color:#ddd}#outer > .left_bar{left:0}#outer > .right_bar{right:0}@media all and (max-width:640px){#outer > .left_bar.display,#outer > .right_bar.display{display:none}}.nav{position:relative;top:0;left:0;margin-top:6em;padding:0 0 0.5em 0;width:100%;text-align:center;list-style:none;background-color:#1f3c5a;z-index:1000}.nav li{display:inline;font-size:1.2em;padding:0 0.3em}.nav li a{color:#fff}.nav li a:hover{color:#aaf}.nav li a:visited{color:#aaf}.nav li a:visited:hover{color:#fff}#outer > #nav_float{position:fixed;top:0;left:0;width:100%;display:none;margin-top:0}.nav li.search,.nav form{display:inline;padding-top:4px}.nav .search_field_container.roundit .search_field{border:0;padding:0;margin:0}.nav .search_field_container.roundit{background-color:#fff;-moz-border-radius:1em;-webkit-border-radius:1em;padding:0.1em 1em;font-size:1.2em}.nav .search_field_container{cursor:text}#inner{z-index:1000;width:80%;min-width:50%;max-width:65em;padding:0.71429em 0 1.42857em 0;margin:0 auto;font-size:1.4em;line-height:2;background-color:#fff}@media all and (max-width:640px){#inner{width:auto}}#branding{display:block;visibility:hidden;width:80%;margin:-1.42857em auto 1.42857em auto;overflow:hidden;border:0;outline:0}#footer{position:absolute;bottom:0;left:0;height:1.4em;width:100%;z-index:1000;line-height:1.4;text-align:center;text-align:center}#footer,#footer a{color:#999}#footer:hover,#footer:hover a{color:#444}#footer a:hover{color:#000}.docbook_filename,.docbook_emphasis,.docbook_function{font-style:italic}.docbook_option,.docbook_command{font-weight:bold}.docbook_literal{font-family:monospace}.docbook_literallayout{background-color:#e8e8d0}.docbook_literallayout pre{padding:1em;margin-bottom:1em}(function($){var $nav_float=$('#nav_flow').clone().attr('id','nav_float').appendTo('#outer');var floating=false;$(window).bind('load resize scroll',function(){var header_height=$('#header').height();var top=$(this).scrollTop();if(top>header_height){if(!floating){$nav_float.show();$('#nav_flow').css('visibility','hidden');floating=true;}}else{if(floating){$nav_float.hide();$('#nav_flow').css('visibility','visible');floating=false;}}});$('#outer > .right_bar, #outer > .left_bar').addClass('display');})(jQuery);if(document.location.href.match(/^https?:\/\/([^\/]+\.)*exim\.org\//)){$('#branding').remove();}else{$('#branding').ready(function(){try{var doc=$('#branding')[0].contentWindow.document;if(doc.title.match(/\b(found|404)\b/i)){$('#branding').remove();}else{$(doc).find('a').each(function(){if($(this).attr('title')=='')$(this).attr('title','Sponsor of this mirror');$(this).css('opacity',0.8).mouseover(function(){$(this).css('opacity',1)}).mouseout(function(){$(this).css('opacity',0.8)});});$('#branding').height($(doc).find('img').height()?$(doc).find('img').height()+16+'px':'auto').hide().css('visibility','visible').fadeIn(2000);}}catch(e){$('#branding').remove();}});} (function(){$('#footer').hide();setTimeout(function(){$('#footer').fadeIn('slow')},2000);})();(function(){if(!('placeholder' in document.createElement('input')))$('.nav li.search input.search_field').focus(function(e){if($(this).val()===' '+$(this).attr('placeholder'))$(this).val('').css('color','#000');}).blur(function(e){if($(this).val()===' '+$(this).attr('placeholder')||$(this).val()==='')$(this).css('color','#666').val(' '+$(this).attr('placeholder'));}).blur();if(document.body.style.MozBorderRadius!==undefined)$('.search_field_container').addClass('roundit').click(function(){$(this).find('input').focus()});})();(function($){var jump=function(id){if($('#'+id).length==0)return false;document.location.href=document.location.href.replace(/#.+/,'')+'#'+id;$('html,body').animate({scrollTop:$('#'+id).position()['top']-$('.nav').height()-5},100);return true;};var uri=document.location.pathname;var uri_end=uri.replace(/^.*\//,'');if(document.location.href.match(/#./))jump(document.location.href.replace(/^.*#(.+)$/,'$1'));$('a').live('click',function(e){var href=$(this).attr('href');if(!href.match(/^.*#.+$/))return true;var href_uri=href.replace(/^([^#]*)(#.*)?/,'$1');if(href_uri.match(/^([a-z]+:)?\/\//))return true;if(href_uri.match(/^[^\/]/)&&href_uri!=uri_end)return true;if(href_uri.match(/^\//)&&href_uri!=uri)return true;if(jump(href.replace(/^.*#(.+)$/,'$1')))e.preventDefault();});$(window).bind('hashchange',function(e){if(jump(document.location.href.replace(/^.*#(.+)$/,'$1')))e.preventDefault();});})(jQuery);(function($){window._gaq=[['_setAccount','UA-18951566-1'],['_trackPageview']];$.getScript((document.location.protocol==='https:'?'https://ssl':'http://www')+'.google-analytics.com/ga.js');})(jQuery);
Filter files, especially the more complicated ones, should always be tested, as
it is easy to make mistakes. Exim provides a facility for preliminary testing
of a filter file before installing it. This tests the syntax of the file and
its basic operation, and can also be used with ordinary `.forward'
The Exim Mail Transport Agent
Date: 10 July 1997
Exim is a mail transport agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet. It is freely available under the terms of the GNU General Public Licence. In style it is similar to Smail 3, but its facilities are more extensive, and in particular it has some defences against mail bombs and unsolicited junk mail, in the form of options for refusing messages from particular hosts, networks, or senders.
Exim is in production use on a number of sites that move tens of thousands of messages per day. This document contains an overview description of the way Exim works, with a certain amount of omission and simplification to keep it fairly short. Please address any enquiries about Exim to Philip Hazel:
Email: <ph10@cus.cam.ac.uk> Phone: +44 1223 334714 Fax: +44 1223 334679University of Cambridge Computer Laboratory Pembroke Street Cambridge CB2 3QG United Kingdom
This document is copyright (c) University of Cambridge 1997, but copying
permission is granted to all.
-------------------------------------------------------------------------
"If I have seen further it is by standing on the shoulders of giants."
(Isaac Newton)
Exim owes a great deal to Smail 3 and its author, Ron Karr. Without the experience of running and working on the Smail 3 code, I could never have contemplated starting to write a new mailer. Many of the ideas and configuration interfaces are taken from Smail 3, though the actual code of Exim is entirely new.
My intention was to write a mailer that had more functionality than Smail 3, but which retained the simple lightweight approach, as this seemed to me to be all that was needed for systems directly connected to the Internet, where most messages are delivered almost immediately.
The current distribution of Exim is available from
$st{ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-$si{n.nn}.tar.gz}
where n.nn is the version number. The distribution contains an ASCII copy of the documentation; other formats are available from
$st{ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-postscript-$si{n.nn}.tar.gz}
$st{ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-texinfo-$si{n.nn}.tar.gz}
The following operating systems are currently supported: AIX, BSDI, DGUX, FreeBSD, HI-OSF (Hitachi), HP-UX, IRIX, Linux, MIPS RISCOS, NetBSD, OpenBSD, DEC OSF1 (aka Digital UNIX), SCO, SCO SVR4.2 (aka UNIX-SV), SunOS4, SunOS5, Ultrix, and Unixware.
For the benefit of those reading this overview to see whether Exim is of interest to them, its limitations are listed first.
Exim follows the same general approach of decentralized control that Smail 3 does. There is no central process doing overall management of mail delivery. However, unlike Smail, the independent delivery processes share data in the form of `hints', which makes delivery more efficient in some cases. The hints are kept in a number of DBM files. If any of these files are lost, the only effect is to change the pattern of delivery attempts and retries.
Here is a summary of Exim's main features. More details are given in the sections which follow.
Although I did not specifically set out to write a high-performance MTA, Exim does seem to be fairly efficient. The busiest site I know of is an mailing list exploder that sometimes handles over 100,000 deliveries a day on a big Linux box, the record being 177,000 deliveries (791MB in total). Up to 13,000 deliveries in an hour have been reported.
Like many MTAs, Exim has adopted the Sendmail interface so that it can be a straight replacement for `/usr/lib/sendmail'. All the relevant Sendmail options are implemented. There are also some additional options that are compatible with Smail 3, and some further options that are new to Exim.
The runtime configuration interface is a single file which is divided into a number of sections. The entries in this file consist of keywords and values, in the style of Smail 3 configuration files.
Control of messages on the queue can be done via certain privileged command line options. There is also an optional monitor program called `eximon', which displays current information in an X window and contains interfaces to the command line options.
When Exim receives a message, it writes two files in its spool directory. The first contains the envelope information, the current status of the message, and the headers, while the second contains the body of the message. The status of the message includes a complete list of recipients and a list of those that have already received the message. The header file gets updated during the course of delivery if necessary.
A message remains in the spool directory until it is completely delivered to its recipients or to an error address, or until it is deleted by an administrator or by the user who originally created it. In cases when delivery cannot proceed -- for example, when a message can neither be delivered to its recipients nor returned to its sender, the message is marked `frozen' on the spool, and no more deliveries are attempted. The administrator can thaw such messages when the problem has been corrected, and can also freeze individual messages by hand if necessary.
As delivery proceeds, Exim writes timestamped information about each address to a per-message log file; this includes any delivery error messages. This log is solely for the benefit of the administrator. All the information Exim itself needs for delivery is kept in the header spool file. The message log file is deleted with the spool files. If a message is delayed for more than a configured time, a warning message is sent to the sender. This is repeated whenever the same time elapses again without delivery being complete.
The main delivery processing elements of Exim are called directors, routers, and transports. Code for a number of these is provided, and compile-time options specify which ones are actually included in the binary. Directors handle addresses that include one of the local domains, routers handle remote addresses, and transports do actual deliveries.
When a message is to be delivered, the sequence of events is roughly as follows:
Exim can be configured to allow users to set up filter files as an alternative to the traditional `.forward' files. A filter file can test various characteristics of a message, including the contents of the headers and the start of the body, and direct delivery to specified addresses, files, or pipes according to what it finds. The system-wide filter file uses the same control syntax.
The existing directors are listed below. I use the RFC 822 term local-part to mean that portion of an address that comes before the @ character.
foo: uid=1234 gid=5678 mailbox=/home_1/foo/inboxcould be used on a system that did local deliveries without consulting its `passwd' file. The `aliasfile' director could use the file to verify that the local part was valid, and then the `appendfile' transport could use it to get a uid, gid, and mailbox for the delivery. The `aliasfile' director can also be configured to include the domain in the key that is looked up, making it possible to hold aliases for several different local domains in the same file.
/some/list/directory/${local_part}
and it is possible to specify an error address for each list that depends on the
list name. Generated pipe and file addresses can be (independently) locked out.
The configuration file determines which directors are actually used, and in which order. It is possible to use the same director more than once, with different options.
The addresses a director handles can be constrained in the following ways:
In addition, certain files can be required to exist or not exist for a given director to be run.
The existing routers are:
The configuration file determines which routers are actually used, and in which order. It is possible to use the same router more than once, with different options.
Like directors, routers can be constrained to handle only certain domains or certain local parts (though I haven't seen a good use for that yet), or messages from certain senders. If a router times out, either the delivery can be deferred, or the address can be passed on to the next router.
A flag controls whether a router is called when an address is being verified, as opposed to being routed for delivery.
Local and remote transports are handled differently. A local transport is always run in a separate process with an appropriate real uid and gid. Their values can be specified in the transport's configuration, or passed over from the director that handled the address. Remote transports run under exim's own uid. The existing transports are:
/home/${local_part}/inbox
/var/mail/${local_part}
are typical examples. However, it is possible to look up each individual user's
inbox name in a file, should that be required.
Exclusive access to the file is ensured by using the traditional mailbox
locking strategy of creating a lock file. The lock creation process uses a
`hitching post' algorithm (similar to that used by Pine) which is robust
when the mailbox file is NFS-mounted. The file is also locked using the `lockf'
function, but either locking mechanism can be turned off if necessary.
The `appendfile' transport can also be configured to deliver each message into
a separate file in a given directory, optionally in `maildir' format.
Options on this transport allow for the insertion of a prefix line (e.g. `From
xxx...') and suffix line, special processing of message lines starting with
`From', and the addition of `Return-path', `Delivery-date', and `Envelope-to'
headers. If the mailbox file is not a regular file, or does not have the
correct owner, group, or permissions, no delivery takes place; the address is
deferred and the postmaster is informed, except that, if the file's permissions
are greater than those required, Exim reduces the permissions and carries
on. There are additional checks to reduce the possibility of security exposures
caused by race conditions.
Exim write four different log files:
A utility script for renaming and compressing the main and reject logs each night is provided. There are also scripts for extracting statistics from log files and for searching log files for the entries for messages that match a given pattern. For example, one can pull out all entries relating to messages for a given local part.
Exim maintains a number of databases in DBM files to help it perform efficient mail delivery. In effect, the files contain hints, and if they are lost it is not a disaster -- Exim's performance just suffers a bit. The three databases currently used are:
There is a utility program that lists the contents of one of these databases, and another that allows manual modifications to be applied in some cases. Database records are timestamped, and there is a utility that removes records that are older than a given period, and also cleans up `wait-smtp' records containing references to messages that no longer exist. Running this daily or weekly should be sufficient to keep the files reasonably tidy.
Exim can use any one of the following DBM libraries: `ndbm', `gdbm', `DB 1.85', or `DB 2.x'.
When an SMTP delivery attempt fails, causing the message to be deferred till later, Exim updates a DBM database that contains records keyed by host name plus IP address. Each record holds a list of messages that are waiting for that host and address.
When an SMTP delivery succeeds, Exim consults the database to see if there are any other messages waiting for the same host and address. If it finds any, it creates a new Exim process and passes it the open SMTP channel and a message identification. The new process then delivers the waiting message down the existing channel and may in turn cause the creation of yet another process. Any other waiting addresses in the message are skipped. The maximum number of messages sent down one connection is configurable.
This scheme achieves some SMTP efficiency when a number of messages have been queued up for a given host, without the overhead of a heavyweight queueing apparatus.
When a message cannot immediately be directed, routed, or delivered, it remains on the queue and another delivery attempt occurs at a later time. While failures to deliver to remote hosts are the most common cause of this, it is also possible for a message to be deferred as a result of temporary local delivery failure, or following directing or routing. A local delivery can fail if the user is over quota, while directing can be delayed if a user's home directory is not available (e.g. missing NFS mount), and therefore the existence of a `.forward' file cannot be tested. Routing can be delayed by DNS timeouts.
Exim can be given a set of rules which specify how often to retry deferred addresses, and when to give up. These rules apply to directing and routing as well as to transporting, and are keyed by (wildcarded) domain name or, for local users, by local-part and domain name, either of which can be wildcarded.
Each rule is actually a sequential list of subrules, which are applied successively as time passes. At present there are two kinds of subrule: fixed interval, and geometrically increasing interval. For example, it is possible to specify a rule such as `retry every 15 minutes for 2 hours; then increase the interval between retries by a factor of 1.5 each time until 8 hours have passed; then retry every 8 hours until 4 days have passed; then give up'. The times are measured from when the address first failed, so, for example, if a host has been down for 2 days, new messages will immediately go on to the 8-hour retry schedule.
Exim does not have an elaborate series of alarm clocks to cause retries to happen exactly on schedule. A queue-runner process is started periodically, to attempt delivery, one by one, of messages containing addresses that have passed their next retry time. If such an address fails again, a new retry time is computed, and so subsequent messages queued for the same address get skipped. The queue is not processed sequentially, but in a `random' order, to prevent one rogue message that causes a problem blocking other messages to the same destination for ever.
When the maximum time for retrying has passed, pending addresses are failed. However, a next try time is still computed from the final subrule. Until that time is reached, any new messages for the address are immediately failed. When the next try time is passed, one further delivery attempt is made; if this fails, a new next try time is computed, and so on.
The increasing number of small computers on the Internet has caused there to be a lot of messages addressed to hosts that are never going to listen. The retry logic described above should reduce the amount of wasted time spent on trying to deliver such messages. However, some administrators are unhappy about this rather draconian approach, which can cause an address to be failed without any deliveries being attempted. Exim can alternatively be configured always to try at least once those hosts whose last failure was before the arrival of the message. This option increases the number of attempts to deliver to dead hosts.
Retry rules can be predicated on particular errors as well as on domain names, and for domains that are looked up in the DNS, further discrimination on whether MX records were used or not is also possible. Thus it is possible to treat `connection refused' and `connection timed out' differently, or to distinguish between `connection refused and there was only an A record' and `connection refused from a host pointed to by an MX record'.
When a local delivery fails because a user is over quota, the retry rule can be predicated on the length of time since the mailbox was last read. For example, if the mailbox has been recently read, the delivery can be retried for a while; otherwise it can be failed quickly.
There are those who argue that header rewriting is a totally Bad Thing; there are others who swear they cannot live without it. Exim provides the facility -- you do not have t
"If I have seen further it is by standing on the shoulders of giants."
(Isaac Newton)
Exim is a mail transfer agent (MTA) for Unix systems connected to the Internet. Configuration files currently exist for the following operating systems: AIX, BSDI, DGUX, FreeBSD, HI-OSF (Hitachi), HP-UX, IRIX, Linux, MIPS RISCOS, NetBSD, OpenBSD, DEC's OSF1 (aka Digital UNIX), SCO, SCO SVR4.2 (aka UNIX-SV), SunOS4, SunOS5, Ultrix, and Unixware. However, code is not available for determining system load averages for AIX or Ultrix.
The terms and conditions for the use and distribution of Exim are contained in the file `NOTICE'. Exim is distributed under the terms of the GNU General Public Licence, a copy of which may be found in the file `LICENCE'.
Exim owes a great deal to Smail 3 and its author, Ron Karr. Without the experience of running and working on the Smail 3 code, I could never have contemplated starting to write a new mailer. Many of the ideas and user interfaces are taken from Smail 3, though the actual code of Exim is entirely new.
I am indebted to my colleague Piete Brooks for suggesting and implementing the scheme for building Exim for multiple architectures and operating systems, for porting Exim to several different versions of Unix, and for numerous suggestions. Many other people, both in Cambridge and around the world, have contributed to the development and the testing of Exim, and to porting it to various operating systems. I am grateful to them all.
This edition of the Exim specification applies to version 1.90 of Exim. Substantive changes from the 1.80 edition are marked by bars in the right margin, except in the Texinfo version of the documentation, because Texinfo doesn't support change bars. Minor corrections and rewordings are not so marked.
As the program is still developing, there may be features in later versions of the program that have not yet made it into this document, which is updated only when there is a reasonable batch of changes to make. However, all changes are noted briefly in the distributed file called `doc/ChangeLog', and specifications of new features that are not in this manual are placed in `doc/NewStuff'.
There is a web site at `http://www.exim.org' by courtesy of Planet Online Ltd, who also run the following mailing lists:
`exim-users@exim.org' general discussion list `exim-users-digest@exim.org' digest form of `exim-users' `exim-announce@exim.org' moderated, low volume announcements list
Messages that are sent to the announcements list are automatically copied to the main list, and thence to the digest list. You should therefore join only one list. Requests to be added to or deleted from the mailing lists should be sent to `exim-users-request@exim.org', `exim-users-digest-request@exim.org', or `exim-announce-request@exim.org', respectively.
By courtesy of Martin Hamilton, there is an archive of the `exim-users' list in plain text form at `http://www.roads.lut.ac.uk/lists/exim-users/exim-users.archive' and in HTML via Hypermail at `http://www.roads.lut.ac.uk/lists/exim-users/'.
The list is also forwarded to `http://www.findmail.com/listserver/exim-users', which is an archiving system with searching capabilities.
The current release of Exim is always to be found in
`ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-n.nn.tar.gz'
where n.nn is the highest such version number in the directory. When there is only a small amount of change from one version to the next, a patch file may be provided, with a final component name of the form
`exim-patch-n.nn-m.mm.gz'
The main distribution contains ASCII versions of this specification and other documentation; other formats of the documents are available in separate files:
`ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-pdf-n.nn.tar.gz' `ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-postscript-n.nn.tar.gz' `ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/exim-texinfo-n.nn.tar.gz'
These tar files contain only the `/doc' directory, not the complete distribution. The documentation is also available online at th
Exim's command line takes the standard Unix form of a sequence of options, each starting with a hyphen character, followed by a number of arguments. The options are compatible with the main options of Sendmail, and there are also some additional options, some of which are compatible with Smail 3. Certain combinations of options do not make sense, and provoke an error if used. The form of the arguments depends on which options are set.
If Exim is called under the name `mailq', it behaves as if the option `-bp' were present before any other options. This is for compatibility with some systems that contain a command of that name in one of the standard libraries, symbolically linked to `/usr/lib/sendmail'.
If Exim is called under the name `rsmtp' it behaves as if the option `-bS' were present before any other options, for compatibility with `smail'. The `-bS' option is used for reading in a number of messages in batched SMTP format.
If Exim is called under the name `rmail' it behaves as if the `-i' and `-oee' options were present before any other options, for compatibility with `smail'. The name `rmail' is used as an interface by some UUCP systems.
If Exim is called under the name `runq' it behaves as if the option `-q' were present before any other options, for compatibility with `smail'. The `-q' option causes a single queue-runner process to be started.
Some Exim options are available only to trusted users and others are available only to admin users.
The command options are described in alphabetical order below.
This is a pseudo-option whose only purpose is to terminate the options and
therefore to cause subsequent command line items to be treated as arguments
rather than options, even if they begin with hyphens.
-- option
Run Exim as a daemon, awaiting incoming SMTP connections. This option can be used only by an admin user. If either of the `-d' or `-dm' options are set, the daemon does not disconnect from the controlling terminal. By default, Exim listens for incoming connections on all the host's interfaces, but it can be restricted to specific interfaces by setting the `local_interfaces' option in the configuration file. The standard SMTP port is used, but this can be varied by means of the `daemon_smtp_service' configuration option or the `-oX' command line option. Most commonly, the `-bd' option is combined with the `-q'<time> option, to cause periodic queue runs to happen as well.
The process id of a daemon that is both listening and starting queue runners is written to a file called `exim-daemon.pid' in Exim's spool directory, unless a non-standard port is used, in which case the file name is `exim-daemon.<port-number>.pid'. If a daemon is run with only one of `-bd' ot `-q'<time>, then that option is added on to the end of the file name, allowing sites that run two separate daemons to distinguish them.
It is possible to change the directory in which these pid files are written by changing the setting of PID_FILE_PATH in `Local/Makefile'. Further details are given in the comments in `src/EDITME'.
The SIGHUP signal can be used to cause the daemon to re-exec itself. This should be done whenever Exim's configuration file is changed, or a new version of Exim is installed. It is not necessary to do this when other files (for example, alias files) are changed.
This option is the same as `-bf' except that it assumes that the filter being tested is a system filter. The additional commands that are available only in system filters are recognized.
Run Exim in filter testing mode; the file is the filter file to be tested, and a test message must be supplied on the standard input. If there are no message-dependent tests in the filter, an empty file can be supplied. If a system filter file is being tested, `-bF' should be used instead of `-bf'. If the test file does not begin with the special line
# Exim filter
then it is taken to be a normal `.forward' file, and is tested for validity under that interpretation. The result of this command, provided no errors are detected, is a list of the actions that Exim would try to take if presented with the message for real. More details of filter testing are given in the separate document entitled Exim's User interface to mail filtering.
When testing a filter file, the envelope sender can be set by the `-f' option, or by a `From ' line at the start of the test message.
Various parameters that would normally be taken from the envelope recipient address of the message can be set by means of additional command line options. These are:`-bfd' <domain> default is the qualify domain `-bfl' <local_part> default is the logged in user `-bfp' <local_part_prefix> default is null `-bfs' <local_part_suffix> default is null
The local part should always be set to the incoming address with any prefix or suffix stripped, because that is how it appears when a message is actually being delivered.
This option runs a fake SMTP session as if from the IP address, using the standard input and output. Additional comments as to what is going on are written to the standard error file. These include lines beginning with `LOG' for anything that would have been logged. This facility is for testing configuration options for blocking hosts and/or senders and for checking on relaying control. Messages supplied during the testing session are discarded, and nothing is written to any of the real log files. There may be pauses when DNS (and other) lookups are taking place, and of course these may time out.
Sendmail interprets the `-bi' option as a request to rebuild its alias file. Exim does not have the concept of a single alias file, and so it cannot mimic this behaviour. However, calls to `/usr/lib/sendmail -bi' tend to appear in various scripts such as NIS make files, so the option must be recognized.
If `-bi' is encountered, the command specified by the `bi_command' configuration option is run, under the uid and gid of the caller of Exim. If the `-oA' option is used, its value is passed to the command as an argument. The command set by `bi_command' may not contain arguments. The command can use the `exim_dbmbuild' utility, or some other means, to rebuild alias files if this is required. If the `bi_command' option is not set, then calling Exim with `-bi' is a no-op.
Accept an incoming, locally-generated message on the current input, and deliver it to the addresses given as the command arguments (except when `-t' is also given -- see below). Each argument can be a comma-separated list of RFC 822 addresses. This is the default option, and is assumed if no other conflicting option is present.
The format of the message must be as defined in RFC 822, except that, for compatibility with `sendmail' and `smail', a line in one of the forms
From sender Fri Jan 5 12:55 GMT 1997 From sender Fri, 5 Jan 97 12:55:01
(with the weekday optional, and
possibly with additional text after the date) is permitted to appear at the start of the message. There appears to be no authoritative specification of the format of this line. Exim recognizes it by matching against the regular expression defined by the `uucp_from_pattern' option, which can be changed if necessary. The specified sender is treated as if it were given as the argument to the `-f' option, but if a `-f' option is also present, its argument is used in preference to the address taken from the message. The caller of Exim must be an admin user for the sender of a message to be set in this way.List the contents of the mail queue on the current output. Each message on the queue is displayed as in the following example:
25m 2.9K 0t5C6f-0000c8-00 <alice@wonderland.fict.book>
red.king@looking-glass.fict.book
<other addresses>
The first line contains the length of time the message has been on the queue (in this case 25 minutes), the size of the message (2.9K), the unique local identifier for the message, and the message sender, as contained in the envelope. If the message is a delivery error message, the sender address is empty, and appears as `<>'. If the message is frozen (attempts to deliver it are suspended) then the text `*** frozen ***' is displayed at the end of this line.
The recipients of the message (taken from the envelope, not the headers) are displayed on subsequent lines. Those addresses to which the message has already been delivered are marked with the letter D. If an original address gets expanded into several addresses via an alias or forward file, the original is displayed with a D only when deliveries for all of its child addresses are complete.
If the `-bp' option is followed by a list of message ids, then just those messages are listed.
This option operates like `-bp', but in addition it shows delivered addresses that were generated from the original top level address(es) in each message by alias or forwarding operations. These addresses are flagged with `+D' instead of just `D'.
This option operates like `-bp' but shows only undelivered addresses for each message displayed.
If this option is given with no arguments, it causes the values of all Exim's main configuration options to be written to the standard output. The values of one or more specific options can be requested by giving their names as arguments, for example:
exim -bP qualify_domain local_domains
If `configure_file' is given, the name of the runtime configuration file is output. If `log_file_path' or `pid_file_path' are given, the names of the directories where log files and daemon pid files are written are output, respectively. If these values are unset, log files are written in a sub-directory of the spool directory called `log', and pid files are written directly into the spool directory.
If one of the words `director', `router', or `transport' is given, followed by the name of an appropriate driver instance, the option settings for that driver are output. For example:
exim -bP transport local_delivery
The generic driver options are output first, followed by the driver's private options. A list of the names of drivers of a particular type can be obtained by using one of the words `director_list', `router_list', or `transport_list', and a complete list of all drivers with their option settings can be obtained by using `directors', `routers', or `transports'.
This option is for testing retry rules, and it must be followed by up to three arguments. It causes Exim to look for a retry rule that matches the values and to write it to the standard output. For example:
exim -brt bach.comp.mus Retry rule: *.comp.mus F,2h,15m; FG,4d,30m;
See chapter "Retry configuration" for a description of Exim's retry rules. The first argument, which is required, can be a complete address in the form `local_part@domain', or it can be just a domain name. The second argument is an optional second domain name; if no retry rule is found for the first argument, the second is tried. This ties in with Exim's behaviour when looking for retry rules for remote hosts -- if no rule is found that matches the host, one that matches the mail domain is sought. The final argument is the name of a specific delivery error, as used in setting up retry rules, for example `quota_3d'.
This option is for testing address rewriting rules, and it must be followed by a single argument, consisting of either a local part without a domain, or a complete address with a fully qualified domain. Exim outputs how this address would be rewritten for each possible place it might appear.
This option is used for batched SMTP input, where messages have been received from some external
The first part of the runtime configuration file contains the main configuration settings. Each setting occupies one line of the file, except that string values can be continued onto multiple lines as described in section "String" in chapter "The Exim configuration file". All macro definitions must be in this part of the file -- they differ from options settings by starting with an upper-case letter (see section "Macros in the configuration file" in chapter "The Exim configuration file"). The available options are as follows:
Option: accept_8bitmime
Type: boolean
Default: false
This option causes Exim to send 8BITMIME in its response to an SMTP EHLO command, and to accept the BODY= parameter on MAIL FROM commands. However, though Exim is 8-bit clean, it is not a protocol converter, and it takes no steps to do anything special with messages received by this route. Consequently, this option is turned off by default.
Option: accept_timeout
Type: time
Default: 0s
This sets the timeout for accepting a non-SMTP message, that is, the maximum time that Exim waits when reading a message on the standard input. If the value is zero, it will wait for ever. This setting is overridden by the `-or' command option.
Option: address_directory_transport
Type: string
Default: "address_directory"
This sets the default name of the transport driver that is to be used when the expansion of the local part of an address by an aliasing or forwarding director results in a path ending in `/', implying