tags 610685 patch thanks The problem here is mainly, that the whole message is barfed to stderr. If the message is a few megabytes in size, this can render the terminal unusable for several seconds, as it fights to stay afloat between I/O, X-requests, and other stuff.
In addition, there are privacy concerns.
I suggest the following patch, which limits the output of content in
debug messages to the first 256 characters. Maybe 128 or even 64
would suffice too:
--- /usr/share/pyshared/offlineimap/folder/IMAP.py 2011-02-13
13:46:14.000000000 +0100
+++ /tmp/IMAP.py 2011-05-03 12:21:55.485371778 +0200
@@ -331,14 +331,14 @@
self.ui.debug('imap', 'savemessage: using date ' + str(date))
content = re.sub("(?<!\r)\n", "\r\n", content)
- self.ui.debug('imap', 'savemessage: initial content is: ' +
repr(content))
+ self.ui.debug('imap', 'savemessage: initial content is: ' +
repr(content[:256]))
(headername, headervalue) = self.savemessage_getnewheader(content)
self.ui.debug('imap', 'savemessage: new headers are: %s: %s' % \
(headername, headervalue))
content = self.savemessage_addheader(content, headername,
headervalue)
- self.ui.debug('imap', 'savemessage: new content is: ' +
repr(content))
+ self.ui.debug('imap', 'savemessage: new content is: ' +
repr(content[:256]))
self.ui.debug('imap', 'savemessage: new content length is ' + \
str(len(content)))
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages offlineimap depends on:
ii python 2.6.6-14 interactive high-level object-orie
ii python-support 1.0.13 automated rebuilding support for P
offlineimap recommends no packages.
Versions of packages offlineimap suggests:
pn doc-base <none> (no description available)
pn python-kerberos <none> (no description available)
-- no debconf information
--
.''`. martin f. krafft <[email protected]> Related projects:
: :' : proud Debian developer http://debiansystem.info
`. `'` http://people.debian.org/~madduck http://vcs-pkg.org
`- Debian - when you have better things to do than fixing systems
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

