UPDATE-EXIM4.CONF(8)
π UPDATE-EXIM4.CONF π
okay bestie, this is update-exim4.conf from the System Manager's Manual section (8) β the girlies who keep the mail server running know her, and now you will too. π
β¨ NAME β¨
update-exim4.conf β Generate exim4 configuration files. that's it, that's her whole job, and she ate. π
β¨ SYNOPSIS β¨
update-exim4.conf [-v|--verbose] [-h|--help] [--keepcomments]
[--removecomments] [-o|--output file]
β¨ OPTIONS β¨
--checkβ she makes a lil temporary config file, vibe-checks whether it's actually valid, and then bounces with either success (exitcode 0) or an error (exitcode 1). if it's valid the temp file gets yeeted; if it's not, the file gets left behind so you can go debug it. π΅οΈβοΈ-d|--confdirdirectory β read the input from directory instead of/etc/exim4.-h|--helpβ show a short help message and dip. π«Ά--keepcommentsβ do NOT remove comment lines from the output file. keep them, they're valid, they have main character energy too.-o|--outputfile β write the output to file instead of/var/lib/exim4/config.autogenerated.--removecommentsβ remove comment lines from the output file. this one's the [Default] btw, so it happens unless you say otherwise.-v|--verboseβ enable verbose mode. she will yap and honestly? we love that for her.
β¨ DESCRIPTION β¨
so the script update-exim4.conf generates the main configuration files /var/lib/exim4/config.autogenerated for Exim v4 by merging the data in the template file /etc/exim4/exim4.conf.template β or the ones in the /etc/exim4/conf.d directory tree, respectively β and /etc/exim4/update-exim4.conf.conf to the output file /var/lib/exim4/config.autogenerated. β¨
if dc_use_split_config in /etc/exim4/update-exim4.conf.conf specifies a split configuration, update-exim4.conf processes the /etc/exim4/conf.d subdirectories in the order main, acl, router, transport, retry, rewrite and auth. within each directory it takes files in lexical sort order by file name. it concatenates all these files and makes the debconf replacement described below. no cap. π¦
if you're not using split configuration, update-exim4.conf concatenates /etc/exim4/exim4.conf.localmacros (if this file exists) and /etc/exim4/exim4.conf.template (in this order) and makes the debconf replacement described below.
in either case, before outputting the result to /var/lib/exim4/config.autogenerated, update-exim4.conf generates a number of exim configuration macros from the contents of dc_something from /etc/exim4/update-exim4.conf.conf and inserts them into the configuration right after the definition of the exim configuration macro UPEX4CmacrosUPEX4C (which is only used as placeholder for this case). the macro definitions are bracketed with .ifdef clauses to allow the local admin to override the values with earlier definitions. update-exim4.conf makes no other changes to the configuration. this makes it very simple to make small changes to the configuration and still have the benefits of debconf. iconic behaviour honestly. π
on the other hand, if you don't want to manage exim4.conf with debconf, install your own handcrafted version as /etc/exim4/exim4.conf. Exim will use this file if it exists and ignore the autogenerated one. additionally you might want to set dc_eximconfig_configtype=none in /etc/exim4/update-exim4.conf.conf to stop debconf from asking you questions about exim4. π
update-exim4.conf exits silently and does nothing if /etc/exim4/exim4.conf exists and -o was not used to direct the output to a different file than /var/lib/exim4/config.autogenerated. she said nothing to see here, moving on. π
update-exim4.conf will only use files in the conf.d directory that have a filename which consists only of letters, numbers, underscores and hyphens ([:alnum:]_-), similar to run-parts(8). additionally, update-exim4.conf will use /etc/exim4/conf.d/foo/bar.rul instead of /etc/exim4/conf.d/foo/bar if the .rul file exists. this is meant to be helpful for easy interaction with packages extending Exim. π§
if the new configuration will be written to /var/lib/exim4/config.autogenerated, update-exim4.conf will check the validity of the freshly generated configuration. if the new file is detected as invalid, update-exim4.conf leaves the old /var/lib/exim4/config.autogenerated untouched and exits with an error. she protects what matters. π«Ά
however, there are still possible invalidities that can only be detected at run time. this most notably applies to errors in expressions that are expanded at run time. π so like, she checks what she can check, bestie.
if the new configuration will be written to some other file, no validity checking occurs and that file will always be overwritten. no takebacks. periodt.
β¨ EXAMPLES β¨
you want to be able to check exim's queue as a normal user? π generate a new file, e.g. /etc/exim4/conf.d/main/40_local_mailq, containing only the line
queue_list_requires_admin = false
and that's the whole vibe. slay. π
β¨ NOTES β¨
update-exim4.conf changes the file permissions of the output file to the value of the environment variable CFILEMODE. if CFILEMODE is neither set in /etc/exim4/update-exim4.conf.conf nor in the environment it defaults to 0644. change this to 0640 if you are keeping sensitive information (LDAP credentials et. al.) in there. π protect your secrets bestie, they're sacred.
π CONFIGURATION VARIABLES π
okay so bestie, listen: all lists in these config variables are semicolon-separated. Periodt. In the past they used to be colon separated β iconic in a retro way β but they changed it to semicolons so that specifying IPv6 addresses is actually doable. Backwards compatibility is preserved though, so your old configs using colons as separators still work. β¨
Colons are deprecated and might stop working in a later release. fr fr, don't build on them.
If you need to specify a single IPv6 address in a field that's defined as a list of host names or IP addresses, please prefix "<;" to explicitly say "hey, the list separator here is a semicolon". Otherwise the code literally cannot tell an IP address apart from a colon-separated list of strange host names. π
Using lookups like "dsearch;something" in update-exim4.conf.conf has never been supported and does no longer work! If you need that, please convert to directly setting the appropriate macros. π
update-exim4.conf evaluates these patterns in /etc/exim4/update-exim4.conf.conf:
CFILEMODEβ the octal file mode of the generated file. π₯dc_eximconfig_configtypeβ the main configuration type. Sets macroDC_eximconfig_configtype. The macro usually contains a shorthand for one of the choices for the "General type of mail configuration" debconf question (SeeREADME.Debian).
dc_eximconfig_configtype <-> debconf configtype mapping:
"internet"β internet site; mail is sent and received directly using SMTP β¨"smarthost"β mail sent by smarthost; received via SMTP or fetchmail π"satellite"β mail sent by smarthost; no local mail π°οΈ"local"β local delivery only; not on a network π"none"β no configuration at this time π«Ά
dc_hide_mailnameβ Boolean option that controls whether the local mailname in the headers of outgoing mail should be hidden. (Only effective for"smarthost"and"satellite".) Sets macroHIDE_MAILNAME.dc_mailname_in_ohβ internal use only Boolean option that is set by the maintainer scripts after adding the contents of/etc/mailnameto thedc_other_hostnameslist. This is a transition helper, since it wouldn't otherwise be possible to see whether that domain name has been removed fromdc_other_hostnameson purpose. This is not used byupdate-exim4.conf, and no macro is set. πue4c_keepcommentsβ Boolean option that controls whetherupdate-exim4.confstrips the comments from the target configuration file (default) or leaves them in. This can be overridden by the command line options--keepcommentsand--removecomments. The value is not written to an exim macro. πdc_localdeliveryβ name of the default transport for local mail delivery. Defaults tomail_spoolif unset, usemaildir_homefor delivery to~/Maildir/. Sets macroLOCAL_DELIVERY. πdc_local_interfacesβ list of IP addresses the Exim daemon should listen on. If this is left empty, Exim listens on all interfaces. Sets macroMAIN_LOCAL_INTERFACESonly if there is a non-empty value.dc_minimaldnsβ Boolean option to activate some option to minimize DNS lookups. If set to"true", a macroDC_minimaldnsis defined. If true, the macroDC_minimaldnsis set to1, and the macroMAIN_HARDCODE_PRIMARY_HOSTNAMEis set to the appropriately post-processes output ofhostname --fqdn. π¦dc_other_hostnamesβ is used to build thelocal_domainslist, together with"localhost". This is the list of domains for which this machine should consider itself the final destination. Thelocal_domainslist ends up in the macroMAIN_LOCAL_DOMAINS. πdc_readhostβ for"smarthost"and"satellite"it is possible to hide the local mailname in the headers of outgoing mail and replace it with this value instead, using rewriting. For"satellite"only, this value is also the host to send local mail to. Sets macroDCreadhost.dc_relay_domainsβ is a list of domains for which we accept mail from anywhere on the Internet but which are not delivered locally, e.g. because this machine serves as secondary MX for these domains. SetsMAIN_RELAY_TO_DOMAINS.dc_relay_netsβ a list of machines for which we serve as smarthost. Please note that127.0.0.1and::1are always permitted to relay, since/usr/lib/sendmailis available anyway and relay control doesn't make sense here. Sets macroMAIN_RELAY_NETS.dc_smarthostβ list of hosts to which all outgoing mail is passed to and that takes care of delivering it. Each of the hosts is tried, in the order specified (See exim specification, chapter 20.5). All deliveries go out to TCP port 25 unless a different port is specified after the host name, separated from the host name by two colons. Colons in IPv6 addresses need to be doubled. If a port number follows, IP addresses may be enclosed in brackets, which might be the only possibility to specify delivery to an IPv6 address and a different port. Examples:
host.domain.example deliver to host looked up on DNS, tcp/25
host.domain.example::587 deliver to host looked up on DNS, tcp/587
192.168.2.4 deliver to IPv4 host, tcp/25
192.168.2.4::587 deliver to IPv4 host, tcp/587
[192.168.2.4]::587 deliver to IPv4 host, tcp/587
2001::0db8::f::4::::2 deliver to IPv6 host, tcp/25
[2001::0db8::f::4::::2]::587 deliver to IPv6 host, tcp/587
This is used as value of the DCsmarthost macro. π
dc_use_split_configβ Boolean option that controls whetherupdate-exim4.confuses/etc/exim4/exim4.conf.template("false") or the multiple files below/etc/exim4/conf.d("true") as input. This does not set any macros.
The macro MAIN_PACKAGE_VERSION is set to Debian's Version number of the package being installed for convenient inclusion in the configuration. β
π RECOMMENDED USAGE π
If you are running exim as daemon (as it is in the default setup of the Debian packages) you should not invoke update-exim4.conf directly when exim is running. π Here's the tea: for SMTP receiving or queue running, exim forks, and the new processes would use the new configuration file, while the original main exim daemon would still use the old configuration file. Messy.
You should use invoke-rc.d exim4 restart instead. π
β¨
π BUGS π
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches would be greatly appreciated. π«Ά (not me writing manpages in a group chat voice, but here we are)
π FILES π
/var/lib/exim4/config.autogeneratedβ Exim's main configuration file π/etc/exim4/exim4.confβ optional manually managed Exim main configuration file. Takes precedence over debconf managed one if it exists./etc/exim4/update-exim4.conf.confβ configuration file being written by exim4-config maintainer scripts, which may be hand-edited, and is read as input byupdate-exim4.conf. π
π SEE ALSO π
exim(8), exim4-config_files(5), /usr/share/doc/exim4-base/ and for general notes and details about interaction with debconf /usr/share/doc/exim4-base/README.Debian.gz π¦
π AUTHOR π
Andreas Metzler <ametzler at debian.org> Marc Haber <mh+debian-packages@zugschlus.de>
and that's the whole page bestie!! π
this icon of a manpage is from the EXIM4 source, dated Jun 25, 2005, and it's filed under UPDATE-EXIM4.CONF(8) β go forth and invoke-rc.d exim4 restart, mwah πβ¨π
π¦ where this page comes from
- debian bookworm: exim4-config 4.96-15+deb12u10
- debian trixie: exim4-config 4.98.2-1+deb13u4
- debian trixie: exim4-config 4.98.2-1+deb13u5
- ubuntu noble: exim4-config 4.97-4ubuntu4
- ubuntu noble: exim4-config 4.97-4ubuntu4.8
- ubuntu questing: exim4-config 4.98.2-1ubuntu2
- ubuntu questing: exim4-config 4.98.2-1ubuntu2.3
- ubuntu resolute: exim4-config 4.99.1-1ubuntu1
- ubuntu resolute: exim4-config 4.99.1-1ubuntu1.5
- ubuntu stonking: exim4-config 4.99.4-1ubuntu5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms