[PATCH] Re: Limit msg body length in debug output

Nicolas Sebrecht nicolas.s-dev at laposte.net
Sat May 7 12:56:29 BST 2011


On Thu, May 05, 2011 at 11:56:28PM +0200, Sebastian Spaeth wrote:
> On Thu, 5 May 2011 20:18:24 +0200, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:

> I agree that it would be nicer.
> But that would entail some content analysis of each and every email
> that we handle. I don't want to think about the performance impact of
> that. Just outputting the first 100 and last 100 bytes was a nice
> tradeoff that doesn't cost perf and let's us identify which mail is
> being transferred.
> 
> We currently still get the full body in the imaplib2 debug log, so that
> each message is now (fully) twice in our debug logs. I am not sure what
> the correct solution would be. Perhaps do the mail content analysis only
> in debug mode and output only the headers then...? Still, this patch
> would be an improvement until then. But it's your call, I won't be sad
> if this is not applied. :)

I inclined to merge this patch if it's still needed (thinking about the
very last imaplib2 improvements around log). Should I?

> > Why should we care of the last byte of the message?
> 
> To see if a message was fully transmitted or cut off somewhere.

Right, thanks.

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list