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

Gmail无法通过Dovecot/POP3收取自定义域名邮箱邮件的问题求助

Gmail无法通过Dovecot/POP3收取自定义域名邮箱邮件的问题求助

各位大佬好,我最近碰到一个棘手的问题,折腾好几天都没搞定,想请大家帮忙分析下:

我的VPS用的是AlmaLinux,SMTP用sendmail,两个域名的邮件收发都正常;Dovecot配置了IMAP/POP3,本地用命令行和Thunderbird连POP3都没问题,但用Gmail的「检查其他账户邮件」功能收example.com域名的邮件就是失败,试了各种配置都不行。

先把目前的情况梳理清楚:

  • 本地连接正常的验证:

    • 命令行执行openssl s_client -starttls pop3 -connect mail.example.com:110能成功建立连接,输入USER fake_username和PASS fake_password后,执行LIST、STAT这些POP命令都能得到正确响应
    • 本地Thunderbird配置:服务器mail.example.com,端口110,用户名fake_username,连接安全选「STARTTLS」,认证方式「普通密码」,完全能正常收邮件
  • Gmail连接的两种报错情况:

    1. 不勾选「始终使用安全连接(SSL)」:

      • Gmail网页端报错:Server denied POP3 access for the given username and password.
      • Dovecot日志(dovecot.log)内容:
        Mar 19 12:27:36 pop3-login: Info: Disconnected: Disconnected: Too many bad commands (no auth attempts in 0 secs): user=<>, rip=209.85.128.137, lip=103.72.79.234, session=<cR/KSUP3MIvRVYCJ>
        
    2. 勾选「始终使用安全连接(SSL)」:

      • Gmail网页端报错:There was a problem connecting to mail.example.com
      • Dovecot日志里能看到成功登录,但随即就断开了:
        Mar 19 12:27:01 pop3-login: Info: Login: user=<fake_username>, method=PLAIN, rip=71.232.112.192, lip=[MY SERVER'S IP ADDRESS], mpid=949498, TLS, session=<waq2R0P3fM1H6HDA>
        Mar 19 12:27:01 pop3(fake_username)<949498><waq2R0P3fM1H6HDA>: Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
        
  • 我的Dovecot认证相关配置:

    • /etc/dovecot/10-auth.conf里只启用了两行:
      auth_mechanisms = plain login
      !include auth-system.conf.ext
      
    • 主配置dovecot.conf里没有任何认证相关的自定义配置

我感觉问题应该出在Gmail的连接方式和Dovecot的预期不匹配,但日志里的内容我实在摸不透,翻Dovecot官方文档也没找到对应的解决方案。有没有懂的大佬能帮我分析下问题根源,给点修复建议?

备注:内容来源于stack exchange,提问作者Eric Jonas

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.23 10:27:39