两个域配置为虚拟域并安装 ubuntu 14.4:
我需要为 dovecot 配置 smtp 身份验证,无需身份验证即可工作。我查看了几个文档,但这些都不适合我的解决方案
问候 Kanchana
###################### 请参阅 doveconf -nroot@mail:/var/log# doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-32-generic x86_64 Ubuntu 14.04.1 LTS ext4
auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
protocols = imap pop3
service auth {
executable = /usr/lib/dovecot/auth
user = root
}
service imap-login {
chroot = login
executable = /usr/lib/dovecot/imap-login
user = dovecot
}
service imap {
executable = /usr/lib/dovecot/imap
}
service pop3-login {
chroot = login
executable = /usr/lib/dovecot/pop3-login
user = dovecot
}
service pop3 {
executable = /usr/lib/dovecot/pop3
}
ssl = no
userdb {
args = /etc/dovecot/users
driver = passwd-file
}
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
答案1
根据 的输出doveconf -n
,Dovecot 未设置为处理来自 Postfix 的 SMTP SASL 授权。您可以尝试将以下内容添加到您的/etc/dovecot/conf.d/10-master.conf
文件中:
# Add SMTP SASL authorizations from Postfix:
service auth{
unix_listener auth-userdb{
}
inet_listener {
port=12555
}
}
并在您的/etc/postfix/main.cf
文件中添加以下内容:
# Add Dovecot listener for SASL authorizations:
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
smtpd_sasl_path=inet:127.0.0.1:12555
在行#
首添加有关更改的注释,以便您可以跟踪所做的更改 - 我建议您这样做,以防您需要返回并删除编辑。
端口号12555
是任意的,但请确保使用未被用于任何服务的端口。端口 12555 未被用于任何常见服务,这就是我选择它的原因。
sudo service postfix restart
使用和重启 Postfix 和 Dovecot sudo service dovecot restart
。查看这是否允许通过 Dovecot 进行 SMTP 授权。