-
Notifications
You must be signed in to change notification settings - Fork 16
Migrating
When building the vpopmail jail in MT6, you will be prompted to set the vpopmail options. The most important choice will be where the user databases are stored. Make sure vpopmail_mysql
on your legacy toaster matches TOASTER_MYSQL
in mail-toaster.conf. Be sure to synchronize the other vpopmail options you had selected previously, especially valias and qmail extensions.
If using MySQL for the vpopmail database, copy over the database from old to new mysql:
ssh old-mail.example.com mysqldump vpopmail | jexec mysql mysql vpopmail
If your vpopmail install is older than 5.4.33 and you used SQL limits, you may need to update the limits
table:
ALTER TABLE `limits` ADD `disable_maildrop` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_spamassassin`;
ALTER TABLE `limits` MODIFY `diskquota` BIGINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `limits` MODIFY `maxmsgcount` BIGINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `limits` MODIFY `defaultquota` BIGINT UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `limits` MODIFY `defaultmaxmsgcount` BIGINT UNSIGNED NOT NULL DEFAULT 0;
Vpopmail installs older than 5.4.18 will also need to run [some of] these queries upon upgrading:
ALTER TABLE `dir_control` CHANGE `domain` `domain` CHAR(96) NOT NULL;
ALTER TABLE `ip_alias_map` CHANGE domain domain CHAR(96) NOT NULL;
ALTER TABLE `lastauth` CHANGE domain domain CHAR(96) NOT NULL;
ALTER TABLE `valias` CHANGE domain domain CHAR(96) NOT NULL;
ALTER TABLE `vlog` CHANGE domain domain CHAR(96) NOT NULL;
ALTER TABLE `vpopmail` CHANGE pw_domain pw_domain CHAR(96) NOT NULL;
ALTER TABLE `limits` CHANGE domain domain CHAR(96) NOT NULL,
ADD `disable_spamassassin` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_smtp`,
ADD `delete_spam` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_spamassassin`;
Rsync over the mail and qmail control files:
export OLDTOASTER="old-mail.example.com"
export RSYNCARGS="-av --delete"
rsync $RSYNCARGS $OLDTOASTER:/usr/local/vpopmail/domains/ /data/vpopmail/domains/
rsync $RSYNCARGS $OLDTOASTER:/var/qmail/control/ /data/vpopmail/qmail-control/
rsync $RSYNCARGS $OLDTOASTER:/var/qmail/users/ /data/vpopmail/qmail-users/
jexec vpopmail /usr/local/bin/qmailctl cdb
In previous versions of Mail-Toaster, the connections from roundcube to dovecot were on localhost. In MT6, roundcube connects to dovecot on (by default) 172.16.15.15. It is necessary to run a query to update the old roundcube users to match their future logins.
jexec mysql mysql -e "UPDATE roundcubemail.users SET mail_host='172.16.15.15' WHERE mail_host='localhost'"
When migrating moderated email lists, it may be necessary to unsub all the existing subscribers and resubscribe them, as well as the moderators. All subscribers can be listed with ezmlm-list dir
and all moderators can be listed with ezmlm-list dir mod
. Then manually remove existing subscribers with rm dir/subscribers/*
and add them back with ezmlm-sub
.
rsync -av $OLDTOASTER/var/spool/squirrelmail/attach/ /data/squirrelmail/attach/
rsync -av $OLDTOASTER:/var/spool/squirrelmail/pref/ /data/squirrelmail/pref/
If the old mail server is still running Courier IMAP, you'll need to convert your maildirs to Dovecot's format. See the Dovecot wiki migration page.