HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Weirdness in migration - courier to dovecot (http://www.howtoforge.com/forums/showthread.php?t=57716)

Bookworm 24th June 2012 01:24

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.

BW

till 24th June 2012 16:43

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:

/var/vmail/domain.tld/user

to:

/var/vmail/domain.tld/user/Maildir

e.g. like this for each mailbox:

mkdir /var/vmail/domain.tld/user/Maildir
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.

Bookworm 25th June 2012 03:54

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.

till 25th June 2012 08:30

Quote:

Till - that was done. The main complaint is that the 'upgrade.php' didn't actually get rid of courier.
Thats a script to update ispconfig. If you manually change the base configuration, then you have to ensure that your new setup is compatible with ispconfig and that you uninstalled software that is not required.

Quote:

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.
Never had to do that on any system that I migrated. So you must have done something wrong with your migration.

You might want to take a look at the migration tool that I posted several times already:

http://www.howtoforge.com/forums/sho...80&postcount=3


All times are GMT +2. The time now is 08:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.