moving mail from uw to cyrus, damaged headers?

Michael Menge Michael.Menge at zdv.uni-tuebingen.de
Mon Nov 14 02:23:06 EST 2005


Bill Kearney wrote:
>>try imapsync
> 
> Tried it, no go, same problem:
> 
> Couldn't append msg #6 (Subject:[Re: How to specify?]) to folder tt: Error
> trying to append: 111 NO Message contains invalid header
> 
> (Basically it's telling me cyrus won't take the bogus message I put in the
> 'tt' folder)
> 
> Likewise various other IMAP syncing tools upchuck on it.  Cyrus just refuses
> (as it seems it should) to take the bogus header.
> 
> So I suppose what I'm after is a 'mailbox cleaner-upper' for those corrupted
> messages.
> 
> I've taken a stab at what's causing the trouble and it's lines with the hex
> chars \x13\x42 on them.  At least that /seems/ to be the most commonly
> present combination of characters on the corrupted header line.  It's
> basically some gibberish put on a line near the very start of a message
> (usually on a line somewhere between the 2nd and 8th in the header of the
> message).
> 
> A bit of grep-fu digs them out:
> 
> cd ~/mail
> grep -P '\x13\x42' -l -R *
> 
> Fortunately it's only about 30 mailboxes (of some 300 or so) that are
> affected and they're (thanfully) all in mbox text files.  If I can truly
> narrow down what characters are causing the trouble then the various tools
> should be able to function properly
> 
> But is there a way to tell cyrus to do the dirty work of cleaning up the
> headers as a message is copied into it?
> 
> -Bill Kearney
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

The --regexmess option from imapsync may help. See the example from 
imapsync --help for more details

-- 
--------------------------------------------------------------------------------
M.Menge                                 Tel.: (49) 7071/29-70316
Universitaet Tuebingen                  Fax.: (49) 7071/29-5912
Zentrum fuer Datenverarbeitung          mail: menge at zdv.uni-tuebingen.de
Waechterstrasse 76
72074 Tuebingen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5287 bytes
Desc: S/MIME Cryptographic Signature
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051114/44d3b537/smime.bin


More information about the Info-cyrus mailing list