You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Postfix/Dovecot与Outlook、Thunderbird邮件客户端配置故障求助

Postfix/Dovecot与Outlook、Thunderbird邮件客户端配置故障求助

各位大佬好,我最近在搭建Postfix+Dovecot邮件服务器时,遇到了和Outlook、Thunderbird这两款客户端兼容的问题,自己排查了半天没找到根源,特来求助!

已完成的测试情况

  • 用telnet和openssl分别测试了SMTP(587端口)和IMAP(993端口),连接正常,收发邮件的流程也没问题
  • 发送的邮件能正确存储到服务器的文件系统中,通过openssl连接IMAP时也能顺利取回邮件内容

客户端遇到的问题

  • Thunderbird:设置账户时,连最基础的“连接测试”都无法通过,直接卡在这一步
  • Outlook:能通过连接测试并完成账户配置,但登录后收件箱里看不到任何邮件,明明服务器上是有邮件的

我的账户配置

  • IMAP:993端口,SSL/TLS加密
  • SMTP:587端口,STARTTLS加密

相关日志信息

Outlook连接测试后的/var/log/mail.log日志

Oct 16 10:09:45 mail dovecot: imap-login: Login: user=<arian@x.com>, method=PLAIN, rip=40.101.90.197, lip=x, mpid=781860, TLS, session=>
Oct 16 10:09:45 mail dovecot: imap(arian@x.com)<781860><RMgv9dUHdVAoZVrF>: Logged out in=63 out=999 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_b>
Oct 16 10:09:47 mail dovecot: imap-login: Login: user=<arian@x.com>, method=PLAIN, rip=40.101.90.197, lip=x, mpid=781862, TLS, session=>
Oct 16 10:09:48 mail dovecot: imap(arian@x.com)<781862><JZtY9dUHAhMoZVrF>: Logged out in=85 out=1084 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_>

Thunderbird连接测试后的/var/log/mail.log日志

Oct 16 10:01:52 mail dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=94.191.136.80, lip=themailserverip, TLS, session=<aa4d2dU>
Oct 16 10:02:02 mail postfix/submission/smtpd[781321]: connect from 94.191.136.80.mobile.tre.se[94.191.136.80]
Oct 16 10:02:02 mail postfix/submission/smtpd[781321]: lost connection after CONNECT from 94.191.136.80.mobile.tre.se[94.191.136.80]
Oct 16 10:02:02 mail postfix/submission/smtpd[781321]: disconnect from 94.191.136.80.mobile.tre.se[94.191.136.80] commands=0/0

Dovecot配置(dovecot -n输出)

# 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.13 (cdd19fe3)
# OS: Linux 5.10.0-26-amd64 x86_64 Debian 11.8 ext4
# Hostname: mail.x.com
auth_mechanisms = plain login
mail_location = maildir:/home/vmail/%d/%n
mail_privileged_group = mail
namespace inbox {
inbox = yes
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 {
driver = pam
}
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = imap lmtp
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/x.com/cert.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
userdb {
args = uid=vmail gid=vmail home=/home/vmail/%d/%n
driver = static
}
protocol lmtp {
mail_plugins = " sieve"
postmaster_address = postmaster@x.com
}
local_name mail.x.com {
ssl_cert = </etc/letsencrypt/live/x.com/cert.pem
ssl_key = # hidden, use -P to show it
}

Postfix配置(postconf -n输出)

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = localhost
readme_directory = no
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/x.com/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/x.com/privkey.pem
smtpd_use_tls = yes
tls_server_sni_maps = hash:/etc/postfix/vmail_ssl.map
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = x.com
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 100
virtual_uid_maps = static:5000

Postfix服务配置(postconf -M输出)

smtp       inet  n       -       y       -       -       smtpd
submission inet  n       -       y       -       -       smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject
pickup     unix  n       -       y       60      1       pickup
cleanup    unix  n       -       y       -       0       cleanup
qmgr       unix  n       -       n       300     1       qmgr
tlsmgr     unix  -       -       y       1000?   1       tlsmgr
rewrite    unix  -       -       y       -       -       trivial-rewrite
bounce     unix  -       -       y       -       0       bounce
defer      unix  -       -       y       -       0       bounce
trace      unix  -       -       y       -       0       bounce
verify     unix  -       -       y       -       1       verify
flush      unix  n       -       y       1000?   0       flush
proxymap   unix  -       -       n       -       -       proxymap
proxywrite unix  -       -       n       -       1       proxymap
smtp       unix  -       -       y       -       -       smtp
relay      unix  -       -       y       -       -       smtp -o syslog_name=postfix/$service_name
showq      unix  n       -       y       -       -       showq
error      unix  -       -       y       -       -       error
retry      unix  -       -       y       -       -       error
discard    unix  -       -       y       -       -       discard
local      unix  -       n       n       -       -       local
virtual    unix  -       n       n       -       -       virtual
lmtp       unix  -       -       y       -       -       lmtp
anvil      unix  -       -       y       -       1       anvil
scache     unix  -       -       y       -       1       scache
postlog    unix-dgram n  -       n       -       1       postlogd
maildrop   unix  -       n       n       -       -       pipe flags=DRXhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp       unix  -       n       n       -       -       pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail     unix  -       n       n       -       -       pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp      unix  -       n       n       -       -       pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n       n       -       2       pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman    unix  -       n       n       -       -       pipe flags=FRX user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}

备注:内容来源于stack exchange,提问作者Dio Anderson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 11:14:30