![无法在 ubuntu 电子邮件服务器上接收电子邮件](https://linux22.com/image/1110469/%E6%97%A0%E6%B3%95%E5%9C%A8%20ubuntu%20%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E6%8E%A5%E6%94%B6%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6.png)
我设置了电子邮件服务器。我可以发送邮件,但当我尝试通过从另一封电子邮件向自己发送电子邮件来接收邮件时,它不起作用。我收到的另一封电子邮件是一个邮件守护程序,而这封电子邮件显示为拒绝。
这是我在()中得到的错误/var/log/mail.log
:
Jun 24 19:17:31 localhost postfix/smtpd[13352]: connect from mail-lb0-f173.google.com[209.85.217.173]
Jun 24 19:17:31 localhost postfix/trivial-rewrite[13329]: warning: do not list domain socialbaked.com in BOTH mydestination and virtual_mailbox_domains
Jun 24 19:17:31 localhost postfix/smtpd[13352]: NOQUEUE: reject: RCPT from mail-lb0-f173.google.com[209.85.217.173]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-lb0-f173.google.com>
Jun 24 19:17:31 localhost postfix/smtpd[13352]: disconnect from mail-lb0-f173.google.com[209.85.217.173]
Jun 24 19:19:38 localhost postfix/master[2102]: daemon started -- version 2.7.0, configuration /etc/postfix
Jun 24 19:19:39 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jun 24 19:19:39 localhost dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (mail)
Jun 24 19:19:41 localhost postfix/master[2102]: reload -- version 2.7.0, configuration /etc/postfix
答案1
错误日志中的以下一行提供了有价值的信息:
localhost postfix/smtpd[13352]: NOQUEUE: reject: RCPT from mail-lb0-f173.google.com[209.85.217.173]: 550 5.1.1 <[email protected]>: Recipient address ejected: User unknown in local recipient table; from=<[email protected]> o=<[email protected]> proto=ESMTP helo=<mail-lb0-f173.google.com>
Postfix 应该将所有邮件转发到互联网上的其他服务器,它实际上并不接收任何域的邮件。如错误日志中所示,example.com 应该转发到 example.com 的邮件服务器。解决方案是从 postfix 配置 /etc/postfix/main.cf 中删除以下行中的 $mydomain:
mydestination = $mydomain, localhost.$mydomain, localhost
来源:服务器故障
答案2
对我来说,问题在于我也遇到了 DNS 问题。为了解决这个问题,我使用了
dpkg-reconfigure postfix
在终端窗口内,将“本地网络”字段答案更改为包含服务器的公共 IP。
之后我跑了service postfix reload
,service postfix restart
一切都好了。