imap2maildir
imap2maildir copied to clipboard
Handling \\ in the subject line
First off THANK YOU for putting this together. I'm extraordinarily happy with the results.
I did want to fire off a quick note that emails with a subject line containing "" are failing, presumably because it isn't handled during parsing.
I made a quick change to simpleimap.py in order to find the offending messages and simply changed their tag to get them out of the folder I was syncing.
On line 75: raise ValueError('Unexpected parenthesis at pos %(pos)d text %(text)s' % {'pos':pos, 'text': text})
The addition of the text variable shows enough information about the message to find it and move it or delete it for now. I only had two of these messages so I didn't get into the code deep enough to come up with a resolution to the problem.
Good call! This is in commit 5a8b6b5acffe95f26928211a63f5bf1ae8739349.
Another user (in issue #10 I believe) suggested a change to quoted_re to improve a similar sort of thing. I couldn't reproduce the problem, but I have included the suggested quoted_re in commit f0634936ab81be1d87f1fc8063c5977c0efbaa65 ... that's probably worth a spin too.
Thanks! -rt