Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Since I upgraded my PC from (k)ubuntu 12.04 to 12.10 I receive this error message when trying to send an email using sendemail.

Installing an older version of IO::Socket::SSL is not an option. I have the impression that all works as it should and the message is just a warning.

How can I get rid of this message?


SSL.pm

I think the below has to do with the problem (/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

And at sendemail end I think it is about here in the code:

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     }
share|improve this question
1  
Solved it for the time being by changing 'SSLv3 TLSv1'in sendemail line 1907 to 'SSLv3', but editing files installed from a package is bad. –  jippie Oct 29 '12 at 19:43

4 Answers 4

up vote 6 down vote accepted

There is a bug report on Debian's bug tracker website: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679911

It also states a workaround:

specify -o tls=no as an option on the command line.

Thanks @Manolo Díaz on debian.org.

share|improve this answer

Also a workaround, do this if it's required to send from smtp.gmail.com:

/usr/bin/sendemail on line 1907: 'SSLv3 TLSv1' => 'SSLv3' 

as temporary solution.

share|improve this answer

Easier workaround is:

Replace:

m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i

With:

m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i
share|improve this answer
    
Worked like a charm, thanks Nguli –  NguliMkaree Dec 10 '13 at 9:16
if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3')) {<br>

works on debian wheezy with sendEmail 1.56-2 and libio-socket-ssl-perl 1.76-2 and

if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv23:!SSLv2')) {<br>

works with …/IO/Socket/SSL.pm: 1.74 sendEmail: 1.56 in Ubuntu.

This has been a problem in ubuntu and debian repos for over a year.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.