Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WebFaction-to-Opalstack email migration

First, contact WebFaction support and tell them you need your email archive. They'll know what to do.

Next, create an API token:

Next, create a shell user on your Opalstack account and then log in to your server via SSH:

In your SSH session, run the following commands to get your email migration config:

mkdir -p ~/migration/email
cd ~/migration/email
cp /opt/app_migrators/wf_generic_email/config-template.ini email.ini

Next, edit email.ini from the last step to put in your Opalstack account info and token, your WebFaction account info, and the details for the domains that you want to migrate.

Once that's done, run the following commands:

wfmigrate email ./email.ini --mode simulate
# and then if no errors are reported
wfmigrate email ./email.ini --mode do

At this point your mailboxes and email addresses are created here at Opalstack, but your messages are still at WF. To migrate the messages, first confirm with WF that your archive is ready, then go back to your SSH session and run the following:

# this first step will take a while if you have a lot of email
rsync -paz --info=progress2 ~/
cd ~/wf_archive_delivery
tar zxf mailboxes.tar.gz

# prepare the migration config
mkdir -p ~/migrations/email
cd ~/migrations/email
cp /opt/app_migrators/wf_generic_maildir/config-template.ini maildir.ini

# edit maildir.ini to configure the migration. you can get the mailbox names and 
# password from created_mailuser_password.ini which was generated by the first
# half of the migration. 

# then...
wfmigrate email-data ./maildir.ini --mode simulate

# and then if all goes well...
while ! wfmigrate email-data maildir.ini --mode do; do sleep 5; done

And that's it!

if you have sites to migrate also the migrator can handle that as well, details are at: HOWTO migrate stuff automatically from WebFaction! - Opalstack Community Forum

Once you've migrated everything then you can point your domains at Opalstack: Pointing your domain at Opalstack

After you've done that and DNS has propagated you can cancel your account at WebFaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment