自上周以来,我一直在尝试调试这个问题,但我不知道发生了什么,我试图自己寻找答案,但没有成功。
我一直在尝试发送电子邮件,来自[电子邮件保护]到[电子邮件保护]或来自[电子邮件保护]到[电子邮件保护],但收件人始终被标记为 never_users。
它总是在 main.log 文件中生成这种日志:
2022-07-19 12:51:56 1oDfDA-0000gU-4D <= [email protected] H=smtpbrn09tsel.my-isp-provider.com [114.124.216.1] P=esmtpa A=dovecot_plain:info S=690 [email protected]
2022-07-19 12:51:56 1oDfDA-0000gU-4D User 0 set for mail_test_transport transport is on the never_users list
2022-07-19 12:51:56 1oDfDA-0000gU-4D == [email protected] <[email protected]> R=mail_test_router T=mail_test_transport defer (-29): User 0 set for mail_test_transport transport is on the never_users list
2022-07-19 12:51:56 1oDfDA-0000gU-4D ** [email protected] <[email protected]>: retry timeout exceeded
2022-07-19 12:51:56 1oDfDA-0000gY-6l <= <> R=1oDfDA-0000gU-4D U=exim P=local S=2022
2022-07-19 12:51:56 1oDfDA-0000gU-4D Completed
2022-07-19 12:51:56 1oDfDA-0000gY-6l User 0 set for mail_test_transport transport is on the never_users list
2022-07-19 12:51:56 1oDfDA-0000gY-6l == [email protected] <[email protected]> R=mail_test_router T=mail_test_transport defer (-29): User 0 set for mail_test_transport transport is on the never_users list
2022-07-19 12:51:56 1oDfDA-0000gY-6l ** [email protected] <[email protected]>: retry timeout exceeded
2022-07-19 12:51:56 1oDfDA-0000gY-6l [email protected] <[email protected]>: error ignored
2022-07-19 12:51:56 1oDfDA-0000gY-6l Completed
请注意,这是我的 never_users 配置:
never_users = root
当我运行时exim -bt info
,它会产生以下结果:
[email protected]
<-- [email protected]
<-- [email protected]
router = mail_test_router, transport = mail_test_transport
答案1
我终于找到了解决这个问题的方法,并将其放在这里,希望它对遇到同样问题的人有用。
所以我决定创建另一个用户:
useradd -s /sbin/nologin mail-test
passwd mail-test
然后我注释掉了exim.conf中的两行:
web_test_transport:
driver = pipe
command = /usr/bin/php /var/www/html/mail-exim/artisan mail:process
#user = root
#group = root
然后,我重新启动了 exim 服务。
之后我发了一封电子邮件给[电子邮件保护],瞧!它不再被标记为 never_users 了。