我们刚刚将我们的电子邮件迁移到新的服务器,但是新系统没有识别到客户端login尝试,在邮件日志中显示消息'Disconnected(0秒内没有authentication尝试):user = <>'。
这个问题几乎无疑是因为一个或多个configuration文件没有被复制或正确configuration,或者可能是因为尚未安装authentication系统。 唯一的问题是,哪一个?
系统是基本的postfix + dovecot。 已经复制的configuration文件全部来自/ etc / postfix和/ etc / dovecot。
在服务器安装期间,使用yum安装dovecot和postfix。
服务器是Rackspace服务器上的Fedora 19,唯一安装的其他应用程序是MySQL和Apache。
Postfix和Dovecot都没有显示任何错误消息。
dovecot -n
# 2.2.7: /etc/dovecot/dovecot.conf # OS: Linux 3.11.4-201.fc19.x86_64 x86_64 Fedora release 19 (Schrödinger's Cat) auth_mechanisms = cram-md5 plain auth_verbose = yes disable_plaintext_auth = no mbox_write_locks = fcntl namespace inbox { location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = scheme=cram-md5 /etc/cram-md5.pwd driver = passwd-file } passdb { driver = pam } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { args = uid=vmail gid=vmail home=/var/spool/vhosts/%d/%n /etc/dovecot/userdb driver = static } userdb { driver = passwd }
像下面这样的一行大约每秒被添加到日志中:
dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=1.2.3.4, lip=9.ABC, TLS handshaking: Disconnected, session=
大约每3分钟添加一组如下的线:
dovecot: imap-login: Login: user=<[email protected]>, method=CRAM-MD5, rip=1.1.1.1, lip=2.2.2.2, mpid=17131, session=<BS5K3XPrqAC8HJXQ> gp8 dovecot: imap([email protected]): Error: user [email protected]: Initialization failed: Namespace '': Mail storage autodetection failed with home=/var/spool/vhosts/example.com/username gp8 dovecot: imap([email protected]): Error: Invalid user settings. Refer to server log for more information.
看起来好像传入的邮件正在被正确地传递给maildir。
我已经接受了MadHatter对这个问题的回答,原来是(很多)丢失了dovecotconfiguration文件。 虽然接受的答案没有明确指出这一点,但是它确实让我仔细检查了被复制的内容。
我现在再有一个问题,但要问另一个问题来掩盖它。
继上面我们的评论,这个问题似乎是SSL / TLS相关的。 你告诉我,有问题的客户端没有configuration为使用SSL或TLS,但在问题的dovecot -n输出中,行
ssl = required
出现。 我怀疑,当客户端在明文服务(端口143)上连接时,被configuration为需要encryption的守护进程会立即尝试启动TLS。 由于客户端没有为此configuration,因此它忽略了提高安全性的尝试,导致服务器感到沮丧并丢失与日志错误的连接
TLS handshaking: Disconnected