Community Discussions and Support
Corrupt IMAP folders

Ok think i am getting the hang of this. Thanks for your help Olaf

Ok think i am getting the hang of this. Thanks for your help Olaf

Help, in the past when i have had a corrupt IMAP folder I have been able to restore from a backup, but on this occasion i can't. What happens is the folder says it doesn't exist and any folders inside end up in the root. Can someone explain in detail what i need to do to fix this problem. I.E if i have a folder '2014' and a folder inside 2014 called 'January' if that folder ends up in the root what do i need to do to fix it other than to recreate the folder structure via outlook/squirrellmail.

Thanks

<p>Help, in the past when i have had a corrupt IMAP folder I have been able to restore from a backup, but on this occasion i can't. What happens is the folder says it doesn't exist and any folders inside end up in the root. Can someone explain in detail what i need to do to fix this problem. I.E if i have a folder '2014' and a folder inside 2014 called 'January' if that folder ends up in the root what do i need to do to fix it other than to recreate the folder structure via outlook/squirrellmail.</p><p>Thanks</p>

If you are using IMAP with Mercury, there will be a HIERARCH.PM in the mailbox directory (same as in Pegasus with direct löoacal access) holding the hierarchie of your folders. If it is corrupted, the folders are still there, but will be shown parallel to INBOX. So we have to find out, why the hierarchie file becomes corrupted.

First of all - you don't write which mailclient is involved. Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP.

Is there any antivirus on the server scanning the mailbox directories or even involved in IMAP?

To restore the hierarchie, on closed mailclient (no IMAP-Connection to that mailbox) you simply need to restore the HIERARCH.PM in the mailbox directory on the server.

bye    Olaf

 

<p>If you are using IMAP with Mercury, there will be a HIERARCH.PM in the mailbox directory (same as in Pegasus with direct löoacal access) holding the hierarchie of your folders. If it is corrupted, the folders are still there, but will be shown parallel to INBOX. So we have to find out, why the hierarchie file becomes corrupted.</p><p>First of all - you don't write which mailclient is involved. Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP.</p><p>Is there any antivirus on the server scanning the mailbox directories or even involved in IMAP?</p><p>To restore the hierarchie, on closed mailclient (no IMAP-Connection to that mailbox) you simply need to restore the HIERARCH.PM in the mailbox directory on the server. </p><p>bye    Olaf</p><p> </p>

HI Olaf

Thanks for your help. I am using a combination of Outlook, Squirrelmail (to create the folders) and Apple Iphone, it seems that if Mercury restarts after a crash it sometimes corrupts the mailbox also if you create a folder in Squirrelmail with outlook open then close outlook this as the same effect. Not sure what you mean by 'Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP' , is this only for clients that don't support folders?.

There is no antivirus running on the server as this causes IMAP to run very slowly as the mailbox get larger.

I have deleted / restored the HIERARCH.PM file but shortly after restarting Mercury its back to normal and i end up with  Name_Unavailable on some lines (See below) and the folders back under root. Just a thought if the iphone still as the mailbox open, on restarting Mercury would that write the old HIERARCH.PM back? or does it work differently.

0,0,"657BF27F:5BB6:FOL2272C","1CB3930:My Mailbox","3rafts"
0,0,"67B0E134:0FC4:FOL032BD","1CB3930:My Mailbox",Name_Unavailable
0,0,"3BF01B38:7392:FOL034E7","1CB3930:My Mailbox","Sent Messages"

thanks again for the help.


<p>HI Olaf</p><p>Thanks for your help. I am using a combination of Outlook, Squirrelmail (to create the folders) and Apple Iphone, it seems that if Mercury restarts after a crash it sometimes corrupts the mailbox also if you create a folder in Squirrelmail with outlook open then close outlook this as the same effect. Not sure what you mean by 'Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP' , is this only for clients that don't support folders?.</p><p>There is no antivirus running on the server as this causes IMAP to run very slowly as the mailbox get larger.</p><p>I have deleted / restored the HIERARCH.PM file but shortly after restarting Mercury its back to normal and i end up with  Name_Unavailable on some lines (See below) and the folders back under root. Just a thought if the iphone still as the mailbox open, on restarting Mercury would that write the old HIERARCH.PM back? or does it work differently.</p><p>0,0,"657BF27F:5BB6:FOL2272C","1CB3930:My Mailbox","3rafts" 0,0,"67B0E134:0FC4:FOL032BD","1CB3930:My Mailbox",Name_Unavailable 0,0,"3BF01B38:7392:FOL034E7","1CB3930:My Mailbox","Sent Messages"</p><p>thanks again for the help.</p><p> </p>

[quote user="DanDare"]I am using a combination of Outlook, Squirrelmail (to create the folders) and Apple Iphone ...[/quote]

Nice mixup [:)]

[quote]... it seems that if Mercury restarts after a crash it sometimes corrupts the mailbox ...[/quote]

Hmm ... the mailbox? Are the folders corrupted or only the hierarchie? I'm asking because normaly Mercury doesn't write to hierarchie file, if there is no order via IMAP by a mailclient to do so.

[quote]... also if you create a folder in Squirrelmail with outlook open then close outlook this as the same effect.[/quote]

OK - you may configure Pegasus on IMAP, that Pegasus is not the only mailclient to use this mailbox (no exclusive access). Are there any options like that in the other mailclients?

[quote]Not sure what you mean by 'Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP' , is this only for clients that don't support folders?.[/quote]

There are two basic behaiviours with IMAP on folders. Folders within folders means, that a folder may hold mails and have subfolders. If that is not supported by the mailserver, folders may hold mails, but no subfolders; to have a hierarchie, you have to create trays, which may hold folders. If you have configured your mailclient to use thje first option (folders in folders), that may corrupt the hierarchie too. Default for Sqirrel i.e. is folder in folder - as far as I know.

[quote]I have deleted / restored the HIERARCH.PM file but shortly after restarting Mercury its back to normal and i end up with  Name_Unavailable on some lines (See below) and the folders back under root. Just a thought if the iphone still as the mailbox open, on restarting Mercury would that write the old HIERARCH.PM back? or does it work differently.[/quote]

I can't tell you, how different mailclients behave. But if you delete the HIERARCH.PM and restart Mercury, the mailclient has to reconnect, get's no hierarchie info from Server and so will take folders without hierarchie - all under the root of mailbox. Here's an example, how the structure should look:

2,1,"7E956427:My Mailbox","","My Mailbox"
1,1,"2D7C4865:Tray 1","7E956427:My Mailbox","Tray 1"
0,0,"06BC470B:068B:FOL0289E","2D7C4865:Tray 1","Folder 3"
0,0,"0D61A44A:4FD2:FOL04C85","2D7C4865:Tray 1","Folder 1"
0,0,"3EE5D5E9:4FD3:FOL06C94","2D7C4865:Tray 1","Folder 2"

by    Olaf

 

<p>[quote user="DanDare"]I am using a combination of Outlook, Squirrelmail (to create the folders) and Apple Iphone ...[/quote]</p><p>Nice mixup [:)] </p><p>[quote]... it seems that if Mercury restarts after a crash it sometimes corrupts the mailbox ...[/quote]</p><p>Hmm ... the mailbox? Are the folders corrupted or only the hierarchie? I'm asking because normaly Mercury doesn't write to hierarchie file, if there is no order via IMAP by a mailclient to do so. </p><p>[quote]... also if you create a folder in Squirrelmail with outlook open then close outlook this as the same effect.[/quote]</p><p>OK - you may configure Pegasus on IMAP, that Pegasus is not the only mailclient to use this mailbox (no exclusive access). Are there any options like that in the other mailclients? </p><p>[quote]Not sure what you mean by 'Mercury (as Pegasus on his local folders) doesn't support folders within folders. So you have to configure your mailclient to disable this feature on IMAP' , is this only for clients that don't support folders?.[/quote]</p><p>There are two basic behaiviours with IMAP on folders. Folders within folders means, that a folder may hold mails and have subfolders. If that is not supported by the mailserver, folders may hold mails, but no subfolders; to have a hierarchie, you have to create trays, which may hold folders. If you have configured your mailclient to use thje first option (folders in folders), that may corrupt the hierarchie too. Default for Sqirrel i.e. is folder in folder - as far as I know. </p><p>[quote]I have deleted / restored the HIERARCH.PM file but shortly after restarting Mercury its back to normal and i end up with  Name_Unavailable on some lines (See below) and the folders back under root. Just a thought if the iphone still as the mailbox open, on restarting Mercury would that write the old HIERARCH.PM back? or does it work differently.[/quote]</p><p>I can't tell you, how different mailclients behave. But if you delete the HIERARCH.PM and restart Mercury, the mailclient has to reconnect, get's no hierarchie info from Server and so will take folders without hierarchie - all under the root of mailbox. Here's an example, how the structure should look: </p><blockquote><p>2,1,"7E956427:My Mailbox","","My Mailbox" 1,1,"2D7C4865:Tray 1","7E956427:My Mailbox","Tray 1" 0,0,"06BC470B:068B:FOL0289E","2D7C4865:Tray 1","Folder 3" 0,0,"0D61A44A:4FD2:FOL04C85","2D7C4865:Tray 1","Folder 1" 0,0,"3EE5D5E9:4FD3:FOL06C94","2D7C4865:Tray 1","Folder 2" </p></blockquote><p>by    Olaf</p><p> </p>

i

Terrible mixup, Apple's IOS causes no end of problems and i can only create folders in folders using Squirrel unless someone knows a better way [:)].

I have checked the main folders PMM files in the mailbox with the repair utility all seems OK so it must be the hierarch file that gets corrupt unless it's one the the smaller PMM files, I have put back a good backup copy of the file, but as soon as you go into the mail the folders jump back to the root and lines like the following reappear:

' 0,0,"","52165718:My Mailbox",Name_Unavailable ' and these ' 0,0,"398DCCF6:4D5C:FOL044EF","1CB3930:My Mailbox","ST: F 000000000000 01 000001 000000 000000" ' and i end up with two folders with the same name, one i can't delete and one that deletes both.

Does Mercury write this file as soon as i Connect to the mail box if so is it pulling the info from the files in the mailbox folder?. Will i need to check each file in an HEX editor to find the offending files and repair or remove them that way?. How would i go about repairing the file?

I have checked outlook for exclusive rights and google but i can't find an option so it doesn't look like thats available [:(]

Can i change the behavior of folders via Mercury or does the client do this?.

Thanks again

<p>i</p><p>Terrible mixup, Apple's IOS causes no end of problems and i can only create folders in folders using Squirrel unless someone knows a better way [:)].</p><p>I have checked the main folders PMM files in the mailbox with the repair utility all seems OK so it must be the hierarch file that gets corrupt unless it's one the the smaller PMM files, I have put back a good backup copy of the file, but as soon as you go into the mail the folders jump back to the root and lines like the following reappear:</p><p>' 0,0,"","52165718:My Mailbox",Name_Unavailable ' and these ' 0,0,"398DCCF6:4D5C:FOL044EF","1CB3930:My Mailbox","ST: F 000000000000 01 000001 000000 000000" ' and i end up with two folders with the same name, one i can't delete and one that deletes both. </p><p>Does Mercury write this file as soon as i Connect to the mail box if so is it pulling the info from the files in the mailbox folder?. Will i need to check each file in an HEX editor to find the offending files and repair or remove them that way?. How would i go about repairing the file?</p><p>I have checked outlook for exclusive rights and google but i can't find an option so it doesn't look like thats available [:(]</p><p>Can i change the behavior of folders via Mercury or does the client do this?.</p><p>Thanks again</p>

Once again: Mercury does NOT support folders in folders, only folders in trays!

So you have to configure Squirrel and the Apple Mail (or what ever mailclient you use on IOS) to use trays instead of folders to built a hierarchie. You have those options in Pegasus, Thunderbird and Outlook with the server options for IMAP (iow you deselect the server to be capable supporting folders in folders). So have a look at the configuration Options of Squiirel and you mailclient at smartphone.

I don't no how Mercury exactly behaves. On deleted HIERARCH.PM I asume Mercury rebuilds it based on found folders in mailbox. Same may be on connecting, as Pegasus doesn't know the concept of folders in folders (as probably written by the mailclient on close) and Mercury may asume the HIERARCH.PM to be corrupted.

So the solution is to change the behaviour of your mailclients.

bye    Olaf

<p>Once again: Mercury does <b>NOT </b>support folders in folders, only folders in trays!</p><p>So you have to configure Squirrel and the Apple Mail (or what ever mailclient you use on IOS) to use trays instead of folders to built a hierarchie. You have those options in Pegasus, Thunderbird and Outlook with the server options for IMAP (iow you deselect the server to be capable supporting folders in folders). So have a look at the configuration Options of Squiirel and you mailclient at smartphone.</p><p>I don't no how Mercury exactly behaves. On deleted HIERARCH.PM I asume Mercury rebuilds it based on found folders in mailbox. Same may be on connecting, as Pegasus doesn't know the concept of folders in folders (as probably written by the mailclient on close) and Mercury may asume the HIERARCH.PM to be corrupted.</p><p>So the solution is to change the behaviour of your mailclients. </p><p>bye    Olaf </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft