https://github.com/egberts/exim4-config-check-which
Determine which set of configuration files are being used by Exim4 mail server on Debian OS distro
https://github.com/egberts/exim4-config-check-which
bash-script debian debian-only exim exim4 template
Last synced: 7 months ago
JSON representation
Determine which set of configuration files are being used by Exim4 mail server on Debian OS distro
- Host: GitHub
- URL: https://github.com/egberts/exim4-config-check-which
- Owner: egberts
- License: mit
- Created: 2022-03-25T16:20:58.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T18:27:46.000Z (over 3 years ago)
- Last Synced: 2025-02-07T02:41:28.360Z (9 months ago)
- Topics: bash-script, debian, debian-only, exim, exim4, template
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# exim4-config-check-which [](https://www.codacy.com/gh/egberts/exim4-config-check-which/dashboard?utm_source=github.com&utm_medium=referral&utm_content=egberts/exim4-config-check-which&utm_campaign=Badge_Grade)
Setting up Exim4 mail server?
Got tired of guessing WHICH file to edit?
Even after reading the 'man update-exim4.conf' manpage ... repeatedly?
This will help you determine which set of configuration files are being used by Exim4 mail server on your Debian OS distro.
## Weird Naming Convention
Naming convention could have been more intuitive. Such as:
* `update-exim4.conf` could be better named as `update-exim4-conf` (or `update-exim4`, or even better as `exim4-update-debian`, or best as `dpkgc-exim4`)
* `update-exim4.conf.conf` could be better named as `exim4.debian.conf`: then we would know which one to go to between `exim4.conf`/`exim4.conf.debian`.
* `update-exim4.conf.template` ... whew ... could have been `exim4.conf.template.debian`.
* `/var/lib/exim4/config.autogenerated` could have beeen `/var/lib/exim4/exim4.conf.autogenerated`.## Debian Split-Configuration
A run example for the split-configuration method of Exim4 configuration files:
```console
# ~/bin/exim4-config-check-which.sh
Determine which configs file that Exim4 is using.Compiled-in config lookup sequence by /usr/sbin/exim4:
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated
/usr/sbin/exim4 is now using this config file:
/var/lib/exim4/config.autogeneratedReading /etc/exim4/update-exim4.conf.conf for its settings ...
'dc_use_split_config' is set to 'true' in /etc/exim4/update-exim4.conf.conf
ignores : /etc/exim4/exim4.conf
ignores : /etc/exim4/exim4.conf.templatereads from : /etc/exim4/update-exim4.conf.conf
reads from : /etc/exim4/exim4.conf.localmacros
writes to : /var/lib/exim4/config.autogenerated
daemon reads from: /var/lib/exim4/config.autogenerated
```## Debian Non-Split-Configuration
If using Debian non-split configuration, then:
```console
# ~/bin/exim4-config-check-which.sh
Determine which configs file that Exim4 is using.Compiled-in config lookup sequence by /usr/sbin/exim4:
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated
/usr/sbin/exim4 is now using this config file:
/var/lib/exim4/config.autogeneratedReading /etc/exim4/update-exim4.conf.conf for its settings ...
'dc_use_split_config' is set to 'false' in /etc/exim4/update-exim4.conf.conf
ignores : /etc/exim4/exim4.conf
ignores : /etc/exim4/update-exim4.conf.conf
ignores : /etc/exim4/exim4.conf.localmacrosreads from : /etc/exim4/exim4.conf.template
writes to : /var/lib/exim4/config.autogenerated
daemon reads from: /var/lib/exim4/config.autogenerated
```## Debian has `/etc/exim4/exim4.conf` file
If a Debian is missing `/etc/update-exim4.conf.conf` but has the required `/etc/exim4/exim4.conf`, then:
```console
# bash exim4-config-check-which.sh
Determine which configs file that Exim4 is using.Compiled-in config lookup sequence by /usr/sbin/exim4:
2022-03-25 13:14:38 Warning: purging the environment.
Suggested action: use keep_environment.
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /etc/exim4/exim4.conf
/usr/sbin/exim4 is now using this config file:
/etc/exim4/exim4.confExim4 daemon will:
Ignores : /etc/exim4/update-exim4.conf.conf
Ignores : /etc/exim4/exim4.conf.template
Ignores : /etc/exim4/exim4.conf.localmacros
(update-exim4.conf writes nothing)daemon reads from: /etc/exim4/exim4.conf
```## `/etc/exim4/exim4.conf` AND `/var/lib/exim4/config.autogenerated`
If a Debian had been transitioned to `exim.conf` but left an
artifact file behind that is named `/var/lib/exim4/config.autogenerated`, then```console
# ~/bin/exim4-config-check-which.sh
Determine which configs file that Exim4 is using.Compiled-in config lookup sequence by /usr/sbin/exim4:
2022-03-25 13:28:04 Warning: purging the environment.
Suggested action: use keep_environment.
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /etc/exim4/exim4.conf
/usr/sbin/exim4 is now using this config file:
/etc/exim4/exim4.confExim4 daemon will:
Ignores : /etc/exim4/update-exim4.conf.conf
Ignores : /etc/exim4/exim4.conf.template
Ignores : /etc/exim4/exim4.conf.localmacros
(update-exim4.conf writes nothing)daemon reads from: /etc/exim4/exim4.conf
WARNING: there is a lingering Debian artifact file that needs removing:
/var/lib/exim4/config.autogenerated
```## Debian host is missing both `/etc` files
If both config files are missing but ...
the `/var/lib/exim4/config.autogenerated` exists, then```console
# ~/bin/exim4-config-check-which.sh
Determine which configs file that Exim4 is using.Compiled-in config lookup sequence by /usr/sbin/exim4:
Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
Configuration file is /var/lib/exim4/config.autogenerated
/usr/sbin/exim4 is now using this config file:
/var/lib/exim4/config.autogeneratedWARNING: No configuration files found in /etc/exim4 directory.
WARNING: Exim4 daemon using the following UNKNOWN config file:
/var/lib/exim4/config.autogenerated
```