Postfix + Dovecot + IMAP SSL:imap-login:中止login

熟悉电子邮件服务器组件和configuration。

知道了对Dovecot 2.x的configuration更改,并且愿意使用SSLencryption,我已经遇到了这个指南 。 Postfix,Dovecot和带有SSLconfiguration的POP。 IMAP和SSL的区别仅仅是“/etc/dovecot/conf.d/10-master.conf”中的软件包(dovecot-imapd和dovecot-pop3d)和参数的区别。

完全按照指南,创build2个电子邮件用户帐户。 当试图连接OSX邮件程序时,我首先遇到以下问题。

dovecot: auth: Error: passwd-file /etc/dovecot/passwd: User xx@domain is missing userdb info 

注意到用户名和密码存储在单独的文件中,我更改了“/etc/dovecot/conf.d/auth-system.conf.ext”,以包含用户文件,如下所示

 passdb { driver = passwd-file args = scheme=cram-md5 username_format=%u /etc/dovecot/passwd #driver = pam #[session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=<n>] #[cache_key=<key>] [<service name>] #args = dovecot } userdb { driver = passwd-file args = username_format=%u /etc/dovecot/users #<doc/wiki/AuthDatabase.Passwd.txt> #driver = passwd #[blocking=no] #args = # Override fields from passwd #override_fields = home=/home/virtual/%u } 

还有一个类似于这里的问题,我也通过评论改变了'etc / postfix / main.cf':

 smtpd_sasl_application_name = smtpd 

一切都很好,除了我面临的最后一个问题。 当然工作的Postfix,已经用mailutils发送testing邮件。 错误信息是:

 dovecot: imap-login: Aborted login (auth failed, 1 attempts in 2 secs): user=xx, method=LOGIN, rip=xx.xx.xx.xx, lip=xx.xx.xx.xx, TLS, session=<xxxxxxx> 

我只在端口993和587上分别使用带有SSH STARTTLS的IMAP。 说这是因为其他电子邮件协议端口被我的Amazon EC2 Ubuntu 14.04实例上的UFW Firewall阻止。 奇怪的是,从另一个域帐户发送电子邮件到我的域,没有电子邮件跟踪显示在“/ home / vmail / domain / user / new”下。 还设置了相关的DNSlogging如下:

 * 10800 IN A server-ip @ 10800 IN A server-ip @ 10800 IN MX 10 mail.mydomain 

这是我的情况; 任何input将不胜感激。

在/etc/postfix/master.cf中添加:

 dovecot unix - nn - - pipe flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} 

在/ etc / postfix main.cf中添加:

 dovecot_destination_recipient_limit = 1 virtual_mailbox_domains = your.domain.here virtual_transport = dovecot 

这假定用户vmail是/ home / virtual的所有者,根据需要进行调整。

如果在确认你在postfix中有这样的configuration后仍然有问题,请发布完整的postfix(随意将域信息清理到examplt.com等),并且configuration文件。