我已经将 sendmail 设置为使用 Google SMPT 发送邮件。但是,我还是不断收到此错误。
Jun 20 11:35:24 server sendmail[2370]: p5KBZO3X002370: from=apache, size=1646, class=0, nrcpts=1, msgid=<[email protected]>, relay=apache@localhost
Jun 20 11:35:24 server sendmail[2371]: p5KBZOal002371: from=<[email protected]>, size=1755, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jun 20 11:35:24 server sendmail[2370]: p5KBZO3X002370: [email protected], ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31646, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p5KBZOal002371 Message accepted for delivery)
Jun 20 11:35:24 server sendmail[2373]: STARTTLS=client: file /etc/mail/certs/sendmail.pem unsafe: Group readable file
Jun 20 11:35:25 server sendmail[2373]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=OK, cipher=RC4-SHA, bits=128/128
Jun 20 11:35:25 server sendmail[2373]: p5KBZOal002371: to=<[email protected]>, ctladdr=<[email protected]> (48/48), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=121755, relay=smtp.gmail.com [74.125.39.109], dsn=5.0.0, stat=Service unavailable
Jun 20 11:35:25 server sendmail[2373]: p5KBZOal002371: p5KBZPal002373: DSN: Service unavailable
Jun 20 11:35:25 server sendmail[2373]: p5KBZPal002373: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33011, dsn=2.0.0, stat=Sent
如果需要更多信息,请询问。
答案1
dsn=5.0.0, stat=Service unavailable
是一般错误。
有关详细信息,您应该阅读发送到根邮箱的 DSN(传递状态通知)电子邮件。
6月20日 11:35:25 服务器 sendmail[2373]: p5KBZPal002373: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33011, dsn=2.0.0, stat=Sent
答案2
您需要更改服务器/配置的主机名,使其不是“localhost.localdomain”。