Bug 981231

Summary: msmtp with gnutls broken: "A TLS packet with unexpected length was received"
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: msmtpAssignee: Gerald Cox <gbcox>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: accounts, opensource
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-14 17:32:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Till Maas 2013-07-04 09:42:15 UTC
Description of problem:
msmtp with gnutls support does not work with an debian exim 4.72-6+squeezy3
Version-Release number of selected component (if applicable):
msmtp-1.4.29-2.fc19

How reproducible:
Try to use TLS with the remote server.

Steps to Reproduce:
1. configure tks, starttls off, tls_certcheck on
2. run msmtp -Sv

Actual results:
Local error: TLS handshake failed: the operation timed out
Remote: A TLS packet with unexpected length was received

Expected results:
no errors should occur

Additional info:
Recompiling the SRPM with OpenSSL makes it work again.
OpenSSL does not support all settings like GnutLS, such as tls_min_dh_prime_bits or tls_priorities.
The problem did not occur with Fedora 17.

Comment 1 Fedora Admin XMLRPC Client 2013-07-08 14:58:13 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Peter Lemenkov 2014-08-10 15:21:13 UTC
This should be fixed already (circa September, 2013). Please test it and if the issue still exists then reopen it.

Comment 3 Till Maas 2015-11-26 21:59:34 UTC
It is still a problem in Fedora 23:
The remote error was now: TLS error on connection from  ... (SSL_accept): error:00000000:lib(0):func(0):reason(0)
TLS client disconnected cleanly (rejected our certificate?)

The local error is still: TLS handshake failed: the operation timed out

The remote server is exim on current stable compiled against OpenSSL.

Comment 4 Peter Lemenkov 2016-06-06 13:33:12 UTC
(In reply to Till Maas from comment #3)
> It is still a problem in Fedora 23:
> The remote error was now: TLS error on connection from  ... (SSL_accept):
> error:00000000:lib(0):func(0):reason(0)
> TLS client disconnected cleanly (rejected our certificate?)
> 
> The local error is still: TLS handshake failed: the operation timed out
> 
> The remote server is exim on current stable compiled against OpenSSL.

I can't really debug this. I don't have any setup where I can test it. My the only use case for msmtp is to send git patches through gmail.com to those projects who still doesn't use GitHub. Could you please verify this issue still persists in the latest msmtp builds?

Comment 5 Till Maas 2016-06-15 14:50:22 UTC
I used this commandline to make sure that it would accept the certificate: LANG=C msmtp  --serverinfo --tls --tls-certcheck=off -vv

But I got the same error as in comment:3

Comment 6 Fedora End Of Life 2016-11-24 10:59:46 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2016-12-20 12:39:43 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Fedora End Of Life 2018-02-20 15:21:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 9 Gerald Cox 2018-07-10 16:21:18 UTC
Does this problem still exist?  If so, could you please report upstream and annotate this ticket.  There is a new website for reporting issues:

https://gitlab.marlam.de/marlam/msmtp/issues

Comment 10 Jan Kurik 2018-08-14 11:10:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.