Headache moving from Cyrus 2.1 to 2.2

Raimund raimund at busy-byte.org
Mon Jan 24 06:19:42 EST 2011


 Hi there,

 I am having a quite hard time moving my cyrus imapd installation away 
 fom a SuSE 11.1 box (i586) to Ubuntu server 10.04 (x86_64). I have hopes 
 that someone here might be able to help me?:

 I copied the complete cyrus config & data to the new box. Running 
 service cyrus2.2 start only produces lots of error messages in 
 /var/log/mail.err:

 Jan 24 12:12:22 callisto cyrus/lmtpunix[4430]: DBERROR: opening 
 /var/lib/imap/deliver.db: Invalid argument
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4430]: DBERROR: opening 
 /var/lib/imap/deliver.db: cyrusdb error
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4430]: FATAL: lmtpd: unable to 
 init duplicate delivery database
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4431]: DBERROR: dbenv->open 
 '/var/lib/imap/db' failed: DB_VERSION_MISMATCH: Database environment 
 version mismatch
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4431]: DBERROR: init() on 
 berkeley
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4431]: DBERROR: opening 
 /var/lib/imap/deliver.db: Invalid argument
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4431]: DBERROR: opening 
 /var/lib/imap/deliver.db: cyrusdb error
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4431]: FATAL: lmtpd: unable to 
 init duplicate delivery database
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4432]: DBERROR: dbenv->open 
 '/var/lib/imap/db' failed: DB_VERSION_MISMATCH: Database environment 
 version mismatch
 Jan 24 12:12:22 callisto cyrus/lmtpunix[4432]: DBERROR: init() on 
 berkeley

 I tried to convert deliver.db to skiplist a while ago, not sure whether 
 that was successful in any way, because the next error hit me right 
 away, so I started over (with a new copy of the config in 
 /var/lib/imap). Can someone here instruct me what exactly to do to 
 migrate my mail to the new box? I add some config information below.


 Thanks,
 Raimund





 These are the packages I have installed on the two boxes:

 Old box:
  # rpm -qa |grep -i cyrus
 cyrus-sasl-digestmd5-2.1.22-182.2.1
 perl-Cyrus-SIEVE-managesieve-2.3.11-60.21.1
 cyrus-sasl-plain-2.1.22-182.2.1
 perl-Cyrus-IMAP-2.3.11-60.21.1
 cyrus-sasl-2.1.22-182.2.1
 cyrus-sasl-crammd5-2.1.22-182.2.1
 cyrus-imapd-2.3.11-60.21.1
 cyrus-sasl-gssapi-2.1.22-182.2.1

 New box:
 # dpkg --get-selections |grep -i cyrus
 cyrus-admin-2.2                                 install
 cyrus-common-2.2                                install
 cyrus-imapd-2.2                                 install
 libcyrus-imap-perl22                            install

 The mailboxes are located under /var/spool/imap. I rsynced this 
 directory to the new box and changed the /etc/imapd.conf entry 
 accordingly (default on Ubuntu: /var/spool/cyrus)

 Here's my imapd.conf:
 ------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------
 configdirectory: /var/lib/imap
 partition-default: /var/spool/imap
 sievedir: /var/lib/sieve
 admins: cyrus
 allowanonymouslogin: no
 allowplaintext: yes
 autocreatequota: 0
 createonpost: yes
 reject8bit: no
 quotawarn: 90
 timeout: 30
 poptimeout: 10
 dracinterval: 0
 drachost: localhost

 #sasl_pwcheck_method: saslauthd
 sasl_pwcheck_method: auxprop
 sasl_mech_list: PLAIN LOGIN

 lmtpsocket: /var/spool/postfix/socket/lmtp
 lmtp_overquota_perm_failure: no
 lmtp_downcase_rcpt: yes
 #
 # if you want TLS, you have to generate certificates and keys
 #
 tls_cert_file: (certfile)
 tls_key_file: (keyfile)
 tls_ca_file: (rootcertfile)
 tls_ca_path: (capath)
 ------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------



 My /etc/cyrus.conf is this:

 ------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------
 # standard standalone server implementation

 START {
   # do not delete this entry!
   recover       cmd="ctl_cyrusdb -r"

   # this is only necessary if using idled for IMAP IDLE
   idled         cmd="idled"
 }

 # UNIX sockets start with a slash and are put into /var/lib/imap/socket
 SERVICES {
   # add or remove based on preferences
   imap          cmd="imapd" listen="localhost:imap" prefork=0
   imaps         cmd="imapd -s" listen="imaps" prefork=0
 #  pop3         cmd="pop3d" listen="pop3" prefork=0
 #  pop3s                cmd="pop3d -s" listen="pop3s" prefork=0
   sieve         cmd="timsieved" listen="sieve" prefork=0

   # at least one LMTP is required for delivery
 #  lmtp         cmd="lmtpd" listen="lmtp" prefork=0
 #  lmtpunix     cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" 
 prefork=0
 #  lmtpunix    cmd="lmtpd" listen="/var/spool/postfix/public/lmtp" 
 prefork=1
   lmtpunix    cmd="lmtpd" listen="/var/spool/postfix/socket/lmtp" 
 prefork=1

   # this is only necessary if using notifications
 #  notify       cmd="notifyd" listen="/var/lib/imap/socket/notify" 
 proto="udp" prefork=1
 }

 EVENTS {
   # this is required
   checkpoint    cmd="ctl_cyrusdb -c" period=30

   # this is only necessary if using duplicate delivery suppression
   delprune      cmd="cyr_expire -E 3" at=0400

   # this is only necessary if caching TLS sessions
   tlsprune      cmd="tls_prune" at=0400

   # Uncomment the next entry, if you want to automatically remove
   # old messages of EVERY user.
   # This example calls ipurge every 60 minutes and ipurge will delete
   # ALL messages older then 30 days.
   # enter 'man 8 ipurge' for more details

   # cleanup      cmd="ipurge -d 30 -f" period=60
 }
 ------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------

 Here's a file list from the source (i.e. openSuSE) box:

 /var/lib/imap # find . -exec file '{}' \;
 .: directory
 ./proc: directory
 ./proc/24144: ASCII text
 ./proc/29679: ASCII text
 ./proc/20164: ASCII text
 ./proc/6404: ASCII text
 ./proc/23917: ASCII text
 ./proc/7102: ASCII text
 ./proc/6575: ASCII text
 ./proc/20558: ASCII text
 ./proc/20253: ASCII text
 ./proc/21067: ASCII text
 ./deliver.db: Berkeley DB (Btree, version 9, native byte-order)
 ./annotations.db: Cyrus skiplist DB
 ./log: directory
 ./tls_sessions.db: Berkeley DB (Btree, version 9, native byte-order)
 ./quota: directory
 ./quota/m: directory
 ./quota/z: directory
 ./quota/u: directory
 ./quota/j: directory
 ./quota/j/user.jihong: ASCII text
 ./quota/k: directory
 ./quota/l: directory
 ./quota/x: directory
 ./quota/s: directory
 ./quota/v: directory
 ./quota/t: directory
 ./quota/e: directory
 ./quota/y: directory
 ./quota/a: directory
 ./quota/f: directory
 ./quota/i: directory
 ./quota/g: directory
 ./quota/w: directory
 ./quota/r: directory
 ./quota/r/user.raimund: ASCII text
 ./quota/b: directory
 ./quota/c: directory
 ./quota/o: directory
 ./quota/h: directory
 ./quota/d: directory
 ./quota/n: directory
 ./quota/q: directory
 ./quota/p: directory
 ./socket: directory
 ./socket/lmtp: socket
 ./socket/lmtpunix-0.lock: empty
 ./socket/pop3-0.lock: empty
 ./socket/imaps-0.lock: empty
 ./socket/imap-0.lock: empty
 ./socket/idle: socket
 ./mailboxes.db: Cyrus skiplist DB
 ./mailboxes.txt: ASCII text
 ./db.backup1: directory
 ./db.backup1/annotations.db: Cyrus skiplist DB
 ./db.backup1/log.0000000023: Berkeley DB (Log, version 12, native 
 byte-order)
 ./db.backup1/mailboxes.db: Cyrus skiplist DB
 ./user: directory
 ./user/m: directory
 ./user/m/melanie.sub: empty
 ./user/m/melanie.seen: Cyrus skiplist DB
 ./user/z: directory
 ./user/u: directory
 ./user/j: directory
 ./user/j/jihong.sub: ASCII text
 ./user/j/jihong.seen: Cyrus skiplist DB
 ./user/k: directory
 ./user/l: directory
 ./user/x: directory
 ./user/s: directory
 ./user/v: directory
 ./user/t: directory
 ./user/e: directory
 ./user/y: directory
 ./user/a: directory
 ./user/f: directory
 ./user/i: directory
 ./user/i/ingolf.seen: Cyrus skiplist DB
 ./user/i/ingolf.sub: ASCII text
 ./user/g: directory
 ./user/w: directory
 ./user/r: directory
 ./user/r/raimund.sub: ASCII text
 ./user/r/raimund.seen: Cyrus skiplist DB
 ./user/b: directory
 ./user/b/bianca.seen: Cyrus skiplist DB
 ./user/b/bianca.sub: empty
 ./user/c: directory
 ./user/c/christa.seen: Cyrus skiplist DB
 ./user/c/christa.sub: empty
 ./user/o: directory
 ./user/h: directory
 ./user/d: directory
 ./user/n: directory
 ./user/q: directory
 ./user/p: directory
 ./deliverdb: directory
 ./deliverdb/db: directory
 ./msg: directory
 ./db.backup2: directory
 ./db.backup2/annotations.db: Cyrus skiplist DB
 ./db.backup2/log.0000000023: Berkeley DB (Log, version 12, native 
 byte-order)
 ./db.backup2/mailboxes.db: Cyrus skiplist DB
 ./db: directory
 ./db/__db.001: Applesoft BASIC program data
 ./db/__db.004: X11 SNF font data, LSB first
 ./db/skipstamp: data
 ./db/__db.003: X11 SNF font data, LSB first
 ./db/__db.006: X11 SNF font data, LSB first
 ./db/log.0000000023: Berkeley DB (Log, version 12, native byte-order)
 ./db/__db.005: X11 SNF font data, LSB first
 ./db/__db.002: X11 SNF font data, LSB first





More information about the Info-cyrus mailing list