【问题标题】:Centos Postfix mail not received in gmailgmail未收到Centos Postfix邮件
【发布时间】:2016-11-22 15:10:01
【问题描述】:

简单的用例,但不起作用。

我有一个 Web 应用程序并想配置一个 SMTP 服务器以从应用程序发送电子邮件。

根据链接安装 mailx - http://tecadmin.net/bash-mail-command-not-found/ 都很好。

Test Sending email as:  echo "This is a test email body  " | mail -s "This is a test email " dk@xxx.com

现在我在日志中得到以下信息:

root@/var/log $ tail -f /var/log/maillog
Jul 19 16:47:57 bridgeapps-dev01 postfix/postfix-script[23104]: stopping the Postfix mail system
Jul 19 16:47:57 bridgeapps-dev01 postfix/master[1466]: terminating on signal 15
Jul 19 16:47:57 bridgeapps-dev01 postfix/postfix-script[23184]: starting the Postfix mail system
Jul 19 16:47:57 bridgeapps-dev01 postfix/master[23186]: daemon started -- version 2.10.1, configuration /etc/postfix
Jul 19 16:48:12 bridgeapps-dev01 postfix/pickup[23187]: 4163841204: uid=0 from=<root>
Jul 19 16:48:12 bridgeapps-dev01 postfix/cleanup[23194]: 4163841204: message-id=<20160719154812.4163841204@bridgeapps-dev01.localdomain>
Jul 19 16:48:12 bridgeapps-dev01 postfix/qmgr[23188]: 4163841204: from=<root@bridgeapps-dev01.localdomain>, size=582, nrcpt=1 (queue active)
Jul 19 16:48:12 bridgeapps-dev01 postfix/smtp[23196]: connect to ASPMX.L.GOOGLE.com[2a00:1450:400c:c09::1b]:25: Network is unreachable
Jul 19 16:48:12 bridgeapps-dev01 postfix/smtp[23196]: 4163841204: to=<dk@xxx.com>, relay=ASPMX.L.GOOGLE.com[64.233.166.26]:25, delay=0.47, delays=0.02/0.01/0.24/0.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1468943292 l4si11397516wmf.56 - gsmtp)
Jul 19 16:48:12 bridgeapps-dev01 postfix/qmgr[23188]: 4163841204: removed

全绿色,没有错误,就像事情看起来好得令人难以置信,我从未在 gmail 中收到这封电子邮件。

我错过了什么?

谢谢,

【问题讨论】:

    标签: email postfix


    【解决方案1】:

    首先,您不能从本地主机发送电子邮件。你需要一个邮件中继。由于您已经在使用 gmail,我建议您这样做:

    https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay/

    【讨论】:

      猜你喜欢
      • 2014-12-26
      • 2014-04-29
      • 2017-11-17
      • 1970-01-01
      • 2019-06-02
      • 2013-01-21
      • 2016-03-04
      • 2015-01-04
      • 2015-07-15
      相关资源
      最近更新 更多