Iredmail provides a script that allows users to quickly add users
MYSQL
You can edit the create_mail_user_mysql.sh, modify the default value, and if you install the stored path of the modified message, then you must modify the script's Storage_base_directory
Create Http://www.aliyun.com/zixun/aggregation/18687.html "> The default password for the mailbox user is the same as the username
# CD iredmail-0.5.1/tools/
# bash create_mail_user_mysql.sh exmple.com user1 user2 User3
This time, the Output.sql file is created
# mysql-uroot-p
mysql> use Vmail;
Mysql> Source/path/to/output.sql;
LDAP
Using the create_mail_user_openldap.sh script, you can quickly create LDAP mail users and we need to modify the script
The default password for creating a mailbox user is the same as the user name
storage_base_directory= "/var/vmail/vmail01" #如果你安装的时候修改的邮件的存储路径
ldap_suffix= "dc=iredmail,dc=org" #你的ldap SUFFIX
bindpw= ' passwd ' #ldap管理员cn =manager password
Run script, create user
# bash create_mail_user_openldap.sh example.com user1 user2