Dovecot config file format

0

I need all dovecot config keywords and default values. There is a dovecot-example.conf on dovecot official site.

OS: CentOS Linux release 7.3.1611 (Core) Dovecot: 2.2.10

But, It has some errors, e.g. in the exmaple config:

# If you want to specify ports for each service, you will need to configure
# these settings inside the protocol imap/pop3 { ... } section, so you can
# specify different ports for IMAP/POP3. For example:
#   protocol imap {
#     listen = *:10143
#     ssl_listen = *:10943
#     ..
#   }
#   protocol pop3 {
#     listen = *:10100
#     ..
#   }

This returns errors when run doveconf -n

doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/conf.d/20-imap.conf:57: listen=..:port has been replaced by service { inet_listener { port } }
doveconf: Warning: Obsolete setting in /etc/dovecot/conf.d/20-imap.conf:57: protocol { listen } has been replaced by service { inet_listener { address } }
doveconf: Warning: Obsolete setting in /etc/dovecot/conf.d/20-imap.conf:58: ssl_listen=..:port has been replaced by service { inet_listener { port } }
doveconf: Warning: Obsolete setting in /etc/dovecot/conf.d/20-imap.conf:58: protocol { ssl_listen } has been replaced by service { inet_listener { address } }

Another thing is that example config has following sections and define all imap related settings in that.

protocol imap {
...
}

However, on Centos 7, there is a 20-imap.conf file and all imap related settings are defined globally not within protocol imap section.

Which one is better? To place all imap settings in protocol imap section or globally like in centos default config.

aerturk

Posted 2018-02-11T11:41:46.433

Reputation: 3

Answers

0

doveconf -a > fullconfig.txt will produce exactly what you need. The only exception is the directives like local that have no default values and thus will not be mentioned.

In opposite, doveconf -n > deltas.txt will produce the list of options their values are differ from defaults.

Kondybas

Posted 2018-02-11T11:41:46.433

Reputation: 499

Which one is better? To place all imap settings in protocol imap section or globally like in centos default config. e.g. imap_idle_notify_interval defined in protocol imap section also globally in 20-imap.conf. Both are displayed when I run doveconf -a. Which one has priority? – aerturk – 2018-02-11T12:13:18.877

I prefer monolitic single config file not teared to shreds. Splitted config is useful for GUI-configurators that do not need to parse the whole config for some section. If you edit config by hands, doveconf -n is the weapon of choice. – Kondybas – 2018-02-11T12:48:01.460