[-]
[+]
|
Changed |
getmail.spec
|
|
|
Deleted |
getmail-4.11.0.tar.gz
^
|
|
Deleted |
getmail-4.12.0.tar.gz
^
|
|
Deleted |
getmail-4.14.0.tar.gz
^
|
|
Deleted |
getmail-4.16.0.tar.gz
^
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/PKG-INFO
^
|
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: getmail
-Version: 4.10.0
+Version: 4.18.0
Summary: a mail retrieval, sorting, and delivering system
Home-page: http://pyropus.ca/software/getmail/
Author: Charles Cazabon
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/CHANGELOG
^
|
@@ -1,3 +1,57 @@
+Version 4.18.0
+26 June 2010
+ -update broken link in FAQ. Thanks: Stefan Kangas.
+ -strip a few extra problematic (on non-Unix systems) characters when
+ generating oldmail filenames; backslash was requested by Andy Ross.
+ If upgrading and your current oldmail file contains any of these
+ characters:
+ \ ; < > |
+ ... then rename it, replacing runs of one or more of those characters with
+ a single "-".
+ -improve clarity of message logged by getmail when an external program exits
+ 0 but getmail considers it failed because it wrote to stderr. Thanks:
+ Chris Dennis.
+
+Version 4.17.0
+30 April 2010
+ -change to how getmail counts messages in an IMAP mailbox; prevents problems
+ where getmail would only see the first 500 messages in a mailbox with some
+ IMAP servers that return oddball responses to SELECT. Thanks: David Damerell.
+
+Version 4.16.0
+5 January 2010
+ -additional fix for IMAP server that offers a message it then fails to return,
+ to allow getmail to continue with the next message. Thanks: Yaw Anokwa.
+
+Version 4.15.0
+2 December 2009
+ -default port for MultidropIMAPSSLRetriever was incorrect. Thanks: David
+ Lehn.
+
+Version 4.14.0
+23 November 2009
+ -handle additional cases where IMAP (and for good measure, POP3) server is
+ broken and offers a message that it then fails to return. Thanks: Eric
+ Waguespack.
+
+Version 4.13.0
+13 October 2009
+ -fix new log message not having trailing newline.Thanks: Morty Abzug.
+
+Version 4.12.0
+7 October 2009
+ -handle MSExchange failure to deliver message gracefully. Thanks: Morty
+ Abzug.
+ -documentation updates regarding Python IMAP memory bug. Thanks: "spig".
+ -fix bad tag in documentation.
+
+Version 4.11.0
+8 August 2009
+ -fix --dump not generating any output for rcfiles containing "verbose = 0"
+ option. Thanks: Morty Abzug.
+ -fix copy-and-paste error in documentation of MultiSorter destination.
+ Thanks: Roland Hill.
+
Version 4.10.0
6 August 2009
-add "message_log_verbose" option, defaulting to false. If true, the
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/configuration.html
^
|
@@ -1719,11 +1719,11 @@
type = MultiSorter
default = doesn't matter, this won't be used, as locals will always match
locals = (
- ('^jeff@'), '[jeff]'),
- ('^bob@'), '[bob]'),
- ('^alice@'), '[alice]'),
- ('.'), '[copies]'),
- ('.'), '[info]')
+ ('^jeff@', '[jeff]'),
+ ('^bob@', '[bob]'),
+ ('^alice@', '[alice]'),
+ ('.', '[copies]'),
+ ('.', '[info]')
)
[alice]
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/configuration.txt
^
|
@@ -882,11 +882,11 @@
type = MultiSorter
default = doesn't matter, this won't be used, as locals will always match
locals = (
- ('^jeff@'), '[jeff]'),
- ('^bob@'), '[bob]'),
- ('^alice@'), '[alice]'),
- ('.'), '[copies]'),
- ('.'), '[info]')
+ ('^jeff@', '[jeff]'),
+ ('^bob@', '[bob]'),
+ ('^alice@', '[alice]'),
+ ('.', '[copies]'),
+ ('.', '[info]')
)
[alice]
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/faq.html
^
|
@@ -178,6 +178,7 @@
<li><a href="faq.html#faq-notabug-fsync">AttributeError: 'module' object has no attribute 'fsync'</a></li>
<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>
</ul>
</li>
</ul>
@@ -651,7 +652,9 @@
http://docs.freebsd.org/cgi/mid.cgi?200102172349.QAA11724
</a>
and
- <a href="http://esr.1accesshost.com/">http://esr.1accesshost.com/</a>.
+ <a href="http://web.archive.org/web/20080621090439/http://esr.1accesshost.com/">http://esr.1accesshost.com/</a> (note:
+ went offline sometime in 2009 or 2010; the content is still available at
+ http://web.archive.org/web/20080621090439/http://esr.1accesshost.com/ ).
</p>
<p>
getmail users have not had to worry about any of these security holes or
@@ -1660,7 +1663,7 @@
<h3 id="faq-notabug-osx-realloc">MemoryError on OS X</h3>
<p>
- If you see errors like this while running getmail on Macintosh OS XT:
+ If you see errors like this while running getmail on Macintosh OS X:
</p>
<pre class="example">
python2.5(27172) malloc: *** vm_allocate(size=15699968) failed (error code=3)
@@ -1676,6 +1679,28 @@
and there's nothing getmail can do about it.
</p>
+<h3 id="faq-notabug-memory">MemoryError when using IMAP</h3>
+<p>
+ If you see errors like this while running getmail configured to retrieve
+ mail via IMAP or IMAP-over-SSL:
+</p>
+<pre class="example">
+Python(24006) malloc: *** mmap(size=9875456) failed (error code=12)
+[...]
+</pre>
+<p>
+ ... which then end with <span class="sample">MemoryError</span>,
+ you've run into
+ <a href="http://bugs.python.org/issue1389051">a bug in Python's IMAP library</a>.
+ It's fixed in the most recent versions of Python 2.5 and 2.6. This bug can
+ cause getmail to grow to a huge size, vastly out of proportion to the size
+ of the message it's retrieving, at which point Python may fail or be killed
+ when the system runs out of memory.
+</p>
+<p>
+ 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.
+</p>
<!--#include virtual="/include/footer-xhtml11.html"-->
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/faq.txt
^
|
@@ -319,7 +319,9 @@
But don't just take my word for it; see
http://docs.freebsd.org/cgi/mid.cgi?200102172349.QAA11724 and
- http://esr.1accesshost.com/.
+ http://esr.1accesshost.com/ (note: went offline sometime in 2009 or 2010;
+ the content is still available at
+ http://web.archive.org/web/20080621090439/http://esr.1accesshost.com/ ).
getmail users have not had to worry about any of these security holes or
design and implementation errors.
@@ -1013,7 +1015,7 @@
MemoryError on OS X
- If you see errors like this while running getmail on Macintosh OS XT:
+ If you see errors like this while running getmail on Macintosh OS X:
python2.5(27172) malloc: *** vm_allocate(size=15699968) failed (error code=3)
python2.5(27172) malloc: *** error: can't allocate region
@@ -1023,3 +1025,20 @@
... which then end with MemoryError, please report the problem to Apple.
The OS X implementation of realloc() is broken, and there's nothing
getmail can do about it.
+
+ MemoryError when using IMAP
+
+ If you see errors like this while running getmail configured to retrieve
+ mail via IMAP or IMAP-over-SSL:
+
+ Python(24006) malloc: *** mmap(size=9875456) failed (error code=12)
+ [...]
+
+ ... which then end with MemoryError, you've run into a bug in Python's
+ IMAP library. It's fixed in the most recent versions of Python 2.5 and
+ 2.6. This bug can cause getmail to grow to a huge size, vastly out of
+ proportion to the size of the message it's retrieving, at which point
+ Python may fail or be killed when the system runs out of memory.
+
+ 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.
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/troubleshooting.html
^
|
@@ -95,6 +95,12 @@
<li><a href="troubleshooting.html#errmsg-config-missing-section">Configuration error: destination specifies section name <span class="meta">section</span> which does not exist</a></li>
</ul>
</li>
+ <li><a href="troubleshooting.html#errmsg-retrieval">Retrieval error …</a></li>
+ <li>
+ <ul>
+ <li><a href="troubleshooting.html#errmsg-retrieval-missing">Retrieval error: server … is broken; …</a></li>
+ </ul>
+ </li>
<li><a href="troubleshooting.html#errmsg-delivery">Delivery error …</a></li>
<li>
<ul>
@@ -108,6 +114,7 @@
<ul>
<li><a href="troubleshooting.html#errmsg-operation-notunique">Error: <span class="meta">server-info</span> does not uniquely identify messages …</a></li>
<li><a href="troubleshooting.html#errmsg-operation-uidlbroken">Error: <span class="meta">server-info</span> failed to identify message <span class="meta">X</span> in UIDL output …</a></li>
+ <li><a href="troubleshooting.html#errmsg-imapbug-memory">Python(…) malloc: *** mmap(…) failed (…)</a></li>
</ul>
</li>
</ul>
@@ -283,6 +290,25 @@
</p>
<!-- ********************************************************************** -->
+<h3 id="errmsg-retrieval" class="errmsg">Retrieval error …</h3>
+<p>
+ getmail detected an error while trying to retrieve a message.
+ Some of the specific errors it may find include the following.
+</p>
+<h4 id="errmsg-retrieval-missing" class="errmsg">Retrieval error: server … is broken; …</h4>
+<p>
+ The server claimed to have a particular message, but when getmail tried to
+ retrieve it, the server returned an empty response in violation of the
+ POP or IMAP protocol. getmail will skip on to the next message.
+</p>
+<p>
+ This problem is almost always with an MSExchange server, and is due
+ to bugs in MSExchange. Delete the offending message from the mailbox
+ via the webmail interface if you don't want to see this error message,
+ and report the bug to the server administrator or Microsoft.
+</p>
+
+<!-- ********************************************************************** -->
<h3 id="errmsg-delivery" class="errmsg">Delivery error …</h3>
<p>
getmail detected an error after retrieving a message but before delivery was
@@ -346,6 +372,7 @@
by deleting the problematic message(s) from the mailstore by other means
(such as a webmail interface provided by your POP3 mailhost).
</p>
+<p>
Otherwise, you'll need to either ask the postmaster of the POP3 mail host
to fix the POP3 software they're using. In the meantime, you can use the
<span class="file">BrokenUIDLPOP3Retriever</span> class with this server
@@ -353,6 +380,25 @@
messages properly.
</p>
+<h4 id="errmsg-imapbug-memory" class="errmsg">Python(…) malloc: *** mmap(…) failed (…)</h4>
+<p>
+ … followed by an <span class="file">Unhandled exception</span> block
+ and then <span class="file">MemoryError</span>.
+</p>
+<p>
+ getmail ran out of memory, usually due to
+ <a href="http://bugs.python.org/issue1389051">a bug in Python's IMAP library</a>
+ which was fixed in early 2008.
+</p>
+<p>
+ If you are using IMAP and run into this problem retrieving messages that
+ aren't hundreds of megabytes in size, you can almost certainly fix it by
+ upgrading your Python installation to the latest 2.5.x or 2.6.x release.
+ Note that if you switch from Python 2.5.x to Python 2.6.x, you'll need to
+ re-install getmail with <span class="file">python setup.py install</span>
+ from the getmail source directory.
+</p>
+
<!-- ********************************************************************** -->
<h2 id="warning-messages">Warning messages</h2>
<p>
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/docs/troubleshooting.txt
^
|
@@ -110,6 +110,22 @@
A destination in the getmail rc file refers to another rc file section
named section, but that section was not found in the file.
+ Retrieval error ...
+
+ getmail detected an error while trying to retrieve a message. Some of the
+ specific errors it may find include the following.
+
+ Retrieval error: server ... is broken; ...
+
+ The server claimed to have a particular message, but when getmail tried to
+ retrieve it, the server returned an empty response in violation of the POP
+ or IMAP protocol. getmail will skip on to the next message.
+
+ This problem is almost always with an MSExchange server, and is due to
+ bugs in MSExchange. Delete the offending message from the mailbox via the
+ webmail interface if you don't want to see this error message, and report
+ the bug to the server administrator or Microsoft.
+
Delivery error ...
getmail detected an error after retrieving a message but before delivery
@@ -170,6 +186,20 @@
BrokenUIDLPOP3Retriever class with this server instead, but functionality
is limited because of the inability to identify messages properly.
+ Python(...) malloc: *** mmap(...) failed (...)
+
+ ... followed by an Unhandled exception block and then MemoryError.
+
+ getmail ran out of memory, usually due to a bug in Python's IMAP library
+ which was fixed in early 2008.
+
+ If you are using IMAP and run into this problem retrieving messages that
+ aren't hundreds of megabytes in size, you can almost certainly fix it by
+ upgrading your Python installation to the latest 2.5.x or 2.6.x release.
+ Note that if you switch from Python 2.5.x to Python 2.6.x, you'll need to
+ re-install getmail with python setup.py install from the getmail source
+ directory.
+
Warning messages
getmail may output various diagnostic warning messages. The common ones
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmail
^
|
@@ -127,7 +127,17 @@
reason = 'would surpass max_bytes_per_session'
try:
if retrieve:
- msg = retriever.getmsg(msgid)
+ try:
+ msg = retriever.getmsg(msgid)
+ except getmailRetrievalError, o:
+ log.error(
+ 'Retrieval error: server for %s is broken; '
+ 'offered message %s but failed to provide it. '
+ 'Please notify the administrator of the '
+ 'server. Skipping message...\n'
+ % (retriever, msgid)
+ )
+ continue
msgs_retrieved += 1
bytes_retrieved += size
if oplevel > 1:
@@ -646,6 +656,10 @@
destination, config.copy()))
if options.dump_config:
+ # Override any "verbose = 0" in the config file
+ log.clearhandlers()
+ log.addhandler(sys.stdout, logging.INFO, maxlevel=logging.INFO)
+ log.addhandler(sys.stderr, logging.WARNING)
blurb()
for (filename, retriever, _filters, destination, config) in configs:
log.info('getmail configuration:\n')
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmail.spec
^
|
@@ -2,7 +2,7 @@
Summary: POP3 mail retriever with reliable Maildir delivery
Name: getmail
-Version: 4.10.0
+Version: 4.18.0
Release: 1
License: GPL
Group: Applications/Internet
@@ -52,6 +52,36 @@
%{python_sitelib}/getmailcore/
%changelog
+* Sat Jun 26 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.18.0
+
+* Sat Jun 26 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.18.0
+
+* Fri Apr 30 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.17.0
+
+* Tue Jan 05 2010 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.16.0
+
+* Wed Dec 02 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.15.0
+
+* Mon Nov 23 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.14.0
+
+* Tue Oct 13 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.13.0
+
+* Tue Oct 13 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.12.0
+
+* Wed Oct 07 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.12.0
+
+* Sat Aug 08 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
+-update to version 4.11.0
+
* Thu Aug 06 2009 Charles Cazabon <charlesc-getmail-rpm@pyropus.ca>
-update to version 4.10.0
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/__init__.py
^
|
@@ -16,7 +16,7 @@
raise ImportError('getmail version 4 requires Python version 2.3.3'
' or later')
-__version__ = '4.10.0'
+__version__ = '4.18.0'
__all__ = [
'baseclasses',
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/_retrieverbases.py
^
|
@@ -360,7 +360,7 @@
self.oldmail[msgid] = int(timestamp)
except ValueError:
# malformed
- self.log.info('skipped malformed line "%r" for %s'
+ self.log.info('skipped malformed line "%r" for %s'
% (line, self)
+ os.linesep)
self.log.moreinfo('read %i uids for %s' % (len(self.oldmail), self)
@@ -410,11 +410,14 @@
else:
# Explicitly set to None in case it was previously set
socket.setdefaulttimeout(None)
- self.oldmail_filename = os.path.join(
- self.conf['getmaildir'],
- ('oldmail-%(server)s-%(port)i-%(username)s'
- % self.conf).replace('/', '-').replace(':', '-')
+ # strip problematic characters from oldmail filename. Mostly for
+ # non-Unix systems; only / is illegal in a Unix path component
+ oldmail_filename = re.sub(
+ r'[/\:;<>|]+', '-',
+ 'oldmail-%(server)s-%(port)i-%(username)s' % self.conf
)
+ self.oldmail_filename = os.path.join(self.conf['getmaildir'],
+ oldmail_filename)
self._read_oldmailfile()
self.received_from = '%s (%s)' % (
self.conf['server'],
@@ -535,7 +538,10 @@
msg = Message(fromlines=lines)
return msg
except poplib.error_proto, o:
- raise getmailOperationError('POP error (%s)' % o)
+ raise getmailRetrievalError(
+ 'failed to retrieve msgid %s; server said %s'
+ % (msgid, o)
+ )
def _getheaderbyid(self, msgid):
self.log.trace()
@@ -782,7 +788,7 @@
self.log.debug('selecting mailbox "%s"' % mailbox + os.linesep)
try:
response = self._parse_imapcmdresponse('SELECT', mailbox)
- count = int(response[0])
+ count = int(response[-1]) # use *last* EXISTS returned
uidvalidity = self.conn.response('UIDVALIDITY')[1][0]
except imaplib.IMAP4.error, o:
raise getmailOperationError('IMAP error (%s)' % o)
@@ -855,7 +861,15 @@
# Retrieve message
self.log.debug('retrieving body for message "%s"' % uid
+ os.linesep)
- response = self._parse_imapuidcmdresponse('FETCH', uid, part)
+ try:
+ response = self._parse_imapuidcmdresponse('FETCH', uid, part)
+ except (imaplib.IMAP4.error, getmailOperationError), o:
+ # server gave a negative/NO response, most likely. Bad server,
+ # no doughnut.
+ raise getmailRetrievalError(
+ 'failed to retrieve msgid %s; server said %s'
+ % (msgid, o)
+ )
# Response is really ugly:
#
# [
@@ -866,7 +880,16 @@
# ')',
# <maybe more>
# ]
- msg = Message(fromstring=response[0][1])
+
+ # MSExchange is broken -- if a message is badly formatted enough
+ # (virus, spam, trojan), it can completely fail to return the
+ # message when requested.
+ try:
+ msg = Message(fromstring=response[0][1])
+ except TypeError, o:
+ # response[0] is None instead of a message tuple
+ raise getmailRetrievalError('failed to retrieve msgid %s'
+ % msgid)
return msg
except imaplib.IMAP4.error, o:
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/destinations.py
^
|
@@ -739,12 +739,42 @@
self.log.debug('command %s %d exited %d\n'
% (self.conf['command'], childpid, exitcode))
- if exitcode or (err and not self.conf['ignore_stderr']):
+
+
+
+
+ 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)'
% (self.conf['command'], childpid, exitcode, err)
)
elif err:
+ if not self.conf['ignore_stderr']:
+ raise getmailDeliveryError(
+ 'command %s %d wrote to stderr: %s'
+ % (self.conf['command'], childpid, err)
+ )
+ #else:
# User said to ignore stderr, just log it.
self.log.info('command %s: %s' % (self, err))
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/exceptions.py
^
|
@@ -5,8 +5,9 @@
__all__ = [
'getmailError',
'getmailConfigurationError',
- 'getmailFilterError',
'getmailOperationError',
+ 'getmailFilterError',
+ 'getmailRetrievalError',
'getmailDeliveryError',
]
@@ -24,6 +25,11 @@
'''Exception raised when a runtime error is detected.'''
pass
+class getmailRetrievalError(getmailOperationError):
+ '''Exception raised when a server (cough MSExchange cough) fails to
+ hand over a message it claims to have.'''
+ pass
+
class getmailFilterError(getmailOperationError):
'''Exception raised when problems occur during message filtering.
Subclass of getmailOperationError.
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/filters.py
^
|
@@ -87,8 +87,10 @@
if self.conf['ignore_stderr']:
self.log.info('filter %s: %s\n' % (self, err))
else:
- raise getmailFilterError('filter %s returned %d (%s)\n'
- % (self, exitcode, err))
+ raise getmailFilterError(
+ 'filter %s returned %d but wrote to stderr: %s\n'
+ % (self, exitcode, err)
+ )
# Check the filter was sane
if len(newmsg.headers()) < len(msg.headers()):
|
[-]
[+]
|
Changed |
getmail-4.18.0.tar.gz/getmailcore/retrievers.py
^
|
@@ -471,7 +471,7 @@
# socket.ssl() and socket timeouts are incompatible in Python 2.3
#ConfInt(name='timeout', required=False, default=180),
ConfString(name='server'),
- ConfInt(name='port', required=False, default=110),
+ ConfInt(name='port', required=False, default=imaplib.IMAP4_SSL_PORT),
ConfString(name='username'),
ConfPassword(name='password', required=False, default=None),
ConfTupleOfStrings(name='mailboxes', required=False,
|
|
Deleted |
getmail-4.7.6.tar.gz
^
|
|
Deleted |
getmail-4.9.2.tar.gz
^
|