又碰到邮件问题,在magento前台注册新用户,下订单都没有收到邮件。但是提示都是说正常。
直接在ssh中使用下列命令测试,连接超时:
echo "Subject: test" | /usr/lib/sendmail -v xinhaozheng(at)gmail.com
(注:很多人在测试时直接把命令复制进去测试,导致我收到了N多的测试邮件。)
提示:
WARNING: local host name (server) is not qualified; see
cf/README: WHO AM I?
xinhaozheng@gmail.com... Connecting to [127.0.0.1] via relay...
xinhaozheng@gmail.com... Deferred: Connection timed out with
[127.0.0.1]
怀疑是ISP封掉了25端口。检查一下防火墙,暂时关掉iptables,再用这个命令测试,可以通过:
WARNING: local host name (server) is not qualified; see
cf/README: WHO AM I?
xinhaozheng@gmail.com... Connecting to [127.0.0.1] via relay...
220 server ESMTP Sendmail 8.13.8/8.13.8; Thu, 29 Apr 2010 03:22:42
+0200
>>> EHLO server
250-server Hello localhost.localdomain [127.0.0.1], pleased to meet
you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:
250 2.1.0
>>> RCPT To:
>>> DATA
250 2.1.5
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 o3T1Mg5Z016990 Message accepted for delivery
xinhaozheng@gmail.com... Sent (o3T1Mg5Z016990 Message accepted for
delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server closing connection