1 (edited by rodneytrotter 2013-05-18 01:27:14)

Topic: Migrating from another setup - questions

==== Required information ====
- iRedMail version: None as yet!
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 7
- Related log if you're reporting an issue:
====

Hello

I'm looking at migrating an existing email system from an old server (Postfix/Dovecot) to iRedmail (and probably buying iRedMail Pro). 

All the existing emails are stored in a Maildir format and in the same directory structure that iRedmail uses - so I know it's just a matter of copying files and setting permissions in order to move these over.

How can I move the user information (ie email addresses, domains, passwords, aliases)?  The passwords are stored currently as an MD5 hash.  I can export this information in any format.

How can I import these into iRedmail - is there a quick way of doing it? 

Thank you in advance

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Migrating from another setup - questions

rodneytrotter wrote:

How can I move the user information (ie email addresses, domains, passwords, aliases)?  The passwords are stored currently as an MD5 hash.  I can export this information in any format.

*) Check SQL structure used by iRedMail: https://bitbucket.org/zhb/iredmail/src/ … mail.mysql
*) Check shell script shipped by iRedMail, used to create mail user: https://bitbucket.org/zhb/iredmail/src/ … ser_SQL.sh
*) You can copy MD5 password hashes to SQL column `mailbox.password` directly.

rodneytrotter wrote:

How can I import these into iRedmail - is there a quick way of doing it?

*) Convert mail users to correct SQL records, then import them.
*) iRedMail stores maildir path in 3 SQL columns in table `vmail.mailbox`: storagebasedirectory, storagenode, maildir. concatenate them then you get the final maildir path. For example:

storagebasedirectory=/var/vmail
storagenode=vmail1
maildir=domain.ltd/username

# Use SQL function CONCAT() to get the final maildir path.
# This is how we used them in iRedMail by default.
#SELECT CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) ...

3

Re: Migrating from another setup - questions

Thank you very much, I will have a close look at these - am going to install iRedMail shortly as a test.