【发布时间】:2015-06-12 11:43:40
【问题描述】:
我在运行 Debian Wheezy Linux 发行版的 Beaglebone black 上使用 SendEmail SMTP 客户端 (http://caspian.dotconf.net/menu/Software/SendEmail/)。
这个工具正是我需要的,但我遇到了一些问题。请记住,我是 Linux 新手。
首先,Debian Wheezy 的最新 SendEmail 软件包是 1.56-2 (https://packages.debian.org/source/wheezy/sendemail)。稍后的软件包 (1.56-5) 可用于其他 Debian 发行版(例如 Sid/Jessie),但不适用于 Wheezy。有谁知道这是为什么?
我还使用 libio-socket-ssl-perl 1.76-2、libnet-ssleay-per 1.48-1+b1、perl 5.14.2-21+deb7u2。
其次,我在端口 465 和 587 上使用 GMAIL 和 GMX 帐户进行测试。请注意,我已经使用不同的操作系统(不是 Linux)和我自己的带有 PolarSLL 的 SMTP 客户端对这些帐户进行了测试,并且这些帐户都可以正常工作。
但是,在 Linux Debian Wheezy 上使用 SendEmail 时,它们似乎不起作用。我遇到的问题是:
GMAIL port 587 (STARTTLS) FAILS:
Jun 12 10:39:55 beaglebone sendEmail[3686]: DEBUG => My IP address is: 192.168.1.224
Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS => Received: 220 mx.google.com ESMTP ha4sm2142303wib.0 - gsmtp
Jun 12 10:39:55 beaglebone sendEmail[3686]: INFO => Sending: EHLO beaglebone
Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS => Received: 250-mx.google.com at your service, [92.19.250.250], 250-SIZE 35882577, 250-8BITMIME, 250-STARTTLS, 250-ENHANCEDSTATUSCODES, 250-PIPELINING, 250-CHUNKING, 250 SMTPUTF8
Jun 12 10:39:55 beaglebone sendEmail[3686]: INFO => Sending: STARTTLS
Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS => Received: 220 2.0.0 Ready to start TLS
invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332
各种论坛都提到修复/解决方法是更改“SSL.pm”中的第 1490 行
来自
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i
到
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i
这确实解决了问题。如果 Wheezy 可以使用 1.56-5,也许不需要此修复?
无论是否实施上述修复,以下帐户都会给出相同的结果。
GMAIL port 465 (SSL) FAILS:
Jun 12 10:32:43 beaglebone sendEmail[3537]: DEBUG => Connecting to smtp.gmail.com:465
Jun 12 10:32:43 beaglebone sendEmail[3537]: DEBUG => My IP address is: 192.168.1.224
Jun 12 10:33:43 beaglebone sendEmail[3537]: ERROR => Timeout while reading from smtp.gmail.com:465 There was no response after 60 seconds.
GMX port 587 (STARTTLS) FAILS:
Jun 12 10:35:12 beaglebone sendEmail[3586]: DEBUG => Connecting to mail.gmx.com:587
Jun 12 10:35:13 beaglebone sendEmail[3586]: DEBUG => My IP address is: 192.168.1.224
Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS => Received: 220 gmx.com (mrgmx103) Nemesis ESMTP Service ready
Jun 12 10:35:13 beaglebone sendEmail[3586]: INFO => Sending: EHLO beaglebone
Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS => Received: 250-gmx.com Hello beaglebone [92.19.250.250], 250-SIZE 69920427, 250-AUTH LOGIN PLAIN, 250 STARTTLS
Jun 12 10:35:13 beaglebone sendEmail[3586]: INFO => Sending: STARTTLS
Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS => Received: 220 OK
Jun 12 10:35:13 beaglebone sendEmail[3586]: ERROR => TLS setup failed: SSL connect attempt failed with unknown error error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
GMX port 465 (SSL) FAILS:
Jun 12 10:36:23 beaglebone sendEmail[3619]: DEBUG => Connecting to mail.gmx.com:465
Jun 12 10:36:23 beaglebone sendEmail[3619]: DEBUG => My IP address is: 192.168.1.224
Jun 12 10:36:33 beaglebone sendEmail[3619]: ERROR => mail.gmx.com:465 returned a zero byte response to our query.
谁能帮忙?
谢谢
【问题讨论】:
-
我已通过将 SSL.pm 恢复到其原始状态并手动将 sendEmail 1.56-5 复制到 /usr/bin 来修复端口 587 问题。但是,这对端口 465 的结果没有影响,因此我们将不胜感激。
标签: linux email smtp gmail debian