Adding Email Users


I wanted to do some modification of your ehcp, I understand that when adding new email user data will be inserted into the MySQL database, and I also understand that some changes has to be made in The IMAP server to make the email works.

Will u tell me where or in which file of your ehcp u do all this changes. I have gone thru your classapp.php file but I could not see where this is done. Can u guide me please.

see u

take new file
look at install_lib.php
at function installmailserver
everything is written there.

You cannot find those in classapp.php because, it is used after installation, but the email changes to system is done while installing ehcp.

it is also similar in current version of ehcp, but in the newer file above, it is more clean.

I am expecting to get instructions in the next day or so to add about 250 email users to a VH. I need to be prepared for this because I will have to complete the task in a matter of a few days. In that time I will have to set up the new server, get the domain, test, etc. etc.

What I want to do :-

Firstly, I would like to add the users from a file which contain names of clients of managed web hosting services along with the windows web hosting services and now i am thinking to add here a list of people who are using cheap linux hosting services.

Secondly, I would like to force a change of password the first time a user picks up email which might be by POP or webmail.

I can't see any way of bulk adding or forcing password change in the process.

Anybody have any thoughts please.

  • ehcp uses mysql tables fully to handle emails, so, you can add/remove/reset pass by manipulating mysql->ehcp db->emailusers table..
  • I have no idea about "force pass change" , but you can reset pass, find that user in emailusers table, edit the row for that user, use encrypt function with salt 'ehcp', or use following sql:
    update emailusers set password=encrypt('newpass','ehcp') where email='';
  • To bulk add emails, use similar sql:
    "insert into emailusers (panelusername,domainname,mailusername,email,password,quota,status) values ('admin','','info','',encrypt('password','ehcp'),'1000000','active');
  • after executing above sql, for each email, you must also send them an initial welcom email (in a php script or bash) to let system setup email directories.. otherwise, users will not be able to login..
  • You can use some programs (openoffice spreadsheet or even bash) to build up this sql from your text file of all emails..
  • You need to repeat that sql (and send welcome email) for every email user you need to setup..
  • Currently, in ehcp, there is no direct easy way of adding bulk email, but I accept this as a feature request, and I will try in future versions of ehcp... for easy bulk email adding... in fact, since ehcp uses mysql for emails, this is relatively easy..
  • in fact, ehcp can be used in similar way, a base for :

  • dns server frontend/manager/synchronizer
  • apache frontend/manager/synchronizer
  • ftp frontend/manager/synchronizer
  • because ehcp manages all operations through information in mysql tables,