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

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

开始熟悉电子邮件邮件服务器组件和配置。

知道 Dovecot 2.x 有相当多的配置更改,并且愿意使用 SSL 加密,我遇到了本指南. Postfix、Dovecot 和 POP 的 SSL 配置。IMAP 和 SSL 之间的区别仅在于软件包(dovecot-imapd 和 dovecot-pop3d)和“/etc/dovecot/conf.d/10-master.conf”中的参数不同。

已完全按照指南操作,创建了 2 个电子邮件用户帐户。我第一次遇到以下问题,是在尝试连接时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 当然可以工作,已经发送了测试电子邮件邮件实用程序。错误信息是:

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> 

我仅使用 IMAP 和 SSH STARTTLS,分别在端口 993 和 587 上使用。因为其他电子邮件协议端口被阻止UFW 防火墙在我的 Amazon EC2 Ubuntu 14.04 实例上。奇怪的是,当从另一个域帐户向我的域发送电子邮件时,在“/home/vmail/domain/user/new”下没有显示任何电子邮件跟踪。还设置了相关的 DNS 记录,如下所示:

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

这是我的情况;任何意见都将不胜感激。

答案1

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

dovecot   unix  -       n       n       -       -       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 中具有此配置后仍然遇到问题,请发布完整的 postfix(随意将域信息清理为 exampleplt.com 等)和 dovecot 配置文件。

相关内容