Understanding exim configuration files on Debian/Ubuntu

12,118

Solution 1

This is Debian/Ubuntu's way of managing Exim4. You'll need to limit yourself to using the dpkg-reconfigure exim4-config utility and it's config file, update-exim4.conf.conf to manage it, or, just blow it all away and manage it all yourself. Check out:

http://pkg-exim4.alioth.debian.org/README/README.Debian.html#completely-different-configuration

Solution 2

Here's the easy guide to understand Debian's exim config:

  1. conf.d has the configuration snippets, separated by config area. The variables in caps are normally defined on the first part (called base, if my memory serves me).
  2. the exim4.conf.template is generated by concatenating all the snippets at install time, so the basic configuration is the same.
  3. the config file used by the daemon is created on a different directory based on one of the above templates.
  4. Each time you use update-exim4.conf it generates a new config file, based on what you answered when the package configuration asked about split configuration.

If you use the split configuration, you have to use files at conf.d to manage exim, otherwise use the exim4.conf.template.

I suggest you use the conf.d scheme, after you get used to it its easier to manage and add/remove stuff. Read all the files in all dirs and compare it to the running config file (/var/lib/exim4/config.autogenerated but comments are striped so re-run update-exim4.conf --keepcomments, or you can use exim -bP to see the running config too) and you will get it real easy.

Most of the times you will not need any special configuration, so just use dpkg-reconfigureexim4-config` and answer the questions.

Solution 3

Those are not really exim configuration files those are part of the debian configuration system that is used to generate the actually exim configuration file.

Share:
12,118

Related videos on Youtube

bobobobo
Author by

bobobobo

Updated on September 17, 2022

Comments

  • bobobobo
    bobobobo almost 2 years

    I want to understand what's going on with this Exim configuration directory.

    In /etc/exim4, there's:

    * exim4.conf.template
    * update-exim4.conf.conf
    * conf.d
    

    The conf.d has a mess of directories and files, and inside each are a bunch of if statements which I find really different.

    For example:

    maildir_home:
      debug_print = "T: maildir_home for $local_part@$domain"
      driver = appendfile
      .ifdef MAILDIR_HOME_MAILDIR_LOCATION
      directory = MAILDIR_HOME_MAILDIR_LOCATION
      .else
      directory = $home/Maildir
      .endif
      .ifdef MAILDIR_HOME_CREATE_DIRECTORY
      create_directory
      .endif
      .ifdef MAILDIR_HOME_CREATE_FILE
    

    My question is,

    -where do the CAPS VARIABLES get defined?

    • how can I change them?
    • why are there so many if statements in these configuration files?
  • coredump
    coredump almost 14 years
    Using a completely different configuration is not advised. It can break on updates and packages that automatically add stuff to the conf.d directory to configure exim will not work.