我在运行Debian Wheezy Linux发行版的Beaglebone黑色上使用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帐户进行测试。请注意,我已使用具有PolarSLL的SMTP客户端和其他操作系统(不是Linux)对它们进行了测试,并且这些帐户都可以正常工作。
但是,在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
这确实解决了问题。如果1.56-5适用于Wheezy,也许不需要此修复程序?
不管是否实现了上述修复程序,以下帐户都将提供相同的结果。
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.
有人可以帮忙吗?
谢谢
最佳答案
我通过改变解决了
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) {
至
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'TLSv1')) {
在sendEmail文件中。