Update SQL command used to create SOGo VIEW.

This commit is contained in:
Zhang Huangbin 2016-03-29 23:40:10 +08:00
parent 802f7ec4a0
commit a80c14a26d
4 changed files with 37 additions and 6 deletions

View File

@ -60,11 +60,15 @@ mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password';
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM vmail.mailbox WHERE active=1;
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE enablesogo=1 AND active=1;
```
Note: SOGo will create required SQL tables automatically, we don't need to
create them manually.
!!! note
* SOGo will create required SQL tables automatically, we don't need to
import a SQL template file or create them manually.
* SQL column `mailbox.enablesogo` is available in iRedMail-0.9.5, if you
don't have it, it's safe to remove this SQL condition (`enablesogo=1`).
## Configure SOGo
@ -73,6 +77,11 @@ for you, just replace MySQL username/password in this file, then it's done.
With below config file, SOGo will listen on address `127.0.0.1`, port `20000`.
!!! note
Sample config file below may be out of date, please check the [latest one
in iRedMail source code repository](https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/sogo/sogo.conf).
```
{
// Official SOGo documents:

View File

@ -70,6 +70,11 @@ basedn, bind dn/passwordthen in this file, then it's done.
With below config file, SOGo will listen on address `127.0.0.1`, port `20000`.
!!! note
Sample config file below may be out of date, please check the [latest one
in iRedMail source code repository](https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/sogo/sogo.conf).
```
{
// Official SOGo documents:

View File

@ -83,15 +83,27 @@ mysql> GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password';
mysql> GRANT SELECT ON vmail.mailbox TO sogo@localhost;
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM vmail.mailbox WHERE active=1;
mysql> CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE enablesogo=1 AND active=1;
</code></pre>
<p>Note: SOGo will create required SQL tables automatically, we don't need to
create them manually.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul>
<li>SOGo will create required SQL tables automatically, we don't need to
import a SQL template file or create them manually.</li>
<li>SQL column <code>mailbox.enablesogo</code> is available in iRedMail-0.9.5, if you
don't have it, it's safe to remove this SQL condition (<code>enablesogo=1</code>).</li>
</ul>
</div>
<h2 id="configure-sogo">Configure SOGo</h2>
<p>Default SOGo config file is <code>/etc/sogo/sogo.conf</code>. We have a sample config file
for you, just replace MySQL username/password in this file, then it's done.</p>
<p>With below config file, SOGo will listen on address <code>127.0.0.1</code>, port <code>20000</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Sample config file below may be out of date, please check the <a href="https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/sogo/sogo.conf">latest one
in iRedMail source code repository</a>.</p>
</div>
<pre><code>{
// Official SOGo documents:
// - http://www.sogo.nu/english/support/documentation.html

View File

@ -89,6 +89,11 @@ create them manually.</p>
for you, just replace MySQL username/password for sogo SQL database and LDAP
basedn, bind dn/passwordthen in this file, then it's done.</p>
<p>With below config file, SOGo will listen on address <code>127.0.0.1</code>, port <code>20000</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Sample config file below may be out of date, please check the <a href="https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/sogo/sogo.conf">latest one
in iRedMail source code repository</a>.</p>
</div>
<pre><code>{
// Official SOGo documents:
// - http://www.sogo.nu/english/support/documentation.html