我需要所有 dovecot 配置关键字和默认值。有一个dovecot-示例.conf在 dovecot 官方网站上。
操作系统:CentOS Linux 版本 7.3.1611(核心)Dovecot:2.2.10
但是,它存在一些错误,例如在示例配置中:
# 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
# ..
# }
运行时会返回错误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 } }
另一件事是示例配置有以下部分并在其中定义所有 imap 相关设置。
protocol imap {
...
}
然而,在 Centos 7 上,有一个20-imap.conf文件和所有 imap 相关设置都是全局定义的,而不是在内部定义的协议 imap部分。
哪一个更好?要将所有 imap 设置放在协议 imap部分或全局,就像 centos 默认配置一样。
答案1
doveconf -a > fullconfig.txt
将产生您所需的结果。唯一的例外是,类似这样的指令local
没有默认值,因此不再提及。
相反,doveconf -n > deltas.txt
将生成其值与默认值不同的选项列表。