Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
email migration from another system to ehcp/mysql emails
#1
I assume that you have list of usernames as plaintext
for example:

<code>user11@domain1.com
user12@domain1.com
user21@domain2.com
user22@domain2.com
user23@domain2.com

and so on.
save this info to a file named emailusers.txt

Then, on linux console, give following command:

<code>cat emailusers.txt | awk -F "@" '{print "insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values(\x27admin\x27,\x27"$2"\x27,\x27"$1"\x27,encrypt(\x27123456\x27,\x27ehcp\x27),\x27"$0"\x27,10000000,\x27active\x27);"}' > emailsql.sql

This will write a file named emailsql.sql in same dir.

The contents of that file should be like:
<code>insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values('admin','domain1.com','user11',encrypt('123456','ehcp'),'user11@domain1.com',10000000,'active');
insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values('admin','domain1.com','user12',encrypt('123456','ehcp'),'user12@domain1.com',10000000,'active');
insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values('admin','domain2.com','user21',encrypt('123456','ehcp'),'user21@domain2.com',10000000,'active');
insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values('admin','domain2.com','user22',encrypt('123456','ehcp'),'user22@domain2.com',10000000,'active');
insert into emailusers (panelusername,domainname,mailusername,password,email,quota,status)values('admin','domain2.com','user23',encrypt('123456','ehcp'),'user23@domain2.com',10000000,'active');


Now, copy&paste contents of that file into your mysql, using phpmyadmin or mysql console, in ehcp db.



That way, users above will be added to your ehcp mysql database, users will be able to connect using default password of 123456



Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#2
This thing is not enought for IMAP server which required also creation of mail directory in /home/vmail

There should also be:
mkdir /home/vmail/"$2";
mkdir /home/vmail/"$2"/"$1";
mkdir /home/vmail/"$2"/"$1"/cur;
mkdir /home/vmail/"$2"/"$1"/new;
mkdir /home/vmail/"$2"/"$1"/tmp;
foreach email address, chmod -R 700 /home/vmail, chown -R vmail:vmail /home/vmail

ERROR: Connection dropped by IMAP server.

Thanks,
Razvan

PS: Also, maybe the panelusername must be the domain name in the case where a domain is created not under panel user Smile but this is not a problem

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#3
now, latest upcoming version 0.29.13 has bulk add email feature.
you write emails like:
email1@domain1.com:password1
email2@domain2.com:password2

and it adds these emails.

Restored from old drupal forum, for user uid:3085 username:avra911
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping