[Dovecot] Repair/Cleaup Maildir

Glen Eustace geustace at godzone.net.nz
Sat Jan 8 22:46:19 EET 2005

After having fought an issue with Courier-imap on FC3 for a week (that
is still unresolved), I decided to try Dovecot instead.

So far, fingers crossed, the issue has not re-occured.

Migrating from courier-imap/sqwebmail to Dovecot/Squirrelmail was
reasonably painless but I now have an problem.

Is there a utility available to cleanup/repair the maildir tree for each
user ?

As part of the migration, I copied all of the courierimapsubscribed
files to .subscriptions and removed the leading 'INBOX'. This seemed to
be enough to get things going.

Unfortunately, people who had only ever used webmail didn't have a
courierimapsubscribed file. When they next used squirrelmail, a
new .subscriptions file was created but didn't contain their folders. I
tried to fix this by recreating the subscriptions file for each user and
adding in all the .directories in their maildir root.

I now have a maildir hierarchy with lots of crud in it. I need a utility
to go through and deleted all the files that shouldn't be there anymore
and to ensure that the subscriptions files are correct.

Does such a utility exist ?
If not, can anyone tell me where I can find a good description of what
Dovecot expects to find in maildirs so I can write one myself.

Any suggestions/help appreciated.
Glen and Rosanne Eustace,
GodZone Internet Services, a division of AGRE Enterprises Ltd.,
P.O. Box 8020, Palmerston North, New Zealand 5301
Ph/Fax: +64 6 357 8168, Mob: +64 27 5 424 015, Web: www.godzone.net.nz

"A Ministry specialising in providing low-cost professional Internet
Services to NZ Christian Churches, Ministries and Organisations"

More information about the dovecot mailing list