config best practice
Jiri Bourek
bourek at thinline.cz
Thu Jun 19 08:54:10 UTC 2014
On 18.6.2014 22:25, Egbert wrote:
> Hi! We will soon start upgrading our Ubuntu mail server (running 2.0.19)
> from 12.04.1 LTSto 14.04 LTS.
> The dovecot config is still pretty much in 1.x style; one flat file
> called dovecot.conf. I can easily switch to a dovecot.conf with the
> "!include" lines and rename my flat config file to local.conf. I've
> tested that and it works fine. I could also try to move all lines in
> local.conf to the different XX-.conf files in the conf.d subdir. What is
> wise and best practice? Should one edit the files in conf.d? Or will the
> files in conf.d be overwritten on an update of dovecot? Then I'll better
> stick to the way of working with the dovecot.conf with the !includes and
> local.conf and assume that all files in conf.d are default settings.
>
> TNX for any advise!
> Egbert Jan, HCC!hobbynet, NL
>
The split configuration is useful for automated updates/upgrades. The
packaging system knows if particular config file was changed and if it
wasn't, it's replaced by a new version without bothering you.
For example, let's say you have single config file and only single line
differs from default configuration - say "auth_verbose". When you
upgrade, the packaging system tells you "the configuration was changed"
and you need to either manually figure out all changes and apply them to
your configuration or lose your own configuration changes (or attempt a
3-way merge)
With split configuration files the packaging system silently replaces
all configuration with new defaults except 10-loging.conf and you only
need to worry about that file.
Plus, on Ubuntu you have different Dovecot components (core, imapd,
pop3d, mysql) split into different packages and these packages have
separate config files as well.
So I'd recommend splitting the configuration. IMO it's easy way to keep
it up-to-date with upstream changes without too much trouble (package
maintainer does the work for you)
I ofc agree with previous post - use whatever works best for you.
More information about the dovecot
mailing list