Coder Social home page Coder Social logo

egberts / exim4-config-check-which Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 25 KB

Determine which set of configuration files are being used by Exim4 mail server on Debian OS distro

License: MIT License

Shell 100.00%
exim exim4 bash-script template debian-only debian

exim4-config-check-which's Introduction

exim4-config-check-which Codacy Badge

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:

# ~/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.autogenerated

Reading /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.template

  reads 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:

# ~/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.autogenerated

Reading /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.localmacros

  reads 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:

# 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.conf

Exim4 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

# ~/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.conf

Exim4 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

# ~/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.autogenerated

WARNING: No configuration files found in /etc/exim4 directory.
WARNING: Exim4 daemon using the following UNKNOWN config file:
    /var/lib/exim4/config.autogenerated

exim4-config-check-which's People

Contributors

egberts avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.