Hello community, here is the log from the commit of package getmail for openSUSE:Factory checked in at 2019-02-19 12:03:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/getmail (Old) and /work/SRC/openSUSE:Factory/.getmail.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "getmail" Tue Feb 19 12:03:06 2019 rev:26 rq:677227 version:5.11 Changes: -------- --- /work/SRC/openSUSE:Factory/getmail/getmail.changes 2018-05-11 14:28:00.124687146 +0200 +++ /work/SRC/openSUSE:Factory/.getmail.new.28833/getmail.changes 2019-02-19 12:03:14.529050135 +0100 @@ -1,0 +2,26 @@ +Sun Feb 17 18:00:00 UTC 2019 - [email protected] + +- Version bump to 5.11 + * Fix bug for SNI with Python < 2.7.13 + +- Changes from 5.10 + * experimental: when SSL SNI support is present in the underlying Python + (and OpenSSL), send SNI by default in the SSL setup. This should work + around Gmail's brokenness with TLSv.1.3 connections when SNI is not sent. + +- Changes from 5.9 + * documentation-only update; add note with workaround for Gmail SSL + connections with OpenSSL 1.1.1 and later + +------------------------------------------------------------------- +Fri Nov 30 18:00:00 UTC 2018 - [email protected] + +- Version bump to 5.8 + * Fix problem handling IMAP errors introduced in 5.7. + +- Changes from 5.7 + * When users specify an SSL version that no longer exists in the + Python ssl module, do not result in an unhandled exception. + * Catch IMAP UNAVAILABLE temporary error during login. + +------------------------------------------------------------------- Old: ---- getmail-5.6.tar.gz New: ---- getmail-5.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ getmail.spec ++++++ --- /var/tmp/diff_new_pack.M506yL/_old 2019-02-19 12:03:15.269049758 +0100 +++ /var/tmp/diff_new_pack.M506yL/_new 2019-02-19 12:03:15.269049758 +0100 @@ -17,7 +17,7 @@ Name: getmail -Version: 5.6 +Version: 5.11 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://pyropus.ca/software/getmail/ ++++++ _service ++++++ --- /var/tmp/diff_new_pack.M506yL/_old 2019-02-19 12:03:15.301049741 +0100 +++ /var/tmp/diff_new_pack.M506yL/_new 2019-02-19 12:03:15.301049741 +0100 @@ -1,7 +1,7 @@ <services> <service name="verify_file" mode="localonly"> <param name="verifier">sha256</param> - <param name="checksum">460d2c8834936df88d594095d789c4585edca9b0bdbeded9f6267f0d90dcd59a</param> - <param name="file">getmail-5.6.tar.gz</param> + <param name="checksum">086647c7ccde5b1346354d924ca3020660dc096a41b67207217d6b0a81b92ba2</param> + <param name="file">getmail-5.11.tar.gz</param> </service> </services> ++++++ getmail-5.6.tar.gz -> getmail-5.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/PKG-INFO new/getmail-5.11/PKG-INFO --- old/getmail-5.6/PKG-INFO 2018-04-02 23:48:11.000000000 +0200 +++ new/getmail-5.11/PKG-INFO 2019-02-13 15:40:55.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: getmail -Version: 5.6 +Version: 5.11 Summary: a mail retrieval, sorting, and delivering system Home-page: http://pyropus.ca/software/getmail/ Author: Charles Cazabon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/README new/getmail-5.11/README --- old/getmail-5.6/README 2018-04-02 23:47:38.000000000 +0200 +++ new/getmail-5.11/README 2019-02-07 23:01:13.000000000 +0100 @@ -3,7 +3,7 @@ external MDAs, arbitrary message filtering, single-user and domain-mailboxes, and many other useful features. -getmail is Copyright (C) 1998-2009 Charles Cazabon. +getmail is Copyright (C) 1998-2019 Charles Cazabon. getmail is licensed for use under the GNU General Public License version 2 (only). See docs/COPYING for specific terms and distribution information. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/CHANGELOG new/getmail-5.11/docs/CHANGELOG --- old/getmail-5.6/docs/CHANGELOG 2018-04-02 23:47:38.000000000 +0200 +++ new/getmail-5.11/docs/CHANGELOG 2019-02-13 15:40:50.000000000 +0100 @@ -1,3 +1,31 @@ +Version 5.11 +13 February 2019 + -bugfix: the SNI change did not work correctly with Python < 2.7.13; + should be fixed now. Thanks: Scott Robbins. + +Version 5.10 +12 February 2019 + -experimental: when SSL SNI support is present in the underlying Python + (and OpenSSL), send SNI by default in the SSL setup. This should work + around Gmail's brokenness with TLSv.1.3 connections when SNI is not sent. + +Version 5.9 + -documentation-only update; add note with workaround for Gmail SSL + connections with OpenSSL 1.1.1 and later. + -update copyright dates. + +Version 5.8 +9 November 2018 + -fix problem handling IMAP errors introduced in 5.7. Thanks: + Andreas Reuleaux. + +Version 5.7 +30 October 2018 + -when users specify an SSL version that no longer exists in the Python + ssl module, do not result in an unhandled exception. Thanks: "nandre". + -catch IMAP UNAVAILABLE temporary error during login. Thanks: + Dario Corti. + Version 5.6 02 April 2018 -fix references to version 4 in README. Thanks: Daniel Kahn Gillmor. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/configuration.html new/getmail-5.11/docs/configuration.html --- old/getmail-5.6/docs/configuration.html 2018-04-02 23:48:09.000000000 +0200 +++ new/getmail-5.11/docs/configuration.html 2019-02-13 15:40:54.000000000 +0100 @@ -22,7 +22,7 @@ software. </p> <p class="about"> - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. </p> <p class="about"> getmail is licensed under the @@ -761,8 +761,14 @@ — advanced option to control which SSL version getmail tries to use to connect to the server; the default is "sslv23". Another useful value is probably "sslv3". The available option values - are taken from the Python ssl module. + are taken from the Python ssl module. Note that this option exists + only to help in connecting certain legacy, out-of-date, broken servers; + most users should not specify this option at all. Using this option + without knowing what you are doing can reduce the effectiveness of + your encrypted connection. <strong>Note: this option is only available with Python 2.6 or higher.</strong> + Note: see the <a href="faq.html#faq-notabug-gmail-tls-sni">FAQ for details + on how to work around Gmail connection problems with OpenSSL v.1.1.1 and later</a>. </li> <li> ssl_fingerprints diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/configuration.txt new/getmail-5.11/docs/configuration.txt --- old/getmail-5.6/docs/configuration.txt 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/configuration.txt 2019-02-13 15:40:54.000000000 +0100 @@ -5,7 +5,7 @@ please refer to the documentation included with that version of the software. - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. getmail is licensed under the GNU General Public License version 2 (only). If you wish to obtain a license to distribute getmail under @@ -493,8 +493,14 @@ * ssl_version (string) — advanced option to control which SSL version getmail tries to use to connect to the server; the default is "sslv23". Another useful value is probably "sslv3". The available - option values are taken from the Python ssl module. Note: this - option is only available with Python 2.6 or higher. + option values are taken from the Python ssl module. Note that this + option exists only to help in connecting certain legacy, + out-of-date, broken servers; most users should not specify this + option at all. Using this option without knowing what you are doing + can reduce the effectiveness of your encrypted connection. Note: + this option is only available with Python 2.6 or higher. Note: see + the FAQ for details on how to work around Gmail connection problems + with OpenSSL v.1.1.1 and later. * ssl_fingerprints (tuple of quoted strings) — advanced option to notice when the server's SSL certificate changes. Supply a list of one or more SHA256 certificate fingerprints, and getmail will diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/documentation.html new/getmail-5.11/docs/documentation.html --- old/getmail-5.6/docs/documentation.html 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/documentation.html 2019-02-13 15:40:54.000000000 +0100 @@ -22,7 +22,7 @@ software. </p> <p class="about"> - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. <charlesc-getmail @ pyropus.ca> </p> <p class="about"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/documentation.txt new/getmail-5.11/docs/documentation.txt --- old/getmail-5.6/docs/documentation.txt 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/documentation.txt 2019-02-13 15:40:54.000000000 +0100 @@ -5,7 +5,7 @@ please refer to the documentation included with that version of the software. - getmail is Copyright © 1998-2009 Charles Cazabon. <charlesc-getmail @ + getmail is Copyright © 1998-2019 Charles Cazabon. <charlesc-getmail @ pyropus.ca> getmail is licensed under the GNU General Public License version 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/faq.html new/getmail-5.11/docs/faq.html --- old/getmail-5.6/docs/faq.html 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/faq.html 2019-02-13 15:40:54.000000000 +0100 @@ -22,7 +22,7 @@ software. </p> <p class="about"> - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. </p> <p class="about"> getmail is licensed under the @@ -185,6 +185,7 @@ <li><a href="faq.html#faq-notabug-brokenpopserver">operation error (SimplePOP3Retriever: [...] does not uniquely identify messages [...] see documentation or use BrokenUIDLPOP3Retriever instead</a></li> <li><a href="faq.html#faq-notabug-osx-realloc">MemoryError on OS X</a></li> <li><a href="faq.html#faq-notabug-memory">MemoryError when using IMAP</a></li> + <li><a href="faq.html#faq-notabug-gmail-tls-sni">Errors connecting to Gmail with OpenSSL 1.1.1</a></li> </ul> </li> </ul> @@ -1744,7 +1745,19 @@ fix the problem, or use POP3 instead of IMAP to work around it. </p> - +<h3 id="faq-notabug-gmail-tls-sni">Errors connecting to Gmail with OpenSSL 1.1.1</h3> +<p> + If you experience connection/SSL errors connecting to Gmail servers, and your OpenSSL + is version 1.1.1 or higher, the problem is that Gmail is failing the connection on the + basis that SNI is not in use. To work around the problem, upgrade to getmail + v.5.10 or later, or tell getmail to use TLSv1.2 rather than TLS1.3 in your retriever + configuration and specify TLS v1.2 as the protocol to use: +</p> +<pre class="example"> +[retriever] +... +ssl_version = tlsv1_2 +</pre> <!--#include virtual="/include/footer-xhtml11.html"--> </div> <!--#include virtual="/include/menu-top.html"--> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/faq.txt new/getmail-5.11/docs/faq.txt --- old/getmail-5.6/docs/faq.txt 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/faq.txt 2019-02-13 15:40:54.000000000 +0100 @@ -5,7 +5,7 @@ please refer to the documentation included with that version of the software. - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. getmail is licensed under the GNU General Public License version 2 (only). If you wish to obtain a license to distribute getmail under @@ -139,6 +139,7 @@ or use BrokenUIDLPOP3Retriever instead # MemoryError on OS X # MemoryError when using IMAP + # Errors connecting to Gmail with OpenSSL 1.1.1 Frequently-Asked Questions (FAQs) @@ -1184,3 +1185,15 @@ Upgrade your Python installation to the newest Python 2.5 or 2.6 version to fix the problem, or use POP3 instead of IMAP to work around it. + +Errors connecting to Gmail with OpenSSL 1.1.1 + + If you experience connection/SSL errors connecting to Gmail servers, + and your OpenSSL is version 1.1.1 or higher, the problem is that Gmail + is failing the connection on the basis that SNI is not in use. To work + around the problem, upgrade to getmail v.5.10 or later, or tell getmail + to use TLSv1.2 rather than TLS1.3 in your retriever configuration and + specify TLS v1.2 as the protocol to use: +[retriever] +... +ssl_version = tlsv1_2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/getmail.1 new/getmail-5.11/docs/getmail.1 --- old/getmail-5.6/docs/getmail.1 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/docs/getmail.1 2019-02-07 23:01:13.000000000 +0100 @@ -68,7 +68,7 @@ .B getmail [options] --dump\fR with any bug report. .SH COPYRIGHT -Copyright \(co 1998-2009 Charles Cazabon +Copyright \(co 1998-2019 Charles Cazabon .br This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/getmail_fetch.1 new/getmail-5.11/docs/getmail_fetch.1 --- old/getmail-5.6/docs/getmail_fetch.1 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/docs/getmail_fetch.1 2019-02-07 23:01:13.000000000 +0100 @@ -63,7 +63,7 @@ .B getmail [options] --dump\fR with any bug report. .SH COPYRIGHT -Copyright \(co 1998-2009 Charles Cazabon +Copyright \(co 1998-2019 Charles Cazabon .br This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/getmail_maildir.1 new/getmail-5.11/docs/getmail_maildir.1 --- old/getmail-5.6/docs/getmail_maildir.1 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/docs/getmail_maildir.1 2019-02-07 23:01:13.000000000 +0100 @@ -25,7 +25,7 @@ .SH "REPORTING BUGS" Report bugs to <[email protected]>. .SH COPYRIGHT -Copyright \(co 1998-2009 Charles Cazabon +Copyright \(co 1998-2019 Charles Cazabon .br This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/getmail_mbox.1 new/getmail-5.11/docs/getmail_mbox.1 --- old/getmail-5.6/docs/getmail_mbox.1 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/docs/getmail_mbox.1 2019-02-07 23:01:13.000000000 +0100 @@ -34,7 +34,7 @@ .SH "REPORTING BUGS" Report bugs to <[email protected]>. .SH COPYRIGHT -Copyright \(co 1998-2009 Charles Cazabon +Copyright \(co 1998-2019 Charles Cazabon .br This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/troubleshooting.html new/getmail-5.11/docs/troubleshooting.html --- old/getmail-5.6/docs/troubleshooting.html 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/troubleshooting.html 2019-02-13 15:40:54.000000000 +0100 @@ -22,7 +22,7 @@ software. </p> <p class="about"> - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. </p> <p class="about"> getmail is licensed under the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/docs/troubleshooting.txt new/getmail-5.11/docs/troubleshooting.txt --- old/getmail-5.6/docs/troubleshooting.txt 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/docs/troubleshooting.txt 2019-02-13 15:40:54.000000000 +0100 @@ -7,7 +7,7 @@ please refer to the documentation included with that version of the software. - getmail is Copyright © 1998-2009 Charles Cazabon. + getmail is Copyright © 1998-2019 Charles Cazabon. getmail is licensed under the GNU General Public License version 2 (only). If you wish to obtain a license to distribute getmail under other terms, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmail new/getmail-5.11/getmail --- old/getmail-5.6/getmail 2017-10-04 18:27:02.000000000 +0200 +++ new/getmail-5.11/getmail 2019-02-07 23:01:13.000000000 +0100 @@ -105,7 +105,7 @@ ####################################### def blurb(): log.info('getmail version %s\n' % __version__) - log.info('Copyright (C) 1998-2012 Charles Cazabon. Licensed under the ' + log.info('Copyright (C) 1998-2019 Charles Cazabon. Licensed under the ' 'GNU GPL version 2.\n') ####################################### @@ -373,6 +373,12 @@ if options['logfile']: options['logfile'].write('credential/login error (%s)' % o) + except getmailLoginRefusedError, o: + retriever.abort() + log.error('%s: login refused error (%s)\n' % (configfile, o)) + if options['logfile']: + options['logfile'].write('login refused error (%s)' % o) + except getmailOperationError, o: errorexit = True retriever.abort() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmail.spec new/getmail-5.11/getmail.spec --- old/getmail-5.6/getmail.spec 2018-04-02 23:48:10.000000000 +0200 +++ new/getmail-5.11/getmail.spec 2019-02-13 15:40:54.000000000 +0100 @@ -2,7 +2,7 @@ Summary: POP3 mail retriever with reliable Maildir delivery Name: getmail -Version: 5.6 +Version: 5.11 Release: 1 License: GPL Group: Applications/Internet @@ -52,6 +52,24 @@ %{python_sitelib}/getmailcore/ %changelog +* Wed Feb 13 2019 Charles Cazabon <[email protected]> +-update to version 5.11 + +* Tue Feb 12 2019 Charles Cazabon <[email protected]> +-update to version 5.10 + +* Fri Feb 08 2019 Charles Cazabon <[email protected]> +-update to version 5.9 + +* Thu Feb 07 2019 Charles Cazabon <[email protected]> +-update to version 5.9 + +* Fri Nov 09 2018 Charles Cazabon <[email protected]> +-update to version 5.8 + +* Tue Oct 30 2018 Charles Cazabon <[email protected]> +-update to version 5.7 + * Mon Apr 02 2018 Charles Cazabon <[email protected]> -update to version 5.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmail_fetch new/getmail-5.11/getmail_fetch --- old/getmail-5.6/getmail_fetch 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/getmail_fetch 2019-02-07 23:01:13.000000000 +0100 @@ -30,7 +30,7 @@ ####################################### def blurb(): log.info('getmail_fetch version %s\n' % __version__) - log.info('Copyright (C) 1998-2012 Charles Cazabon. Licensed under the ' + log.info('Copyright (C) 1998-2019 Charles Cazabon. Licensed under the ' 'GNU GPL version 2.\n') ####################################### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmail_maildir new/getmail-5.11/getmail_maildir --- old/getmail-5.6/getmail_maildir 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/getmail_maildir 2019-02-07 23:01:13.000000000 +0100 @@ -3,7 +3,7 @@ Reads a message from stdin and delivers it to a maildir specified as a commandline argument. Expects the envelope sender address to be in the environment variable SENDER. -Copyright (C) 2001-2012 Charles Cazabon <charlesc-getmail @ pyropus.ca> +Copyright (C) 2001-2019 Charles Cazabon <charlesc-getmail @ pyropus.ca> This program is free software; you can redistribute it and/or modify it under the terms of version 2 (only) of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmail_mbox new/getmail-5.11/getmail_mbox --- old/getmail-5.6/getmail_mbox 2017-07-15 23:58:46.000000000 +0200 +++ new/getmail-5.11/getmail_mbox 2019-02-07 23:01:13.000000000 +0100 @@ -3,7 +3,7 @@ Reads a message from stdin and delivers it to an mbox file specified as a commandline argument. Expects the envelope sender address to be in the environment variable SENDER. -Copyright (C) 2001-2012 Charles Cazabon <charlesc-getmail @ pyropus.ca> +Copyright (C) 2001-2019 Charles Cazabon <charlesc-getmail @ pyropus.ca> This program is free software; you can redistribute it and/or modify it under the terms of version 2 (only) of the GNU General Public License as published by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmailcore/__init__.py new/getmail-5.11/getmailcore/__init__.py --- old/getmail-5.6/getmailcore/__init__.py 2018-04-02 23:47:38.000000000 +0200 +++ new/getmail-5.11/getmailcore/__init__.py 2019-02-13 15:40:50.000000000 +0100 @@ -6,7 +6,7 @@ multidrop IMAP mailboxes. Also supports POP3- and IMAP-over-SSL, message filtering, and other features. -getmail is Copyright (C) 1998-2009 Charles Cazabon. All rights reserved. +getmail is Copyright (C) 1998-2019 Charles Cazabon. All rights reserved. Distributed under the terms of the GNU General Public License version 2 (only). You should have received a copy of the license in the file COPYING. ''' @@ -16,7 +16,7 @@ raise ImportError('getmail version 4 requires Python version 2.3.3' ' or later') -__version__ = '5.6' +__version__ = '5.11' __all__ = [ 'baseclasses', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmailcore/_retrieverbases.py new/getmail-5.11/getmailcore/_retrieverbases.py --- old/getmail-5.6/getmailcore/_retrieverbases.py 2018-04-02 23:47:38.000000000 +0200 +++ new/getmail-5.11/getmailcore/_retrieverbases.py 2019-02-13 15:40:50.000000000 +0100 @@ -66,6 +66,41 @@ # If we have an ssl module: if ssl: + has_sni = getattr(ssl, 'HAS_SNI', False) + proto_best = getattr(ssl, 'PROTOCOL_TLS', None) + if not proto_best: + proto_best = getattr(ssl, 'PROTOCOL_SSLv23', None) + + # Monkey-patch SNI use into SSL.wrap_socket() if supported + if has_sni: + def _wrap_socket(sock, keyfile=None, certfile=None, + server_side=False, cert_reqs=ssl.CERT_NONE, + ssl_version=proto_best, ca_certs=None, + do_handshake_on_connect=True, + suppress_ragged_eofs=True, + ciphers=None, server_hostname=None): + return ssl.SSLSocket(sock=sock, keyfile=keyfile, certfile=certfile, + server_side=server_side, cert_reqs=cert_reqs, + ssl_version=ssl_version, ca_certs=ca_certs, + do_handshake_on_connect=do_handshake_on_connect, + suppress_ragged_eofs=suppress_ragged_eofs, + ciphers=ciphers, server_hostname=server_hostname) + else: + # no SNI support + def _wrap_socket(sock, keyfile=None, certfile=None, + server_side=False, cert_reqs=ssl.CERT_NONE, + ssl_version=proto_best, ca_certs=None, + do_handshake_on_connect=True, + suppress_ragged_eofs=True, + ciphers=None, server_hostname=None): + return ssl.SSLSocket(sock=sock, keyfile=keyfile, certfile=certfile, + server_side=server_side, cert_reqs=cert_reqs, + ssl_version=ssl_version, ca_certs=ca_certs, + do_handshake_on_connect=do_handshake_on_connect, + suppress_ragged_eofs=suppress_ragged_eofs, + ciphers=ciphers) + ssl.wrap_socket = _wrap_socket + # Is it recent enough to have hostname matching (Python 3.2+)? try: ssl_match_hostname = ssl.match_hostname @@ -304,7 +339,7 @@ break if not self.sock: raise socket.error(msg) - extra_args = {} + extra_args = { 'server_hostname': host } if self.ssl_version: extra_args['ssl_version'] = self.ssl_version if self.ca_certs: @@ -544,7 +579,7 @@ self.host = host self.port = port self.sock = socket.create_connection((host, port)) - extra_args = {} + extra_args = { 'server_hostname': host } if self.ssl_version: extra_args['ssl_version'] = self.ssl_version if self.ca_certs: @@ -1706,7 +1741,10 @@ except imaplib.IMAP4.abort, o: raise getmailLoginRefusedError(o) except imaplib.IMAP4.error, o: - raise getmailCredentialError(o) + if str(o).startswith('[UNAVAILABLE]'): + raise getmailLoginRefusedError(o) + else: + raise getmailCredentialError(o) self.log.trace('logged in' + os.linesep) """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/getmail-5.6/getmailcore/utilities.py new/getmail-5.11/getmailcore/utilities.py --- old/getmail-5.6/getmailcore/utilities.py 2017-07-16 05:26:01.000000000 +0200 +++ new/getmail-5.11/getmailcore/utilities.py 2018-10-30 15:51:39.000000000 +0100 @@ -558,21 +558,27 @@ 'specifying ssl_version not supported by this installation of ' 'Python; requires Python 2.6' ) + def get_or_fail(version, symbol): + if symbol is not None: + v = getattr(ssl, symbol, None) + if v is not None: + return v + raise getmailConfigurationError( + 'unknown or unsupported ssl_version "%s"' % version + ) + ssl_version = ssl_version.lower() if ssl_version == 'sslv23': - return ssl.PROTOCOL_SSLv23 + return get_or_fail(ssl_version, 'PROTOCOL_SSLv23') elif ssl_version == 'sslv3': - return ssl.PROTOCOL_SSLv3 + return get_or_fail(ssl_version, 'PROTOCOL_SSLv3') elif ssl_version == 'tlsv1': - return ssl.PROTOCOL_TLSv1 + return get_or_fail(ssl_version, 'PROTOCOL_TLSv1') elif ssl_version == 'tlsv1_1' and 'PROTOCOL_TLSv1_1' in dir(ssl): - return ssl.PROTOCOL_TLSv1_1 + return get_or_fail(ssl_version, 'PROTOCOL_TLSv1_1') elif ssl_version == 'tlsv1_2' and 'PROTOCOL_TLSv1_2' in dir(ssl): - return ssl.PROTOCOL_TLSv1_2 - else: - raise getmailConfigurationError( - 'unknown or unsupported ssl_version' - ) + return get_or_fail(ssl_version, 'PROTOCOL_TLSv1_2') + return get_or_fail(ssl_version, None) ####################################### def check_ssl_fingerprints(conf):
