Weirdness in migration - courier to dovecot
Because of speed issues, during a rebuild, I moved a server from courier-imap to dovecot.
I migrated the dbispconfig database, then ran the upgrade.php script on the system. It correctly found Dovecot, (and I ran it again with the line '$conf['dovecot']['installed'] = true;' inserted after 231 [immedately after updateDbAndIni(); ] ) and supposedly everything would be great.
_however_ every time I touch an email account, it sets it up looking like this.
-rwxr--r-- 1 vmail vmail 47 Jun 23 18:13 courierimapsubscribed
drwx------ 2 vmail vmail 4096 Jun 23 18:13 cur
drwx------ 5 vmail vmail 4096 Jun 23 18:13 .Drafts
drwx------ 5 vmail vmail 4096 Jun 23 18:13 .Junk
drwx------ 5 vmail vmail 4096 Jun 23 18:13 Maildir
drwx------ 2 vmail vmail 4096 Jun 23 18:13 new
-rw------- 1 vmail vmail 46 Jun 23 18:13 .quotausage
drwx------ 5 vmail vmail 4096 Jun 23 18:13 .Sent
-rw-r--r-- 1 root root 77 Jun 23 18:13 .sieve
-rw-r--r-- 1 vmail vmail 149 Jun 23 18:13 .sieve.svbin
-rwxr--r-- 1 vmail vmail 23 Jun 23 18:13 subscriptions
drwx------ 2 vmail vmail 4096 Jun 23 18:13 tmp
drwx------ 5 vmail vmail 4096 Jun 23 18:13 .Trash
What's even worse is that it ends up _deleting the information stored in the Maildir folder_ . now I get to restore that from backup, and hope it doesn't happen -again-.
Notice that it created the Dovecot Maildir folder. Under which, it correctly placed the 'new' 'cur' and 'tmp' subfolders. it also created ALL OF THE COURIER FOLDERS AND FILES. Emphasis intended.
The only mention of 'courier' in the dbispconfig database is in the sys_datalog table, and in the server table.
Any suggestions how to stop ispconfig from creating double IMAP setups, as well as deleting emails when the email account is modified? The clean install system I used for another site yesterday isn't having any of these problems.
Courier and dovecot use a different maildir layout, so you can not switch from courier to dovecot without changing the folder layout first. If you dont fo that, then ispconfig detects the faulty folders and removes them as they would not work for dovecot.
So before you change from couroier to dovecot, copy allfiles and folders from:
e.g. like this for each mailbox:
mv /var/vmail/domain.tld/user/* /var/vmail/domain.tld/user/Maildir/
mv /var/vmail/domain.tld/user/.* /var/vmail/domain.tld/user/Maildir/
You can ignore the errors that you get from the mv commands.
Till - that was done. The main complaint is that the 'upgrade.php' didn't actually get rid of courier. I had to do that by hand. So, what happened was that despite the fact that _dovecot_ worked, ISPConfig happily went on its way and nuked everything in the mail folder.
Oddly enough, I had to touch every user manually as well; otherwise, the passwords refused to work. So, if I hadn't caught it, I could have ended up deleting 590 gigabytes of email just to fix the password authentication.
You might want to take a look at the migration tool that I posted several times already:
|All times are GMT +2. The time now is 17:47.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.