December 6, 2007

 Migrating from Surgemail to @Mail

@Mail now supports migrations from the SurgeMail Webmail platform. The migration script can import previous Address-book data, Distribution lists, and Tasks from the flat-file database used by Surgemail.

The migration is seamless and all existing user data is available once logged into @Mail.

To use the migration script download a copy at:

This is provided in @Mail versions 5.08+ and greater by default.

Extract the migration scripts under:


To execute:

cd /path/to/atmail/modules/
php migrate-surgemail.php /path/to/surgemail.csv

Where surgemail.csv is a list of users and the data directory location of user data.

The format of the CSV the file is:,/path/to/surgemail/user/

To find the database location of a user under Surgemail you can use the inbuilt function to extract the database location:

cd /path/to/surgemail/
./webmail.cgi -show_path user@domain

Which will return a path similar to:


Use this utility to compile a CSV file for importing into @Mail


Once the script is run it will return each record migrated, for example:

# php migrate-surgemail.php /tmp/test.users
Migrating ben@domain.comReading /var/spool/webmail/workarea/n_y2/a1/user_Pdomain_Icom_Plocalhost/test.abk
Added 'Max Pradella'
Added 'Max Comparotto'
Added 'Marcella Sanna'Adding Group 'TestGroup' > - -

Reading /var/spool/webmail/workarea/n_j7/z3/max_Ipradella_Poipaitalia_Icom_Plocalhost//todo.lst
Added new Task Test migration
Added new Task Do extra work
Added new Task In the future todo
Added new Task A task
SurgeMail Migration complete.

Filed under: Migration,PHP version — info @ 3:13 pm

1 Comment »

  1. Wow! great post. You have done a remarkable job in this piece of writing. It really grabbed my attention and I couldn’t help but to stick with it unless it finished. Keep up the good work.

    Comment by Hector — July 17, 2008 @ 1:09 am

RSS feed for comments on this post. TrackBack URI

Leave a comment