我在 Ubuntu 22.04 上有 Postfix。我只能接收电子邮件,而不能发送电子邮件。
我已经使用配置了 Postfix如何在 Ubuntu 22.04 上安装和配置 PostfixDigitalOcean 的教程。
sudo tail -f /var/log/mail.log
给出:
Dec 31 11:26:01 example postfix/smtp[9961]: 58A39D25A: to=<[email protected]>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Dec 31 11:26:01 example postfix/smtp[8787]: 58103D252: to=<[email protected]>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Dec 31 11:26:01 example postfix/smtp[9593]: 576CAD23A: to=<[email protected]>, relay=none, delay=0.02, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)
Dec 31 11:26:01 example postfix/qmgr[5301]: 58A39D25A: removed
Dec 31 11:26:01 example postfix/qmgr[5301]: 58103D252: removed
Dec 31 11:26:01 example postfix/qmgr[5301]: 576CAD23A: removed
Dec 31 11:26:25 example postfix/smtp[7272]: connect to alt1.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out
Dec 31 11:26:44 example postfix/pickup[9439]: 69CE6D23E: uid=1001 from=<[email protected]>
Dec 31 11:26:44 example postfix/cleanup[8226]: 69CE6D23E: message-id=<20231231112644.pRsVV%[email protected]>
Dec 31 11:26:44 example postfix/qmgr[5301]: 69CE6D23E: from=<[email protected]>, size=335, nrcpt=1 (queue active)
Dec 31 11:26:55 example postfix/smtp[7272]: connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c00::1b]:25: Connection timed out
Dec 31 11:26:55 example postfix/smtp[7272]: D1398D22E: to=<[email protected]>, orig_to=<root>, relay=none, delay=4374, delays=4223/0/150/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2404:6800:4003:c00::1b]:25: Connection timed out)
我无法发送电子邮件的原因是什么?
答案1
这两个问题都已在 Server Fault 上回答过多次...您有使用 Google 查找过错误吗?
mail for example.com loops back to myself
这个错误是不言而喻的:MX 记录
example.com
指向 Postfix 服务器,但该服务器未配置为接受该域的邮件。相关问题:
25: Connection timed out
25/tcp
封锁不应发送电子邮件的主机的出站端口是很常见的。您应该询问服务器的 ISP 是否可以打开它。相关问题: