事情的进展如下:
host> echo "Hey my man" | mail -s "Testing" [email protected]
然后,在 /var/log/mail.log 中:
Sep 13 12:08:31 host postfix/pickup[738]: EB0535EF3F3: uid=501 from=<user>
Sep 13 12:08:31 host postfix/cleanup[753]: EB0535EF3F3: message-id=<[email protected]>
Sep 13 12:08:31 host postfix/qmgr[739]: EB0535EF3F3: from=<[email protected]>, size=309, nrcpt=1 (queue active)
Sep 13 12:08:32 host postfix/smtp[755]: connect to gmail-smtp-in.l.google.com[72.14.213.27]:25: Host is down
Sep 13 12:08:32 host postfix/smtp[755]: connect to alt1.gmail-smtp-in.l.google.com[74.125.127.27]:25: Host is down
Sep 13 12:08:32 host postfix/smtp[755]: connect to alt2.gmail-smtp-in.l.google.com[74.125.67.27]:25: Host is down
Sep 13 12:08:32 host postfix/smtp[755]: connect to alt3.gmail-smtp-in.l.google.com[74.125.45.27]:25: Host is down
Sep 13 12:08:32 host postfix/smtp[755]: connect to alt4.gmail-smtp-in.l.google.com[209.85.227.27]:25: Host is down
Sep 13 12:08:32 host postfix/smtp[755]: EB0535EF3F3: to=<[email protected]>, relay=none, delay=0.22, delays=0.02/0.01/0.19/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[209.85.227.27]:25: Host is down)
呃,真的吗?Gmail 坏了?不是这样的:它可以在我的各种邮件应用程序等上运行。运行dig alt4.gmail-smtp-in.l.google.com
结果如下:
; <<>> DiG 9.6.0-APPLE-P2 <<>> alt4.gmail-smtp-in.l.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57897
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;alt4.gmail-smtp-in.l.google.com. IN A
;; ANSWER SECTION:
alt4.gmail-smtp-in.l.google.com. 168 IN A 209.85.227.27
;; AUTHORITY SECTION:
google.com. 567 IN NS ns1.google.com.
google.com. 567 IN NS ns4.google.com.
google.com. 567 IN NS ns3.google.com.
google.com. 567 IN NS ns2.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 768 IN A 216.239.32.10
ns2.google.com. 657 IN A 216.239.34.10
ns3.google.com. 867 IN A 216.239.36.10
ns4.google.com. 598 IN A 216.239.38.10
;; Query time: 14 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Sep 13 12:08:43 2010
;; MSG SIZE rcvd: 201
我觉得不错。我试用了我的 Google Apps 帐户,并收到了:
Sep 13 12:26:16 host postfix/smtp[1160]: connect to ASPMX.L.GOOGLE.COM[74.125.127.27]:25: Host is down
Sep 13 12:26:16 host postfix/smtp[1160]: BB2655EF5D7: to=<[email protected]>, relay=none, delay=5.1, delays=0.01/0.01/5.1/0, dsn=4.4.1, status=deferred (connect to ASPMX.L.GOOGLE.COM[74.125.127.27]:25: Host is down)
但当然它没有关闭。这是 Snow Leopard 的默认安装 - 还没有使用过 postfix 配置文件或任何东西。我需要邮件来处理与 cron 作业相关的邮件,这让我很抓狂。
有什么想法吗?还有以下确凿的证据:
host> telnet aspmx.l.google.com 25
Trying 74.125.67.27...
telnet: connect to address 74.125.67.27: Host is down
telnet: Unable to connect to remote host
我的 ISP 级别是否过滤了某些内容?
答案1
阻止端口 25 上的传出连接的 ISP 通常会提供一个传出服务器,您可以通过该服务器转发邮件(并且他们可以在该服务器上应用垃圾邮件过滤器以确保您不会做任何恶意的事情)。根据本文,您需要通过 smtp.west.cox.net 或 smtp.east.cox.net 进行中继,具体取决于您所在的州。为此,编辑 /etc/postfix/main.cf 并添加如下行:
relayhost = [smtp.west.cox.net]
答案2
您是否正在尝试与 GMail 建立未加密的连接,这会暴露密码或期望 GMail 在未经身份验证的情况下传递消息?
怀疑这是否会起作用。
看http://mail.google.com/support/bin/answer.py?hl=en&answer=78775其中谈到了需要 SSL。