我在运行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帐户进行测试。请注意,我使用不同的操作系统(不是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.
有人可以帮忙吗?
由于
答案 0 :(得分:3)
我通过改变
解决了这个问题if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) {
到
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'TLSv1')) {
发送电子邮件文件中的。
答案 1 :(得分:1)
我有同样的错误(在debian jessie中),我解决了安装包 ca-certificates
apt-get install ca-certificates
答案 2 :(得分:0)
在我的情况下,我已经安装了ca-certificates
,但程序包已损坏。所以我需要重新安装它。该修复由update-ca-certificates
脚本完成(它在/etc/ssl/certs
中重新生成证书,作为安装后脚本的一部分):
apt install --reinstall ca-certificates