[-]
[+]
|
Changed |
getmail.spec
|
|
|
Deleted |
getmail-4.20.0.tar.gz
^
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/PKG-INFO
^
|
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: getmail
-Version: 4.18.0
+Version: 4.20.2
Summary: a mail retrieval, sorting, and delivering system
Home-page: http://pyropus.ca/software/getmail/
Author: Charles Cazabon
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/docs/CHANGELOG
^
|
@@ -1,3 +1,24 @@
+Version 4.20.2
+9 Apr 2011
+ -further changes to the Received: header construction to handle IPv6 better.
+ Thanks: Frédéric Perrin.
+
+Version 4.20.1
+7 Apr 2011
+ -ensure correct remote address and port is included in the Received: trace
+ headers generated by getmail. Previously the first address found for the
+ server was used even if another address was actually used to connect to the
+ server. Thanks: Frédéric Perrin.
+
+Version 4.20.0
+29 June 2010
+ -fix crap code from bad svn merge that slipped into 4.18.0, triggering
+ exceptions in MDA_external configs. Thanks: Paul Howarth.
+
+Version 4.19.0
+29 June 2010
+ -fix missing import introduced in 4.18.0. Thanks: Paul Howarth.
+
Version 4.18.0
26 June 2010
-update broken link in FAQ. Thanks: Stefan Kangas.
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/getmail.spec
^
|
@@ -2,7 +2,7 @@
Summary: POP3 mail retriever with reliable Maildir delivery
Name: getmail
-Version: 4.18.0
+Version: 4.20.2
Release: 1
License: GPL
Group: Applications/Internet
@@ -52,6 +52,18 @@
%{python_sitelib}/getmailcore/
%changelog
+* Sat Apr 09 2011 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.20.2
+
+* Thu Apr 07 2011 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.20.1
+
+* Tue Jun 29 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.20.0
+
+* Tue Jun 29 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.19.0
+
* Sat Jun 26 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
-update to version 4.18.0
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/getmailcore/__init__.py
^
|
@@ -16,7 +16,7 @@
raise ImportError('getmail version 4 requires Python version 2.3.3'
' or later')
-__version__ = '4.18.0'
+__version__ = '4.20.2'
__all__ = [
'baseclasses',
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/getmailcore/_retrieverbases.py
^
|
@@ -42,6 +42,7 @@
import email
import poplib
import imaplib
+import re
try:
# do we have a recent pykerberos?
@@ -81,6 +82,28 @@
(GSS_STATE_STEP, GSS_STATE_WRAP) = (0, 1)
#
+# Bugfix classes
+#
+
+if sys.version_info < (2, 5, 3):
+ # A serious imaplib bug (http://bugs.python.org/issue1389051) was
+ # fixed in 2.5.3. Earlier Python releases need a work-around.
+ orig_imap4_ssl = imaplib.IMAP4_SSL
+ class IMAP4_SSL(orig_imap4_ssl):
+ def read(self, size):
+ """Read 'size' bytes from remote."""
+ # sslobj.read() sometimes returns < size bytes
+ chunks = []
+ read = 0
+ while read < size:
+ data = self.sslobj.read(min(size-read, 16384))
+ read += len(data)
+ chunks.append(data)
+ return ''.join(chunks)
+
+ imaplib.IMAP4_SSL = IMAP4_SSL
+
+#
# Mix-in classes
#
@@ -92,6 +115,7 @@
self.log.trace()
try:
self.conn = poplib.POP3(self.conf['server'], self.conf['port'])
+ self.setup_received(self.conn.sock)
except poplib.error_proto, o:
raise getmailOperationError('POP error (%s)' % o)
except socket.timeout:
@@ -135,6 +159,7 @@
+ os.linesep)
self.conn = poplib.POP3_SSL(self.conf['server'],
self.conf['port'])
+ self.setup_received(self.conn.sock)
except poplib.error_proto, o:
raise getmailOperationError('POP error (%s)' % o)
except socket.timeout:
@@ -179,6 +204,7 @@
+ os.linesep
)
self.conn = POP3SSL(self.conf['server'], self.conf['port'])
+ self.setup_received(self.conn.rawsock)
except poplib.error_proto, o:
raise getmailOperationError('POP error (%s)' % o)
except socket.timeout:
@@ -201,6 +227,7 @@
self.log.trace()
try:
self.conn = imaplib.IMAP4(self.conf['server'], self.conf['port'])
+ self.setup_received(self.conn.sock)
except imaplib.IMAP4.error, o:
raise getmailOperationError('IMAP error (%s)' % o)
except socket.timeout:
@@ -241,6 +268,7 @@
)
self.conn = imaplib.IMAP4_SSL(self.conf['server'],
self.conf['port'])
+ self.setup_received(self.conn.sock)
except imaplib.IMAP4.error, o:
raise getmailOperationError('IMAP error (%s)' % o)
except socket.timeout:
@@ -328,6 +356,21 @@
self.gotmsglist = False
ConfigurableBase.__init__(self, **args)
+ def setup_received(self, sock):
+ serveraddr = sock.getpeername()
+ if len(serveraddr) == 2:
+ # IPv4
+ self.remoteaddr = '%s:%s' % serveraddr
+ elif len(serveraddr) == 4:
+ # IPv6
+ self.remoteaddr = '[%s]:%s' % serveraddr[:2]
+ else:
+ # Shouldn't happen
+ log.warn('unexpected peer address format %s', str(serveraddr))
+ self.remoteaddr = str(serveraddr)
+ self.received_from = '%s (%s)' % (self.conf['server'],
+ self.remoteaddr)
+
def __del__(self):
self.log.trace()
self.write_oldmailfile()
@@ -419,10 +462,7 @@
self.oldmail_filename = os.path.join(self.conf['getmaildir'],
oldmail_filename)
self._read_oldmailfile()
- self.received_from = '%s (%s)' % (
- self.conf['server'],
- socket.getaddrinfo(self.conf['server'], None)[0][4][0]
- )
+ self.received_from = None
self.__initialized = True
def delivered(self, msgid):
@@ -885,7 +925,14 @@
# (virus, spam, trojan), it can completely fail to return the
# message when requested.
try:
- msg = Message(fromstring=response[0][1])
+ try:
+ sbody = response[0][1]
+ except Exception, o:
+ sbody = None
+ if not sbody:
+ log.error('bad message from server!')
+ sbody = str(response)
+ msg = Message(fromstring=sbody)
except TypeError, o:
# response[0] is None instead of a message tuple
raise getmailRetrievalError('failed to retrieve msgid %s'
|
[-]
[+]
|
Changed |
getmail-4.20.2.tar.bz2/getmailcore/destinations.py
^
|
@@ -739,30 +739,6 @@
self.log.debug('command %s %d exited %d\n'
% (self.conf['command'], childpid, exitcode))
-
-
-
-
- if exitcode in self.exitcodes_drop:
- # Drop message
- self.log.debug('filter %s returned %d; dropping message\n'
- % (self, exitcode))
- return None
- elif (exitcode not in self.exitcodes_keep):
- raise getmailFilterError('filter %s returned %d (%s)\n'
- % (self, exitcode, err))
- elif err:
- if self.conf['ignore_stderr']:
- self.log.info('filter %s: %s\n' % (self, err))
- else:
- raise getmailFilterError(
- 'filter %s returned %d but wrote to stderr: %s\n'
- % (self, exitcode, err)
- )
-
-
-
-
if exitcode:
raise getmailDeliveryError(
'command %s %d error (%d, %s)'
|