New: en_US/howto/sql.create.mail.user.md.
This commit is contained in:
parent
eaeda697ce
commit
1757ef994b
|
@ -1,5 +1,11 @@
|
|||
# SQL: Bulk create mail users
|
||||
|
||||
!!! warning "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](./sql.create.mail.user.html) instead.
|
||||
|
||||
iRedMail ships the shell script `tools/create_mail_user_SQL.sh` to help you
|
||||
create many mail users quickly.
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# SQL: Create new mail user
|
||||
|
||||
!!! attention
|
||||
|
||||
This document is applicable to iRedMail-0.9.6 and later releases.
|
||||
If you're running iRedMail-0.9.5-1 or earlier releases, please check
|
||||
tutorial [SQL: Bulk create new mail users](./sql.bulk.create.mail.users.html)
|
||||
instead.
|
||||
|
||||
iRedMail ships the shell script `tools/create_mail_user_SQL.sh` to help you
|
||||
create new mail user quickly. With some shell scripting trick, it's easy to
|
||||
create many mail users.
|
||||
|
||||
Sample usage:
|
||||
|
||||
* Create the mail domain name `example.com` with iRedAdmin first.
|
||||
* Create a new mail user with the shell script:
|
||||
|
||||
```shell
|
||||
# cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password
|
||||
```
|
||||
|
||||
It will print SQL commands used to create this new user, you can save it to a
|
||||
file, then login to SQL server as root user and import this file. for example:
|
||||
|
||||
* MySQL or MariaDB:
|
||||
|
||||
```shell
|
||||
# cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password > user.sql
|
||||
|
||||
# mysql -uroot -p
|
||||
sql> USE vmail;
|
||||
sql> SOURCE user.sql;
|
||||
```
|
||||
|
||||
* PostgreSQL:
|
||||
|
||||
```
|
||||
# cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password > /tmp/user.sql
|
||||
|
||||
# su - postgres
|
||||
$ psql -d vmail
|
||||
sql> \i output.sql;
|
||||
```
|
||||
|
||||
Don't forget to remove /tmp/user.sql.
|
||||
|
||||
Notes:
|
||||
|
||||
* Password scheme is defined in variable `PASSWORD_SCHEME`, default is `SSHA512`.
|
||||
`BCRYPT` is recommended on FreeBSD and OpenBSD.
|
||||
* Per-user mailbox quota is defined in variable `DEFAULT_QUOTA`, default is
|
||||
`1024` (1 GB).
|
||||
* Maildir path is hashed like `domain.ltd/u/s/e/username-20150929`. If you
|
||||
prefer `domain.ltd/username/`, please set `MAILDIR_STYLE='normal'`.
|
||||
* Mailbox storage path is defined in variable `STORAGE_BASE_DIRECTORY`, default
|
||||
is `/var/vmail/vmail1`.
|
||||
|
||||
## See Also
|
||||
|
||||
* [LDAP: Bulk create mail users](./ldap.bulk.create.mail.users.html)
|
|
@ -131,9 +131,9 @@
|
|||
<li><a href="restrict.mail.user.to.login.from.specified.ip.or.networks.html">Restrict mail user to login from specified IP addresses or networks</a></li>
|
||||
<li><a href="send.out.email.from.specified.ip.addresses.html">Send out email from specified IP address</a></li>
|
||||
<li><a href="sign.disclaimer.html">Sign disclaimer on outgoing mails</a></li>
|
||||
<li><a href="sql.bulk.create.mail.users.html">SQL: Bulk create mail users</a></li>
|
||||
<li><a href="sql.create.catch-all.html">SQL: Add per-domain catch-all account</a></li>
|
||||
<li><a href="sql.create.mail.alias.html">SQL: Add a mail alias account</a></li>
|
||||
<li><a href="sql.create.mail.user.html">SQL: Create new mail user</a></li>
|
||||
<li><a href="sql.user.mail.forwarding.html">SQL: User mail forwarding</a></li>
|
||||
<li><a href="store.spamassassin.bayes.in.sql.html">Store SpamAssassin bayes in SQL</a></li>
|
||||
<li><a href="use.a.bought.ssl.certificate.html">Use a bought SSL certificate</a></li>
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
<span>iRedMail</span>
|
||||
</a>
|
||||
// <a href="./index.html">Document Index</a></div><h1 id="sql-bulk-create-mail-users">SQL: Bulk create mail users</h1>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Deprecated</p>
|
||||
<p>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
|
||||
<a href="./sql.create.mail.user.html">SQL: Create new mail user</a> instead.</p>
|
||||
</div>
|
||||
<p>iRedMail ships the shell script <code>tools/create_mail_user_SQL.sh</code> to help you
|
||||
create many mail users quickly.</p>
|
||||
<p>Sample usage:</p>
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>SQL: Create new mail user</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<a href="/index.html" target="_blank">
|
||||
<img alt="iRedMail web site"
|
||||
src="./images/logo-iredmail.png"
|
||||
style="vertical-align: middle; height: 30px;"
|
||||
/>
|
||||
<span>iRedMail</span>
|
||||
</a>
|
||||
// <a href="./index.html">Document Index</a></div><h1 id="sql-create-new-mail-user">SQL: Create new mail user</h1>
|
||||
<div class="admonition attention">
|
||||
<p class="admonition-title">Attention</p>
|
||||
<p>This document is applicable to iRedMail-0.9.6 and later releases.
|
||||
If you're running iRedMail-0.9.5-1 or earlier releases, please check
|
||||
tutorial <a href="./sql.bulk.create.mail.users.html">SQL: Bulk create new mail users</a>
|
||||
instead.</p>
|
||||
</div>
|
||||
<p>iRedMail ships the shell script <code>tools/create_mail_user_SQL.sh</code> to help you
|
||||
create new mail user quickly. With some shell scripting trick, it's easy to
|
||||
create many mail users.</p>
|
||||
<p>Sample usage:</p>
|
||||
<ul>
|
||||
<li>Create the mail domain name <code>example.com</code> with iRedAdmin first.</li>
|
||||
<li>Create a new mail user with the shell script:</li>
|
||||
</ul>
|
||||
<pre><code class="shell"># cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password
|
||||
</code></pre>
|
||||
|
||||
<p>It will print SQL commands used to create this new user, you can save it to a
|
||||
file, then login to SQL server as root user and import this file. for example:</p>
|
||||
<ul>
|
||||
<li>MySQL or MariaDB:</li>
|
||||
</ul>
|
||||
<pre><code class="shell"># cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password > user.sql
|
||||
|
||||
# mysql -uroot -p
|
||||
sql> USE vmail;
|
||||
sql> SOURCE user.sql;
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>PostgreSQL:</li>
|
||||
</ul>
|
||||
<pre><code># cd iRedMail-0.9.6/tools/
|
||||
# bash create_mail_user_SQL.sh user1@example.com plain_password > /tmp/user.sql
|
||||
|
||||
# su - postgres
|
||||
$ psql -d vmail
|
||||
sql> \i output.sql;
|
||||
</code></pre>
|
||||
|
||||
<p>Don't forget to remove /tmp/user.sql.</p>
|
||||
<p>Notes:</p>
|
||||
<ul>
|
||||
<li>Password scheme is defined in variable <code>PASSWORD_SCHEME</code>, default is <code>SSHA512</code>.
|
||||
<code>BCRYPT</code> is recommended on FreeBSD and OpenBSD.</li>
|
||||
<li>Per-user mailbox quota is defined in variable <code>DEFAULT_QUOTA</code>, default is
|
||||
<code>1024</code> (1 GB).</li>
|
||||
<li>Maildir path is hashed like <code>domain.ltd/u/s/e/username-20150929</code>. If you
|
||||
prefer <code>domain.ltd/username/</code>, please set <code>MAILDIR_STYLE='normal'</code>.</li>
|
||||
<li>Mailbox storage path is defined in variable <code>STORAGE_BASE_DIRECTORY</code>, default
|
||||
is <code>/var/vmail/vmail1</code>.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="./ldap.bulk.create.mail.users.html">LDAP: Bulk create mail users</a></li>
|
||||
</ul><div class="footer">
|
||||
<p style="text-align: center; color: grey;">All documents are available in <a href="https://bitbucket.org/zhb/iredmail-docs/src">BitBucket repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">download the latest version</a> for offline reading. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-3293801-21', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
</body></html>
|
Loading…
Reference in New Issue