由于我将PC从(k)ubuntu 12.04升级到12.10,因此在尝试使用发送电子邮件时会收到此错误消息sendemail
。
不能安装IO :: Socket :: SSL的旧版本。我有一种印象,那就是一切正常,消息只是一个警告。
我如何摆脱此消息?
SSL.pm
我认为以下与问题有关(/usr/share/perl5/IO/Socket/SSL.pm)。
34 use constant DEFAULT_VERSION => 'SSLv23:!SSLv2';
...
251 my %default_args = (
252 Proto => 'tcp',
253 SSL_server => $is_server,
254 SSL_use_cert => $is_server,
255 SSL_check_crl => 0,
256 SSL_version => DEFAULT_VERSION,
257 SSL_verify_mode => SSL_VERIFY_NONE,
258 SSL_verify_callback => undef,
259 SSL_verifycn_scheme => undef, # don't verify cn
260 SSL_verifycn_name => undef, # use from PeerAddr/PeerHost
261 SSL_npn_protocols => undef, # meaning depends whether on server or client side
262 SSL_honor_cipher_order => 0, # client order gets preference
263 );
...
332 ${*$self}{'_SSL_ctx'} = IO::Socket::SSL::SSL_Context->new($arg_hash) || return;
发电子邮件
在sendemail端,我认为代码中的内容与此有关:
1903 ## Start TLS if possible
1904 if ($conf{'tls_server'} == 1 and $conf{'tls_client'} == 1 and $opt{'tls'} =~ /^(yes|auto)$/) {
1905 printmsg("DEBUG => Starting TLS", 2);
1906 if (SMTPchat('STARTTLS')) { quit($conf{'error'}, 1); }
1907 if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) {
1908 quit("ERROR => TLS setup failed: " . IO::Socket::SSL::errstr(), 1);
1909 }
1910 printmsg("DEBUG => TLS: Using cipher: ". $SERVER->get_cipher(), 3);
1911 printmsg("DEBUG => TLS session initialized :)", 1);
1912
1913 ## Restart our SMTP session
1914 if (SMTPchat('EHLO ' . $opt{'fqdn'})) { quit($conf{'error'}, 1); }
1915 }
1916 elsif ($opt{'tls'} eq 'yes' and $conf{'tls_server'} == 0) {
1917 quit("ERROR => TLS not possible! Remote SMTP server, $conf{'server'}, does not support it.", 1);
1918 }