Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a working exim4 setup using the split configuration mode, to which I'd like to make some changes.

Obviously, just meddling around with the live system is not very desireable, and I have no test system available, so I'd like to make a copy of the configuration files, and test changes to this copy using the exim4 debug commands like -bV, -bt, etc. Is there a parameter to force exim4 to use a different configuration directory for this test? The -C option seems to only work on single files.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The Debian exim4 split mail configurations files in /etc/exim4/conf.d/ are merged using the tool update-exim4.conf. The default location for the merged configuration file is /var/lib/exim4/config.autogenerated.

Which has this help.

# update-exim4.conf --help
/usr/sbin/update-exim4.conf - Generate exim4 configuration files
       Options:
       ...
       -o|--output file - write output to file instead of /var/lib/exim4/config.autogenerated
       -d|--confdir directory - read input from given directory instead of /etc/exim4

I haven't tested, but I believe this means you could replicate /etc/exim4 to some other folder and then use a command like this update-exim4.conf -d /path_to_config_folder/ -o /path_to_test_config_file to generated a merged configuration file which you can then pass to exim using the -C option.

Or you can just copy the /var/lib/exim4/config.autogenerated file to somewhere else, make and test your changes to the merged configuration, and then replicate those changes back to the files in /etc/exim4/conf.d/.

share|improve this answer
    
BTW, be careful with -C and -D on Debian if you haven't updated. Apparently, in certain configurations this can cause. debian.org/security/2011/dsa-2154 –  Zoredache Feb 2 '11 at 9:25
    
Thank you very much! –  Jens Feb 2 '11 at 15:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.