The instructions below will backup all users and emails. This will NOT copy over ezmlm lists. This may happen in future releases.

On the old mailserver:


# ln -s /usr/bin/tar /bin/tar
# mkdir /home/backups/ /home/backups/vpopusers
# cd /home/backups/
# fetch http://freebsdrocks.net/files/tarballs/vpopmail_server_import_export.tgz
# tar zxvf vpopmail_server_import_export.tgz
# cd import
# ./backupemail.sh > /home/backups/vpopusers/output
# ./CreateVPOPUserBK.sh

This places all the backups of vpopmail into the /home/backups/vpopusers dir
before you scp this folder over to the new server, make SURE you chown the user:group to the user you will scp it over to

On the new mailserver run the following commands but before you import the users it would be a good idea to disable validrcptto in qmail-smtpd/run and then restart qmail. Import the users and then enable validrcptto and then rebuild the validrcptto.cdb file as you did in my vpopmail instructions.


# mkdir /home/backups/ /home/backups/vpopusers
# ln -s /usr/bin/tar /bin/tar
# cd /home/backups/
# fetch http://freebsdrocks.net/files/tarballs/vpopmail_server_import_export.tgz
# tar zxvf vpopmail_server_import_export.tgz
# cd /home/backups/
# scp -r user@oldmailserver:/home/backups/vpopusers .
# cd /home/backups/vpopusers
# chmod 755 output
# ./output
# cd /home/backups/export/

Before you run the import it's a good idea to disable vpopmail within the qmail-smtpd/run script. Edit /service/qmail-smtpd/run and then comment out the following lines:


VALIDRCPTTO_CDB="$VQ/control/validrcptto.cdb"
#VALIDRCPTTO_LOG=2

Now restart the qmail-smtpd service.


# svc -t /service/qmail-smtpd/

Not run the following


# ./RestoreTheUserDir.sh

Depending on how many domains/users there are, the next few commands can take several hours. Please plan accordingly.