eddie at omegaware.com
Thu Feb 26 01:10:19 EST 2004
mailboxes.db is the list of all existing mailboxes and folders in
cyrus.. it is initially empty and as you create accounts and folders on
the mails server it is populated with the names of the folders and the
permissions assigned to them.. you can use the ctl_mboxlist program
included with cyrus to dump and undump the contents of this database..
However, if you mailboxes.db is completely corrupt then you will need to
recreate it.. You should consider implementing a backup procedure for
I've attached a script I wrote a while ago when I upgraded my cyrus imap
from 1.6 to 2.x and ended up having my mailboxes.db deleted
accidentally. First edit the file and change the path to the imap spool
user/ directory. Then run the script like this.
./conv.sh > mailboxes.txt
you can then adjust the contents to your liking.
The format of the *dump* file is
foldername partition username permissionlist username permissionlist ...
There can be as many username permissionlist combos as needed.
Note that there are NO SPACES in the file.. they are all TABS.
My little bash script adds in all of the folders in the user directory
with ownership on the folder by the mailbox owner and the cyrus
To actually import this into cyrus you need to run this command
su - cyrus
/usr/lib/cyrus-imapd/ctl_mboxlist -u < mailboxes.txt
The program needs to run as the user cyrus.. And you may need to locate
where the ctl_mboxlist binary is on your system as it may not be in that
I am currently in the middle of writing a perl version of this script,
except with many more features (ie. converting to the virtual domain
system in 2.2.x) and auto-detection of the cyrus installation.
Hope this helps some..
On Wed, 2004-02-25 at 23:08, Ian Beyer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I must have royally screwed up something with the installation. SASL
> fails to initialize, and I also see this in the logs:
> Feb 25 22:46:05 schizo imap: [ID 639319 local6.error] skiplist:
> invalid magic header: /var/imap/mailboxes.db
> Feb 25 22:46:05 schizo imap: [ID 729713 local6.error] DBERROR:
> opening /var/imap/mailboxes.db: cyrusdb error
> Feb 25 22:46:05 schizo imap: [ID 637875 local6.error] Fatal
> error: can't read mailboxes file
> Feb 25 22:46:05 schizo master: [ID 310780 local6.debug] process
> 16198 exited, status 75
> Am I correct in assuming that these two are related?
> I can't seem to find any documentation on how to create mailboxes.db. Is
> it supposed to be created initially?
> in /var/imap is:
> - -rw------- 1 cyrus mail 16384 Feb 25 20:27 mailboxes.db
> Additionally, cyradm pukes on me:
> Can't locate Cyrus/IMAP/Shell.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/local/lib/perl5/5.8.0
> /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .).
> BEGIN failed--compilation aborted.
> and I can't install Cyrus::IMAP::Shell via CPAN.pm.
> Where in the heck did I go wrong?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> -----END PGP SIGNATURE-----
> Home Page: http://asg.web.cmu.edu/cyrus
> Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Edward Rudd <eddie at omegaware.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 248 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20040226/948f80ce/conv.bin
More information about the Info-cyrus