Migrating Ubuntu -> CentOS IMAP Troubles

Tobias Brunner tobias at tobru.ch
Wed Sep 28 22:23:54 CEST 2016


>> Does anyone have an idea what I can do? F.e. I already tried to first
>> convert the dbs on the old server to flat and then on the new server
>> back to twoskip, but that didn't help. And I'm pretty sure that the old
>> server doesn't use BDB as backend.
>>
>
> If you convert the db files to a format other than twoskip (which is the 
> default now in cyrus > 2.5) ... then you'll need to change some options in 
> imap.conf to match the format you converted them into.
> 
> https://cyrusimap.org/docs/cyrus-imapd/2.2.13p1/man/imapd.conf.5.php
> 
> Check out the options named *_db.  (annotations_db, mailboxes_db, etc).  They 
> default to twoskip.   So if you want to convert them to berkely, or skiplist, 
> or flat then you need to specify that format in the config as well.
> 
> annotations_db = flat
> 
> I believe all of the databases will be recreated if they are not available 
> _except_ for the mailboxes database.  So if it can not read the database files 
> you have in place, it will re-create them.
> 
> I would make sure whatever format you decide to use for each database is set 
> in imap.conf accordingly.

I only converted the files to flat on the old server to copy it to the
new server. On the new server I converted the DBs back to twoskip with
cvt_cyrusdb which worked as expected per the tool output. *_db is not
configured, therefore Cyrus should use twoskip.

As this doesn't seem to solve the issue, I tried again to just rsync
/var/lib/imap/ from the old to the new server. Before starting Cyrus the
content of the directory looks like this:

# ls -Alh /var/lib/imap/*.db*
-rw-------. 1 cyrus mail 176K Sep 28 14:09 /var/lib/imap/annotations.db
-rw-------. 1 cyrus mail 1.2M Sep 28 22:01 /var/lib/imap/deliver.db
-rw-------. 1 cyrus mail 181K Sep 28 21:28 /var/lib/imap/mailboxes.db
-rw-------. 1 cyrus mail  336 Mar 10  2015 /var/lib/imap/statuscache.db
-rw-------. 1 cyrus mail 200K Sep 28 22:11 /var/lib/imap/tls_sessions.db

After starting cyrus-imapd, it looks like this:

# ls -Alh /var/lib/imap/*.db*
-rw-------. 1 cyrus mail 3.8K Sep 28 22:12 /var/lib/imap/annotations.db
-rw-------. 1 cyrus mail 176K Sep 28 14:09
/var/lib/imap/annotations.db.berkeley
-rw-------. 1 cyrus mail  336 Sep 28 22:12 /var/lib/imap/deliver.db
-rw-------. 1 cyrus mail 1.2M Sep 28 22:01 /var/lib/imap/deliver.db.berkeley
-rw-------. 1 cyrus mail 3.7K Sep 28 22:12 /var/lib/imap/mailboxes.db
-rw-------. 1 cyrus mail 181K Sep 28 21:28
/var/lib/imap/mailboxes.db.berkeley
-rw-------. 1 cyrus mail  336 Sep 28 22:12 /var/lib/imap/statuscache.db
-rw-------. 1 cyrus mail  336 Mar 10  2015
/var/lib/imap/statuscache.db.berkeley
-rw-------. 1 cyrus mail  768 Sep 28 22:12 /var/lib/imap/tls_sessions.db
-rw-------. 1 cyrus mail 200K Sep 28 22:11
/var/lib/imap/tls_sessions.db.berkeley

So somehow Cyrus thinks that the files are in BDB format and recreates
them from scratch. Opening a file of the old server in an editor, it
contains "twoskip file" at the beginning.

Unfortunately the logfile /var/log/maillog doesn't log that much on startup:

Sep 28 22:17:06 kolab2 ctl_cyrusdb[3309]: skiplist: clean shutdown file
missing, updating recovery stamp
Sep 28 22:17:06 kolab2 ctl_cyrusdb[3309]: recovering cyrus databases
Sep 28 22:17:06 kolab2 ctl_cyrusdb[3309]: done recovering cyrus databases
Sep 28 22:17:07 kolab2 master[3307]: unable to setsocketopt(IP_TOS)
service ptloader/unix: Operation not supported
Sep 28 22:17:07 kolab2 master[3307]: unable to setsocketopt(IP_TOS)
service lmtpunix/unix: Operation not supported
Sep 28 22:17:07 kolab2 master[3307]: unable to setsocketopt(IP_TOS)
service notify/unix: Operation not supported
Sep 28 22:17:07 kolab2 ctl_cyrusdb[3312]: checkpointing cyrus databases
Sep 28 22:17:07 kolab2 ctl_cyrusdb[3312]: done checkpointing cyrus databases

I even tried to set CYRUS_VERBOSE=1 in /etc/sysconfig/cyrus-imapd which
didn't change anything regarding logging output. Also configuring
local6.debug in rsyslog didn't produce more verbose logging.

Any other hints what I can do to debug this sort of issue?

Cheers,
Tobias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.kolab.org/pipermail/users/attachments/20160928/e6b2ebed/attachment.sig>


More information about the users mailing list