我正在尝试使用 Postfix 和 Dovecot 设置一个带有虚拟域的非常简单的邮件服务器。我按照以下步骤设置 postfix,第一部分运行良好。
https://www.howtoforge.com/linux_postfix_virtual_hosting
然后我转到下一部分
https://www.howtoforge.com/linux_postfix_virtual_hosting_2
这导致配置文件格式出现错误,如下所示
[root@Clients info]# service dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:2: protocols=imaps is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:2: protocols=pop3s is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:3: ssl_disable has been renamed to ssl
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:4:
然后纠正了上述错误,但仍然给出以下
[root@Clients info]# service dovecot restart
Stopping Dovecot Imap: [FAILED]
Starting Dovecot Imap: doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:10: login_dir has been removed
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: login_chroot has been replaced by service { chroot }
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 12: Unknown setting: login
我不知道如何解决这个问题,我的
dovecot 版本是
[root@Clients info]# dovecot --version 2.0.9
Postfix 版本是
[root@Clients info]# postconf -d | grep mail_version mail_version = 2.6.6 milter_macro_v = $mail_name $mail_version
我的 Dovecot 配置是
base_dir = /var/run/dovecot/
protocols = imap pop3
ssl = no
ssl_cert = /etc/ssl/server.crt
ssl_key = /etc/ssl/server.key
ssl_parameters_file = /var/run/dovecot/ssl-parameters.dat
ssl_parameters_regenerate = 24
log_path = /var/log/dovecot
info_log_path = /var/log/dovecot.info
login_dir = /var/run/dovecot/login
login_chroot = yes
login = imap
login_executable = /usr/lib/dovecot/imap-login
login_user = dovecot
login = pop3
login_executable = /usr/lib/dovecot/pop3-login
verbose_ssl = yes
valid_chroot_dirs = /var/spool/vmail
default_mail_env = maildir:/var/spool/vmail/%d/%n
imap_executable = /usr/lib/dovecot/imap
pop3_executable = /usr/lib/dovecot/pop3
auth = default
auth_mechanisms = plain digest-md5
auth_userdb = passwd-file /etc/dovecot/users
auth_passdb = passwd-file /etc/dovecot/passwd
auth_executable = /usr/lib/dovecot/dovecot-auth
auth_user = root
auth_verbose = yes
当尝试按照指示创建新的conf时
[root@Clients ~]# doveconf -n > dovecot-new.conf
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:10: login_dir has been removed
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:11: login_chroot has been replaced by service { chroot }
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 12: Unknown setting: login
有人能告诉我如何解决这个问题吗?