Mail corruption after 10.5 - 10.6 script migration: fix?

After moving 153,000 (!!) emails from our old 10.5 (cyrus) server to a new 10.6 (dovecot) server using the migratemaildata.pl script, I was surprised to find a huge number of error messages in the mailaccess logs to the effect of "Corrupted index cache file /var/spool/imap/dovecot/mail/\[GUID\]/dovecot.index.cache: Corrupted physical size for uid=\[xxx\]: 13975 != 13678". After some investigation I discovered:
- the message was a result of the "S=" flag containing a file size that did not match the actual file size;
- the reason that the actual file size was different was because garbage had been added to the end of the mail file. This garbage contained several lines beginning with various control characters (usually control-M) followed by text repeated from the last several lines of the original message.
- removing this garbage manually from the end of the message resulted in the file size being reduced to match the S= flag in the message filename.
Has anyone run into this? Any clues as to a solution? I don't relish writing a script to process 153,000 emails and examine each one to remove this garbage, but it may be my only solution.
Message was edited by: Robb Allan

Oh, the mailboxes made it, mail is started and running. That's why the error messages are filling the mailaccess.log file. Dovecot's documentation specifically says that it does not alter the "S=xxx" flag in a message's filename, so it's not healing the erroneous message size. More importantly, dovecot absolutely doesn't fix the garbage inserted at the end of each mail message during the migration. That looks like it may be from a bug in cvt_cyrusdb, but that's a binary so I can't tell.
I've ended up writing a quick and dirty shell script to strip the garbage out, which is not especially efficient but does the job. But I am uncomfortable about running it wholesale across my entire mail store. Yikes.
I've tried re-migrating individual mailboxes by account, and the garbage problem occurs each time, so that's not a fix. Here's an example (note the repetition of the last few lines, the first one preceded with a null (^@) and all of them ending with a CR (^M):
Here is a link that you should save for managing your account on-line:
https://www=2EPODS=2Ecom/orderapp/login=2Easpx=3Fcid=3D100160114
This e-mail has been automatically generated=2E Please do not reply to it=2E=
(message 5456165)
^@d=2E Please do not reply to it=2E=^M
(message 5456165)^M
^M
^M
^M
"

Similar Messages

  • Mail crashes after updating iPod touch 2g

    I just updated my iPod touch 2g. Now Mail crashes after starting it! It opens for just a few seconds and than closes itselves. But it shows me that i've got new messanges at the icon.
    Please Help me!!!
    Thanks

    Try doing a restore - then setup as a new iPod. You will not have the same layout, but all your content will be the same. All I can think of is that something got corrupt and the only way to fix that is a restore - setup as new iPod.
    Hope this helps.

  • Mail corruption and system problems. Need solution.

    The problems I am having:
    1) Mail will not open. It hangs, shows beach ball and stays that way. All you see is the menu-bar. Force quit will not work. Only hard reset. Activity Monitor shows the app sucking up 87-95% of processor.
    2) System preferences are not staying. Specifically my mouse preferences for scrolling, keyboard illumination, Safari address bar buttons. This gets worse if I have to do a hard reset if Mail gets launched. It can clean the whole system prefs. sometimes.
    Let me start from the beginning of the problem:
    I was on a website for a real estate company. It uses an active server application that never works right with a Mac. I almost always use Safari for it. What happens is that the sever app. usually hangs and won't go to the next page. I've tried all my browsers except Opera, so, I figure I would give that a go and see if it's better. BAD IDEA! Opera 8.6 hung. It wouldn't force quit. I had to do a hard reset like , 5 times, before it would restart. After that happened is when things got bad. My system prefs. were all gone. I had to reset all that. And then, Mail just went t1t5 up. It did what I said above. Hung. So I had to figure out how I was gonna get all my mail over into Thunderbird. I backed up the HD, and luckily, through Apple forums and Google, came up with the .emlx to .mbox converter. Tedious but worked. I deleted Opera off my HD as well as Mail. I am not even gonna bother with Mail again after having to deal with Apple's stupid file format and having no way to import a back-up. Thunderbird is way better and PGP actually works on it. Scr3w Opera as well.
    At this point, my biggest problem I have is that my system prefs don't always seem to stick. I need to find out which files are associated with this and fix it. I am also paranoid that something got backdoored on my system and is causing havoc. Although I doubt this happened, I would like to see if someone can look at my processes and see if anything looks abnormal. All these problems have happened with my standard account with no Admin privileges ( unless I type in the Authorization on a per instance event). My Admin account is not having problems and my other standard account is OK. So I am pretty sure it's a local problem and not associated with root.
    Anyone knowledgeable with some good ideas would be appreciated. I almost never have problems. I'm kinda p155ed this happened. Luckily I could still do a back-up and was not in a recording session or anything.
    You can download my Processes List in PDF at this address:
    http://badapplestudio.com/actmonscreen.pdf
    Sorry for the long description and listing it as a Mail problem( which it kinda is), but there are a lot of factors that lead up to this.
    Thanks,
    ~sKot
    1.67 G4 Pbook , 500 G4 Pbook,Dual 2.7 G5 Tower   Mac OS X (10.4.7)   Also Dell P4 for Gigasampler

    Verify/repair your disk first (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    If Disk Utility reports problems it cannot fix, even when starting up from a different disk, read the Disk Utility cannot repair the disk section of the following article for additional guidance and links to more powerful (third-party, not free) disk utilities:
    Resolving Disk, Permission, and Cache Corruption
    Post back with your observations.

  • Mail quits after upgrading from snow leopard to mountain lion

    During installing Mountain lion I ported across my settings, but not my applications; Post installation mail quits after about 3 seconds (my emails all seem to be there). Any ideas? I have alot of emails in different mailboxes, Id disable some of the mailboxes if I could just find where mail/moutain lion keeps them
    thanks in anticipation
    Looking at the edited report below, it seems that there is a bad argument / suffix thing going on
    Process:    
    Mail [2857]
    Path:       
    /Applications/Mail.app/Contents/MacOS/Mail
    Identifier: 
    com.apple.mail
    Version:    
    6.2 (1499)
    Build Info: 
    Mail-1499000000000000~1
    Code Type:  
    X86-64 (Native)
    Parent Process:  launchd [411]
    User ID:    
    501
    Date/Time:  
    2013-01-04 16:02:33.004 +0000
    OS Version: 
    Mac OS X 10.8.2 (12C60)
    Report Version:  10
    Interval Since Last Report:     
    2308 sec
    Crashes Since Last Report:      
    21
    Per-App Interval Since Last Report:  502 sec
    Per-App Crashes Since Last Report:   10
    Anonymous UUID:                 
    A1DD09C7-D315-C60E-0702-9AFEB576645E
    Crashed Thread:  6  Dispatch queue: com.apple.root.default-priority
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ABRecord setValue: '(
    "2011-03-15 10:25:40 +0000",
    "2012-03-16 10:33:43 +0000"
    )' forKey: 'MailLastDates'] invalid value'
    abort() called
    terminate called throwing an exception
    Application Specific Backtrace 1:
    0   CoreFoundation                 
    0x00007fff89ed40a6 __exceptionPreprocess + 198
    1   libobjc.A.dylib                
    0x00007fff8c5c93f0 objc_exception_throw + 43
    2   CoreFoundation                 
    0x00007fff89ed3e7c +[NSException raise:format:] + 204
    3   AddressBook                    
    0x00007fff8714bf88 -[ABRecord setValue:forKey:] + 116
    4   Message                        
    0x00007fff8ed3e9a3 __42-[MFRecentsManager _updateRecentsForKeys:]_block_invoke_0 + 1147
    5   Foundation                     
    0x00007fff86131a7c -[NSBlockOperation main] + 124
    6   Foundation                     
    0x00007fff86107986 -[__NSOperationInternal start] + 684
    7   Foundation                     
    0x00007fff8610f1a1 __block_global_6 + 129
    8   libdispatch.dylib              
    0x00007fff845b6f01 _dispatch_call_block_and_release + 15
    9   libdispatch.dylib              
    0x00007fff845b30b6 _dispatch_client_callout + 8
    10  libdispatch.dylib              
    0x00007fff845b41fa _dispatch_worker_thread2 + 304
    11  libsystem_c.dylib              
    0x00007fff835eccab _pthread_wqthread + 404
    12  libsystem_c.dylib              
    0x00007fff835d7171 start_wqthread + 13

    Sorry ive fixed it. After restarting the mac, mail put the mailboxes in users; library; as per usual. I disabled some of my older mailboxes by stuffing them temporarily into the bin, and  restarted mail, which worked fine, ill enable the restr of themailboxes one by one to see which one carries the bad bad argument. thanks for looking

  • TS3899 Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect

    Having trouble accessing my email account thru the mail app, after entering the account information in the settings page, hotmail returns with the error message " The user name or password for Hotmail is incorrect". Help

    Hotmail is having problems:
    http://bostinno.streetwise.co/2013/08/15/hotmail-outage-hotmail-is-down-for-user s-still-photos/
    http://www.engadget.com/2013/08/14/outlook-outage/
    http://www.infoworld.com/d/applications/microsofts-skydrive-outlookcom-are-down- some-users-224940
    http://mashable.com/2013/08/14/outlook-down/
    http://techcrunch.com/2013/08/14/microsoft-acknowledges-outlook-com-messenger-sk ydrive-outages/

  • Why does iTunes freeze up for minutes at a time when modifying INFO (CMD-i) ?  My files are not corrupted after it is done like many other threads i have readed.

    Why does iTunes freeze up for minutes at a time when modifying INFO (CMD-i) ?  My files are not corrupted after it is done like many other threads i have readed.  Sometimes it's changing the title of a movie or editing the season and episode number of a TV show ect.....

    Yup same here
    I am running the latest iTunes, the latest updates to the OS and on an iMac 3.4GHz Quad core i7 with 8GB of RAM and the music stored on local HDD.
    Still locks up iTunes for between 2 minutes up to 20 minutes.
    Really annoying.
    If you find a fix please, please let me know, I have just been throwing hardware at it with no joy at all

  • Hard drive is corrupt after i repair it

    My hard drive reads corrupt after I repair it.  I restart it, hit C, and open it with a startup disk, then repair and restart it.  After a while, when I verify my disk, it says that is corrupt, AGAIN!!
    Please help
    I'm running a mac pro dual core 2 2.66 intel xeon processor, with 16GB of memory  My operating system is  10.6,8

    So you should have already made a couple backups, always have a spare bootable system drive, and in some cases zero it all - takes couple hours, and not use it except as spare extra backup.
    Getting files off your drive now but don't use it,, install OS to a new drive (pull the old one in fact temporary) and you may want to use checksum on all file copies, and for any files not on backup sets try best you can and if you still need help, then turn to Data Rescue 3.
    I would not use a DVD to do repairs, even if it is 10.6.0 or 10.6.3. I would use a clean small system drive with 10.6.8 (takes less than 30GB, even down to 16GB if careful) "emergency boot drive" used only for system maintenance and repairs.
    And if you had Lion, you don't, but, I would use Recovery Mode AND have that also cloned to another drive, using Carbon Copy Cloner (CCC).

  • OS X partition becomes corrupt after switching from Bootcamp

    So I've had to reinstall os x 10.9.1 no less than three  times this week and multiple times before in the past after switching between os x and windows 8.1. This usually happens after I've been using windows for a prolonged period then switch back to os x but it happened today after reinstalling os x from a time machine backup just yesterday. I'll switch between the two and os x becomes corrupt and begins the loading bar sequence after selecting the os x partition via the refit boot manager. I tried repairing the partition using disk utility from the repair partition and an external installation of os x 10.9.1 but every time the disk becomes corrupt and needs to be wiped and reinstalled or install a time machine backup. I've lost count of how many times I've had to do this and to make things even worse both of my external disks have become corrupt after being disconnected for two days while I sort this mess out. Does anyone else have similar issues or can locate an issue somewhere?

    Yeah I reinstalled osx 10.9.1 and installed all my apps, put everything back then used bootcamp to create a partition for windows then used wineclone to install my windows 8.1 backup. I jumped from windows > osx > windows > osx inside an hour to move around a few things and I forgot verify bootcamp after I installed the backup and that last time I booted to osx it was corrupted. I used disk utility from my external installation and the recovery partition and both times they need repaired which only came up with the backup and wipe notification window. There have been two occasions where I was able to fix the osx partition from my external osx installation and continue using osx quite perfectly but usually the partition becomes un-mountable after it fails to repair. Usually when this has happened the twenty something times before it's after a prolonged period of a few weeks using windows.
    I'm using refit boot manager and paragon NTFS 11 which may be the only software I've installed that could be corrupting the boot.
    SMART status is verified

  • I have change e-mail address after first registration and when I logged in it send new password to my old e-mail address. now I can't use my old profile

    I have change e-mail address after first registration and when I logged in it send new password to my old e-mail address. now I can't use my old profile.
    and I can't install my old adobe X anymore
    what to do?
    Mika

    Change Account https://forums.adobe.com/thread/1465499 may help
    -wrong email https://forums.adobe.com/thread/1446019

  • Mail crashes after Update to 10.10.3

    Hello all,
    I am using a MacBook Pro 15" from Mid 2010 with a Prozessor 2,66 GHz.
    I have just installed the Update 10.10.3
    Now I am unable to start my Mail Programm. It starts up Mail and after a short view of Mail it crashes and shows me the ErrorMessage.
    Has anyone a idea how to fix this.
    Thank you
    René

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if Safari crashed, you would enter "Safari" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.
    When you post the log extract or the crash report, you might see an error message on the web page: "You have included content in your post that is not permitted," or "The message contains invalid characters." That's a bug in the forum software. Please post the text on Pastebin, then post a link here to the page you created.

  • Junk mail returns after deleting the item in the "Junk mailbox" and "Trash".  Is there a way to permanently block the sender?

    Junk mail returns after deleting the item in the "Junk mailbox" and "Trash".  Is there a way to permanently block the sender?
    I have deleted the item multiple times both on my Mac mini and my touch and 5 minutes later it is back in my Junk mailbox.  The item will not return to the Junk mailbox until it is deleted from the trash.

    You can create a Rule
    http://email.about.com/od/macosxmailtips/qt/How_to_Block_a_Sender_in_Mac_OS_X_Ma il.htm

  • JPG files become corrupt after Exporting in LR 3

    Does anyone have any idea what would cause
    my JPG files to be corrupt after I export my edited Raw images in LR3?  There are no problems with the Raw file, but once I edit them, apply what ever settings to them in LR I need, I export them as JPG to the same hard drive but in a sub folder where the raw files are, they will not open in photoshop or anywhere else. They are corrupt or lacking data????   When I upload them to my proofing website, there are colored streaks all through the image.  Now, I noticed that when I go into that folder of RAW images, and delete the .xmp files, I have to start over, but it fixes the problem.  So, now, I can't use .xmp sidecar files to save my editing. I'm fairly new to LR, so any suggestions would be great. I did recently upgrade my system to OS windows 7.  Everythign was fine till I had to reinstall everything on my computer...and I also changed hard drives. I upgraded to a Terabyte drive moving all my images from a 500G to the terabyte.  Could that cause my sidecar files to be corrupted?????
    Thank you!!!!!

    I doubt that the XMP files have anything to do with this, as Lightroom doesn't use these files when it creates an exported file.
    It sounds like your hardware may be the culprit; these types of corrupt files are often caused by a failing hard drive. Some corruption may have happened in the transfer from one hard drive to another; or the new hard drive has some sort of problem.
    Can you hook up the old hard drive again and see what happens to the photos there? Open one of them and compare it to the photo on the new hard drive.

  • Mini calendar in mail missing after Lion installation

    mini calendar in mail missing after Lion installation

    >After installing Lion (intel I-Mac 2g ram). My Microsoft Office 2004 no longer runs.
    Upgrade to a Universal compatible version of Office or equivalent.  http://www.neooffice.org/ is the least expensive alternative, though importing Entourage into iCal, Mac OS X Mail, and Addressbook works best if the data was exported from Entourage while still in Snow Leopard.
    >Also, when I select "printer friendly" pages in Safari or Firefox, I get a "missing plugin" message.
    When you upgraded, did you make sure that Safari was installed in the Applications folder?  If not, you may have to redownload Safari from http://www.apple.com/safari/ as it happens to be the same version.  Firefox double check is already Lion compatible.  For more on upgrading to Lion, see my FAQ*:
    http://www.macmaps.com/upgradefaq.html#LION

  • E4500 firmware corrupt after power outage

    Latest firmware with CCC corrupted after power outage. I reseet the e4500 several times and tried to reload the firmware and still no good. Only way I got it back up is to install the older non-CCC version 2.37. Strange all was fine until the power outage. Not sure if I should even bother to upgrade to 2.38 again.

    Yes, power outages may caused some damage either on the hardware or software of the any device especially if there's some activity going on inside the device the time of the interruption. If everything is fine with the old version then there's really no need to update it but if you've noticed some issues, better upgrade to the newer version so to fix any problems.

  • The password file is getting corrupted after rebooting the standby database

    Hi,
    The password file is getting corrupted after rebooting the standby database.
    Since the databases are not in sync, I had to copy the pwfile from primary to standby to make 'em sync.
    (BUT.... the pwfile is not getting corrupted every time I reboot the standby by)
    Could somebody please explain the reason for the pwfile on the standby database getting corrupted while rebooting ?
    Env: Oracle 11g on Windows 7
    Thanks in advance

    Moderator Action:
    This thread was originally posted to the Oracle/Sun Servers HARDWARE forum.
    This is definitely not an issue related to any hardware components.
    ... it's now moved to Database General Questions, hopefully for closer topic alignment.

Maybe you are looking for

  • AGEING REPORT.- F.I

    Dear All,                            My FI user wants a Tcode for display of AGEING REPORT . i.e in which a list of those vendors are displayed for which Payment is stopped due to some reasons. KM

  • Cannot detect new firmware on my 5800 XpressMusic

    I've bought my phone directly from a Nokia store in the US 2 years ago and I am currently using it in Bulgaria. Both OTA and PC Suite tell me there is no new firmware for my phone although my firmware is v 51.2.007 which is waaaaaay older than the la

  • Preview SWF which contains a Run Time Shared Library

    All of our assets share fonts using a run time shared library (RSL) so that we dont need to embedd the fonts in each and every seperate swf.  The swf looks for a sharedFonts.swf file one level/directory up from where it is currently at.  Inside the a

  • İ can't buy clash of clans gem from iTunes store why

    İ cant buy clash of cleans gems why maybe 7 time chat and 2 time i called them they cant solve my problem. my credi card also dont have any problem so help me what should i do

  • I cannot load newer version for my iPhone 3GS.

    Hey, I cannot load the newer versions for my iPhone 3GS for some time now. Somehow it says there is a problem with the i-net connection, but that can't be it. Please help me someone! Thank you!