courier to dovecot migration
I have a quite old home server based on Debian 6.x packages using courier imap server (exim4, fetchmail, courier, apache2, squirrelmail) to keep my and my wife emails (about 25G). I want renew my server to Debian 10 (buster) and got a recommendation to use dovecot instead of courier. For this purpose I'm using a different PC as a sandbox. Debian 10 currently offer dovecot version 2.3.4.1 Installation was "peaceful" but stuck with the migration. I have choose migration using dsync, from Wiki I was choose this command:
For per-user user/passwords use:
doveadm -o imapc_user=foo -o pop3c_user=foo -o imapc_password=bar -o pop3c_password=bar backup -R -u user@domain imapc:
(foo and bar placed real username and password)
But I get error: doveadm(tovis@nusi.tovis-lab.mydomain.org): Error: User doesn't exist
Strongly I have no real domain, I'm using "freedns". "nusi" is the local name of my old server, "tovis-lab" is conjunction with "mydomain.org" choose from freedns. I was trying short as "nusi" which is in /etc/hosts file even ip address but the same result. 143 and 943 ports are working only inside the firewall (OpenWrt). I was checked using telnet courier on the "remote" box and dovecot on the localhost. I was able to login.
What should I use as "user@domain" in this situation?
tovis
On 29.9.2019 23.38, tovises via dovecot wrote:
I have a quite old home server based on Debian 6.x packages using courier imap server (exim4, fetchmail, courier, apache2, squirrelmail) to keep my and my wife emails (about 25G). I want renew my server to Debian 10 (buster) and got a recommendation to use dovecot instead of courier. For this purpose I'm using a different PC as a sandbox. Debian 10 currently offer dovecot version 2.3.4.1 Installation was "peaceful" but stuck with the migration. I have choose migration using dsync, from Wiki I was choose this command:
For per-user user/passwords use:
doveadm -o imapc_user=foo -o pop3c_user=foo -o imapc_password=bar -o pop3c_password=bar backup -R -u user@domain imapc:
(foo and bar placed real username and password)
But I get error: doveadm(tovis@nusi.tovis-lab.mydomain.org): Error: User doesn't exist
Strongly I have no real domain, I'm using "freedns". "nusi" is the local name of my old server, "tovis-lab" is conjunction with "mydomain.org" choose from freedns. I was trying short as "nusi" which is in /etc/hosts file even ip address but the same result. 143 and 943 ports are working only inside the firewall (OpenWrt). I was checked using telnet courier on the "remote" box and dovecot on the localhost. I was able to login.
What should I use as "user@domain" in this situation?
tovis
Hi!
-u parameter should be your *local* username, @domain is optional.
Aki
On 29.9.2019 23.38, tovises via dovecot wrote:
I have a quite old home server based on Debian 6.x packages using courier imap server (exim4, fetchmail, courier, apache2, squirrelmail) to keep my and my wife emails (about 25G). I want renew my server to Debian 10 (buster) and got a recommendation to use dovecot instead of courier. For this purpose I'm using a different PC as a sandbox. Debian 10 currently offer dovecot version 2.3.4.1 Installation was "peaceful" but stuck with the migration. I have choose migration using dsync, from Wiki I was choose this command:
For per-user user/passwords use:
doveadm -o imapc_user=foo -o pop3c_user=foo -o imapc_password=bar -o pop3c_password=bar backup -R -u user@domain imapc:
(foo and bar placed real username and password)
But I get error: doveadm(tovis@nusi.tovis-lab.mydomain.org): Error: User doesn't exist
Strongly I have no real domain, I'm using "freedns". "nusi" is the local name of my old server, "tovis-lab" is conjunction with "mydomain.org" choose from freedns. I was trying short as "nusi" which is in /etc/hosts file even ip address but the same result. 143 and 943 ports are working only inside the firewall (OpenWrt). I was checked using telnet courier on the "remote" box and dovecot on the localhost. I was able to login.
What should I use as "user@domain" in this situation?
tovis
Hi!
-u parameter should be your *local* username, @domain is optional.
Aki
Thank you Aki for quick response! Where i should define the remote IMAP server address/hostname? My localhost run dovecot, remote host (other box) running courier. The user name is the same (password too). -u tovis gives me "Error: Failed to initialize user: Namespace ''; Mailbox list driver imapc: missing imapc_host"
Sincerely tovis
On 30.9.2019 12.38, tovises wrote:
On 29.9.2019 23.38, tovises via dovecot wrote:
I have a quite old home server based on Debian 6.x packages using courier imap server (exim4, fetchmail, courier, apache2, squirrelmail) to keep my and my wife emails (about 25G). I want renew my server to Debian 10 (buster) and got a recommendation to use dovecot instead of courier. For this purpose I'm using a different PC as a sandbox. Debian 10 currently offer dovecot version 2.3.4.1 Installation was "peaceful" but stuck with the migration. I have choose migration using dsync, from Wiki I was choose this command:
For per-user user/passwords use:
doveadm -o imapc_user=foo -o pop3c_user=foo -o imapc_password=bar -o pop3c_password=bar backup -R -u user@domain imapc:
(foo and bar placed real username and password)
But I get error: doveadm(tovis@nusi.tovis-lab.mydomain.org): Error: User doesn't exist
Strongly I have no real domain, I'm using "freedns". "nusi" is the local name of my old server, "tovis-lab" is conjunction with "mydomain.org" choose from freedns. I was trying short as "nusi" which is in /etc/hosts file even ip address but the same result. 143 and 943 ports are working only inside the firewall (OpenWrt). I was checked using telnet courier on the "remote" box and dovecot on the localhost. I was able to login.
What should I use as "user@domain" in this situation?
tovis
Hi!
-u parameter should be your *local* username, @domain is optional.
Aki
Thank you Aki for quick response! Where i should define the remote IMAP server address/hostname? My localhost run dovecot, remote host (other box) running courier. The user name is the same (password too). -u tovis gives me "Error: Failed to initialize user: Namespace ''; Mailbox list driver imapc: missing imapc_host"
Sincerely tovis
You can put imapc_host and pop3c_host into config file or provide them with -o. If you want to migrate POP3 uidls you need to make sure you load that plugin, in either config or providing -o "mail_plugins=list of plugins".
Aki
On 30.9.2019 12.38, tovises wrote:
On 29.9.2019 23.38, tovises via dovecot wrote:
I have a quite old home server based on Debian 6.x packages using courier imap server (exim4, fetchmail, courier, apache2, squirrelmail) to keep my and my wife emails (about 25G). I want renew my server to Debian 10 (buster) and got a recommendation to use dovecot instead of courier. For this purpose I'm using a different PC as a sandbox. Debian 10 currently offer dovecot version 2.3.4.1 Installation was "peaceful" but stuck with the migration. I have choose migration using dsync, from Wiki I was choose this command:
For per-user user/passwords use:
doveadm -o imapc_user=foo -o pop3c_user=foo -o imapc_password=bar -o pop3c_password=bar backup -R -u user@domain imapc:
(foo and bar placed real username and password)
But I get error: doveadm(tovis@nusi.tovis-lab.mydomain.org): Error: User doesn't exist
Strongly I have no real domain, I'm using "freedns". "nusi" is the local name of my old server, "tovis-lab" is conjunction with "mydomain.org" choose from freedns. I was trying short as "nusi" which is in /etc/hosts file even ip address but the same result. 143 and 943 ports are working only inside the firewall (OpenWrt). I was checked using telnet courier on the "remote" box and dovecot on the localhost. I was able to login.
What should I use as "user@domain" in this situation?
tovis
Hi!
-u parameter should be your *local* username, @domain is optional.
Aki
Thank you Aki for quick response! Where i should define the remote IMAP server address/hostname? My localhost run dovecot, remote host (other box) running courier. The user name is the same (password too). -u tovis gives me "Error: Failed to initialize user: Namespace ''; Mailbox list driver imapc: missing imapc_host"
Sincerely tovis
You can put imapc_host and pop3c_host into config file or provide them with -o. If you want to migrate POP3 uidls you need to make sure you load that plugin, in either config or providing -o "mail_plugins=list of plugins".
Aki
WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion?
Sincerely tovis
On 30 Sep 2019, at 13.13, tovises via dovecot dovecot@dovecot.org wrote:
WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion?
try:
doveadm -D -o imapc_user=tovis -o pop3c_user=tovis -o imapc_password=<password> -o pop3c_password=<password> backup -u tovis -R imapc:
Sami
On 30 Sep 2019, at 13.13, tovises via dovecot dovecot@dovecot.org wrote:
WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion?
try:
doveadm -D -o imapc_user=tovis -o pop3c_user=tovis -o imapc_password=<password> -o pop3c_password=<password> backup -u tovis -R imapc:
Sami
Hello Sami! This was the previous version, but if it could help: https://pastebin.com/3X3BKinB
One more question, isa it possible, that I do not need pop3c_user/pop3c_password? I do not have pop3 server on remote server, I have only IMAP.
Sincerely tovis
On 30.9.2019 13.40, tovises wrote:
On 30 Sep 2019, at 13.13, tovises via dovecot dovecot@dovecot.org wrote: WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion? try:
doveadm -D -o imapc_user=tovis -o pop3c_user=tovis -o imapc_password=<password> -o pop3c_password=<password> backup -u tovis -R imapc:
Sami
Hello Sami! This was the previous version, but if it could help: https://pastebin.com/3X3BKinB
One more question, isa it possible, that I do not need pop3c_user/pop3c_password? I do not have pop3 server on remote server, I have only IMAP.
Sincerely tovis
You don't need it, then. And you do not need the pop3_uidl_migration plugin either, then.
Your paste indicates that your config / command line is missing imapc_host setting, so add to your config file
imapc_host=nusi # or the fqdn name
Aki
On 30.9.2019 13.40, tovises wrote:
On 30 Sep 2019, at 13.13, tovises via dovecot dovecot@dovecot.org wrote: WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion? try:
doveadm -D -o imapc_user=tovis -o pop3c_user=tovis -o imapc_password=<password> -o pop3c_password=<password> backup -u tovis -R imapc:
Sami
Hello Sami! This was the previous version, but if it could help: https://pastebin.com/3X3BKinB
One more question, isa it possible, that I do not need pop3c_user/pop3c_password? I do not have pop3 server on remote server, I have only IMAP.
Sincerely tovis
You don't need it, then. And you do not need the pop3_uidl_migration plugin either, then.
Your paste indicates that your config / command line is missing imapc_host setting, so add to your config file
imapc_host=nusi # or the fqdn name
Aki
Tath's help! But something still missing :(
$ sudo doveadm -D -o imapc_user=tovis -o imapc_password=<password> -o imapc_host=nusi -R -u tovis imapc:
Exited with messages (excerption - too many private information exposed):
dsync(tovis): Debug: brain M: Mailbox INBOX.threatposts: local=00000000000000000000000000000000/0/0, remote=a557d4d9d858c0ceceef5cd10a973bdc/0/1: mailbox not selectable yet dsync(tovis): Debug: brain M: Mailbox INBOX.todo: local=00000000000000000000000000000000/0/0, remote=891e2fe9dc8874c0a19e496acf802566/0/1: mailbox not selectable yet dsync(tovis): Debug: brain M: Deleting mailbox 'INBOX' (GUID 2e829f01d5cc915dd103000056dcb805): UIDVALIDITY changed (1454614013 -> 1569836245) dsync(tovis): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted. dsync(tovis): Debug: brain S: Remote mailbox tree: INBOX guid=2e829f01d5cc915dd103000056dcb805 uid_validity=1569836245 uid_next=2 subs=no last_change=0 last_subs=0 dsync(tovis): Debug: imapc(nusi:143): Disconnected
I was trying to add " -o mail_fsync=never backup" option, but it doesn't help. Why even trying to delete a folder such INBOX? Option "backup" must be "copy" not synchronize. I was check ~/Maildir for dovecot on localhost but no changes - the debug output of doveadm gives several hundred output rows such as: sync(tovis): Debug: brain M: Mailbox INBOX.lists.openwrt: local=00000000000000000000000000000000/0/0, remote=bc99ab2a6d9557ef23628f0ba159ee3c/0/1: mailbox not selectable yet (This seem to be the academic horse - Hungarian proverb for every where something wrong/sick) Any suggestion?
Sincerely tovis
Hi.
Am 30.09.19 um 13:07 schrieb tovises via dovecot:
On 30.9.2019 13.40, tovises wrote:
On 30 Sep 2019, at 13.13, tovises via dovecot dovecot@dovecot.org wrote: WOW! - amazing quickly, I'm really grateful.
I was using: -u tovis imapc: nusi but still something wrong. Patstebin: https://pastebin.com/tH4wzJka The most relevant part (I think) is: dsync-local(tovis)<rAJmCUTTkV0IBAAAVty4BQ>: Error: read(remote) failed: EOF (version not received) doveadm(tovis): Fatal: execvp(imapc:) failed: No such file or directory
What I have missed (doveadm trying to execute something but what). Any suggestion? try:
doveadm -D -o imapc_user=tovis -o pop3c_user=tovis -o imapc_password=<password> -o pop3c_password=<password> backup -u tovis -R imapc:
Sami
Hello Sami! This was the previous version, but if it could help: https://pastebin.com/3X3BKinB
One more question, isa it possible, that I do not need pop3c_user/pop3c_password? I do not have pop3 server on remote server, I have only IMAP.
Sincerely tovis
You don't need it, then. And you do not need the pop3_uidl_migration plugin either, then.
Your paste indicates that your config / command line is missing imapc_host setting, so add to your config file
imapc_host=nusi # or the fqdn name
Aki
Tath's help! But something still missing :(
$ sudo doveadm -D -o imapc_user=tovis -o imapc_password=<password> -o imapc_host=nusi -R -u tovis imapc:
Exited with messages (excerption - too many private information exposed):
dsync(tovis): Debug: brain M: Mailbox INBOX.threatposts: local=00000000000000000000000000000000/0/0, remote=a557d4d9d858c0ceceef5cd10a973bdc/0/1: mailbox not selectable yet dsync(tovis): Debug: brain M: Mailbox INBOX.todo: local=00000000000000000000000000000000/0/0, remote=891e2fe9dc8874c0a19e496acf802566/0/1: mailbox not selectable yet dsync(tovis): Debug: brain M: Deleting mailbox 'INBOX' (GUID 2e829f01d5cc915dd103000056dcb805): UIDVALIDITY changed (1454614013 -> 1569836245) dsync(tovis): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted. dsync(tovis): Debug: brain S: Remote mailbox tree: INBOX guid=2e829f01d5cc915dd103000056dcb805 uid_validity=1569836245 uid_next=2 subs=no last_change=0 last_subs=0 dsync(tovis): Debug: imapc(nusi:143): Disconnected
I was trying to add " -o mail_fsync=never backup" option, but it doesn't help. Why even trying to delete a folder such INBOX? Option "backup" must be "copy" not synchronize. I was check ~/Maildir for dovecot on localhost but no changes - the debug output of doveadm gives several hundred output rows such as: sync(tovis): Debug: brain M: Mailbox INBOX.lists.openwrt: local=00000000000000000000000000000000/0/0, remote=bc99ab2a6d9557ef23628f0ba159ee3c/0/1: mailbox not selectable yet (This seem to be the academic horse - Hungarian proverb for every where something wrong/sick) Any suggestion?
I'm on the same task to migrate from one server to another and got exact the same message.
With some searching I found this answer from aki. https://dovecot.org/pipermail/dovecot/2016-January/102988.html
As the mailbox on the new server is empty I removed the Maildir and the backup works as expected so far.
My versions are
# 2.2.36.4 (baf9232c1): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.24.2 (aaba65b7) # OS: Linux 3.10.0-1062.1.1.el7.x86_64 x86_64 CentOS Linux release 7.7.1908 (Core)
Sincerely tovis
Regards Aleks
On 30 Sep 2019, at 14.07, tovises via dovecot dovecot@dovecot.org wrote: Tath's help! But something still missing :(
$ sudo doveadm -D -o imapc_user=tovis -o imapc_password=<password> -o imapc_host=nusi -R -u tovis imapc:
Exited with messages (excerption - too many private information exposed):
dsync(tovis): Debug: brain M: Mailbox INBOX.threatposts: local=00000000000000000000000000000000/0/0, remote=a557d4d9d858c0ceceef5cd10a973bdc/0/1: mailbox not selectable yet dsync(tovis): Debug: brain M: Mailbox INBOX.todo: local=00000000000000000000000000000000/0/0, remote=891e2fe9dc8874c0a19e496acf802566/0/1: mailbox not selectable yet
Remote (courier) refuses A SELECT INBOX.threatpost and A SELECT INBOX.todo
dsync(tovis): Debug: brain M: Deleting mailbox 'INBOX' (GUID 2e829f01d5cc915dd103000056dcb805): UIDVALIDITY changed (1454614013 -> 1569836245) dsync(tovis): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted.
IMAP RFC mandates that if UIDVALIDITY changes then the whole mailbox needs to be resynced. Dovecot then tries to delete INBOX for resync, but INBOX deletion is not allowed.
The only way to recover is to clear out the target completely and restart from beginning.
btw, 1454614013 = Thu Feb 4 20:26:53 CET 2016 and 1569836245 = Mon Sep 30 11:37:25 CEST 2019
so did you actually create INBOX on target system before the initial sync?
Sami
participants (4)
-
Aki Tuomi
-
Alex La
-
Sami Ketola
-
tovises