Discussion:
Moving from cIMAP-2.3.16 to 3.0.5
Nic Bernstein
2018-05-12 23:47:30 UTC
Permalink
James,
Patrick is entirely correct.  As explained in the man page for
ctl_mboxlist(8) the "-f" flag is to specify an alternative input file
(mailbox database) not an output file.  Output is via standard out, and
can redirected into the file of your choice, or piped to the new host,
like so:

$ sudo -u cyrus /usr/lib/cyrus-imapd/ctl_mboxlist -d | ssh -tt newhost.example.com sudo ctl_mboxlist -u

Assuming you have the configuration directory specified in imapd.conf(5)
on both systems, the right DB files should be used.

Cheers,
    -nic
I have used rsync to move our entire maill store from the old server
to the new.  I now I wish to move the contents of mailboxes.db from
sudo -u cyrus /usr/lib/cyrus-imapd/ctl_mboxlist -d -f
/var/spool/imap/mailboxes.db.txt
on the old followed by a transfer of /var/spool/imap/mailboxes.db.txt
sudo -u cyrus /usr/local/cyrus/sbin/ctl_mboxlist -u  -f
/var/spool/imap/mailboxes.db.txt on the new
  and all I get is a blank line and no indication in ps that the task
is consuming any cpu.
line 1: no partition found
line 2: no partition found
line 3: no partition found
. . .
There is only one partition on both systems and it is
'/var/spool/imap' on both.
I have also tried the method suggested on the 3.0.6 documentation
respecting upgrading and use rsync to move over mailboxes.db. In each
case I cannot get reconstruct to run and upgrade or rebuild the mail
store on the new service.
# sudo -u cyrus /usr/local/cyrus/sbin/reconstruct -r -f -V *
#
I get an immediate empty return.
I know that there exist physical mailboxes on the server that cyradm
does not report.  I know that these mailboxes exist on the old server
and therefore I infer are present in mailboxess.db.
How do I get the contents of the old mailboxes.db file into the new so
that reconstruct will run?
sudo -u cyrus /usr/lib/cyrus-imapd/ctl_mboxlist -d >
/var/spool/imap/mailboxes.db.txt
 on the old followed by a transfer of /var/spool/imap/mailboxes.db.txt
sudo -u cyrus /usr/local/cyrus/sbin/ctl_mboxlist -u <
/var/spool/imap/mailboxes.db.txt
on the new
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
--
Nic Bernstein ***@onlight.com
Onlight Inc. www.onlight.com
6525 W Bluemound Rd., Ste 24 v. 414.272.4477
Milwaukee, Wisconsin 53213-4073 f. 414.290.0335
Savvas Karagiannidis
2018-05-14 14:18:17 UTC
Permalink
Hi James,
note that you will probably fall into this bug on the new system:
https://github.com/cyrusimap/cyrus-imapd/issues/2208
Try running "reconstruct -G -V max" on the new system before switching to
it. This will upgrade the mailboxes avoiding the issue.

Regards,
Savvas Karagiannidis

On Mon, May 14, 2018 at 4:15 PM James B. Byrne via Info-cyrus <
Post by Nic Bernstein
James,
Patrick is entirely correct. As explained in the man page for
ctl_mboxlist(8) the "-f" flag is to specify an alternative input file
(mailbox database) not an output file. Output is via standard out,
and
can redirected into the file of your choice, or piped to the new host,
Thank you both. I will try this approach and report if I somehow
manage to get it wrong again.
Regards,
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Do NOT open attachments nor follow links sent by e-Mail
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241 <(905)%20561-1241>
Hamilton, Ontario fax: +1 905 561 0757 <(905)%20561-0757>
Canada L8E 3C3
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Savvas Karagiannidis
2018-05-17 19:55:48 UTC
Permalink
Hi James,
Users' subscription files are normally saved in /var/imap/user in
directories based on the user's initial. Search for username.sub files in
there. Seen status used to be in there too in username.seen files but that
changed in more recent versions, where seen status information is stored
inside the cyrus.index file for each mailbox.

For the users' subscription information just copy the .sub files in the
same directory structure.
For the seen status information try copying the .seen files too. Migrating
that information used to be an automatic procedure in version 2.4, the
first time the user logged in but not sure if it still applies to 3.x..

Regards,
Savvas Karagiannidis


On Thu, May 17, 2018, 22:25 James B. Byrne via Info-cyrus <
I have managed to move the 2.3.16 mailstore and mailboxes.db to the
3.0.5 host and reconstructed the mailboxes using 'reconstruct -f -r
-G -V max user/*' Connections between squirrelmail and the new
service appear to be working fine. However, I have a couple of
glitches and I would like to know if there is anything I can do to
eliminate them before thae actual switchover, scheduled for this
Saturday.
1. All of the use folders are unsubscribed following the reconstruct.
2. All of the messages show as unread following the reconstruct.
Is there any way to avoid these consequences of transfer and reconstruct?
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Do NOT open attachments nor follow links sent by e-Mail
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive
<https://maps.google.com/?q=9+Brockley+Drive&entry=gmail&source=g>
vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Loading...