Deprecated
This document is applicable to iRedMail-0.9.5-1 and earlier releases. If you're running iRedMail-0.9.6 or newer releases, please check tutorial SQL: Create new mail user instead.
iRedMail ships the shell script tools/create_mail_user_SQL.sh
to help you
create many mail users quickly.
Sample usage:
example.com
with iRedAdmin first.# cd iRedMail-0.9.4/tools/
# bash create_mail_user_SQL.sh example.com user1 user2 user3
It will generate the plain SQL file output.sql
in current directory, please
login to SQL server as root user, then import it. for example:
# mysql -uroot -p
sql> USE vmail;
sql> SOURCE output.sql;
# cp output.sql /tmp
# chmod +r /tmp/output.sql
# su - postgres
$ psql -d vmail
sql> \i output.sql;
Notes:
DEFAULT_PASSWD
with new password and set USE_DEFAULT_PASSWD='YES'
.PASSWORD_SCHEME
, default is SSHA512
.
BCRYPT
is recommended on FreeBSD and OpenBSD.DEFAULT_QUOTA
, default is
1024
(1024 MB).domain.ltd/u/s/e/username-20150929
. If you
prefer domain.ltd/username/
, please set MAILDIR_STYLE='normal'
.STORAGE_BASE_DIRECTORY
, default
is /var/vmail/vmail1
.