1

Topic: Script to create domain and users on Server

==== Required information ====
- iRedMail version: iredmail 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Linux/BSD distribution name and version: CentOS release 6.5 (Final)
- Related log if you're reporting an issue:
====

Hi ,

We are developing ERP application so just want to add domain and user from script on Email Server. Can we create same thing as we are creating using admin panel of iredmail

----

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

2

Re: Script to create domain and users on Server

Sure. Just insert necessary SQL records.
You can try this:

1) Add a mail domain with  iRedAdmin, then check new record in SQL table "vmail.domain".
2) Add a mail user with iRedAdmin, then check new record in both SQL tables: vmail.mailbox, vmail.alias. Or, you can refer to our script shipped in iRedMail: iRedMail-0.8.7/tools/create_mail_user_*.

3 (edited by reetikavyas28 2014-08-08 15:58:38)

Re: Script to create domain and users on Server

ZhangHuangbin wrote:

Sure. Just insert necessary SQL records.
You can try this:

1) Add a mail domain with  iRedAdmin, then check new record in SQL table "vmail.domain".
2) Add a mail user with iRedAdmin, then check new record in both SQL tables: vmail.mailbox, vmail.alias. Or, you can refer to our script shipped in iRedMail: iRedMail-0.8.7/tools/create_mail_user_*.


Hi,

How do we fire these insert statments , our ERP application(PHP) on another server, is there any script or function so that we can call the script in our php application. I need to insert user and domain from ERP application to Iredmail Server

4

Re: Script to create domain and users on Server

Check script shipped in iRedMail for example: iRedMail-0.8.7/tools/create_mail_user_SQL.sh.

5

Re: Script to create domain and users on Server

Hi,

How do we fire these insert statments , our ERP application(PHP) on another server, is there any script or function so that we can call the script in our php application. I need to insert user and domain from ERP application to Iredmail Server