Sync (DRAFT) iRedMail upgrade tutorial for 1.4.1.
This commit is contained in:
parent
1c63ba846e
commit
560ad1f6ba
|
@ -83,3 +83,101 @@ You're free to define more ban rules to fit your own needs.
|
|||
|
||||
USE amavisd;
|
||||
UPDATE policy SET banned_rulenames="ALLOW_MS_WORD,ALLOW_MS_EXCEL" WHERE policy_name="user@domain.com";
|
||||
|
||||
## For OpenLDAP backend
|
||||
|
||||
### Add new attribute/value pairs for per-user SOGo webmail / calendar / activesync service control
|
||||
|
||||
iRedMail-1.4.1 improves SOGo config file and it's able to enable or disable
|
||||
per-user SOGo webmail, calendar, activesync services with 3 new LDAP
|
||||
attribute/value pairs:
|
||||
|
||||
- `enabledService=sogowebmail`
|
||||
- `enabledService=sogocalendar`
|
||||
- `enabledService=sogoactivesync`
|
||||
|
||||
The old `enabledService=sogo` is still used to enable or disable whole SOGo
|
||||
access.
|
||||
|
||||
* Download script used to update existing mail accounts:
|
||||
|
||||
```
|
||||
cd /root/
|
||||
wget https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/update-ldap.py
|
||||
```
|
||||
|
||||
* Open downloaded file `update-ldap.py`, set LDAP server related settings in
|
||||
this file:
|
||||
|
||||
You can find required LDAP credential in iRedAdmin config file
|
||||
(`/opt/www/iredadmin/settings.py`), using either
|
||||
`cn=Manager,dc=xx,dc=xx` or `cn=vmailadmin,dc=xx,dc=xx` as bind dn is ok.
|
||||
|
||||
```
|
||||
# Part of file: updateLDAPValues_099_to_1.py
|
||||
|
||||
uri = 'ldap://127.0.0.1:389'
|
||||
basedn = 'o=domains,dc=example,dc=com'
|
||||
bind_dn = 'cn=vmailadmin,dc=example,dc=com'
|
||||
bind_pw = 'passwd'
|
||||
```
|
||||
|
||||
* Execute this script with Python-3 to update LDAP data:
|
||||
|
||||
```
|
||||
# python3 update-ldap.py
|
||||
```
|
||||
|
||||
## For MySQL and MariaDB backends
|
||||
|
||||
### Add new SQL columns in `vmail.mailbox` table
|
||||
|
||||
iRedMail-1.4.1 introduces 3 new columns used to enable or disable per-user
|
||||
SOGo webmail, calendar and activesync services:
|
||||
|
||||
- `enablesogowebmail`
|
||||
- `enablesogocalendar`
|
||||
- `enablesogoactivesync`
|
||||
|
||||
Download plain SQL file used to update SQL table, then import it as
|
||||
MySQL root user (Please run commands below as `root` user):
|
||||
|
||||
```
|
||||
wget -O /tmp/iredmail.mysql https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/iredmail.mysql
|
||||
mysql vmail < /tmp/iredmail.mysql
|
||||
rm -f /tmp/iredmail.mysql
|
||||
```
|
||||
|
||||
## For PostgreSQL backend
|
||||
|
||||
### Add new SQL columns in `vmail.mailbox` table
|
||||
|
||||
iRedMail-1.4.1 introduces 3 new columns used to enable or disable per-user
|
||||
SOGo webmail, calendar and activesync services:
|
||||
|
||||
- `enablesogowebmail`
|
||||
- `enablesogocalendar`
|
||||
- `enablesogoactivesync`
|
||||
|
||||
Download plain SQL file used to update SQL table:
|
||||
|
||||
```
|
||||
wget -O /tmp/iredmail.pgsql https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/iredmail.pgsql
|
||||
chmod +r /tmp/iredmail.pgsql
|
||||
```
|
||||
|
||||
* Connect to PostgreSQL server as `postgres` user and import the SQL file:
|
||||
* on Linux, it's `postgres` user
|
||||
* on FreeBSD, it's `pgsql` user
|
||||
* on OpenBSD, it's `_postgresql` user
|
||||
|
||||
```
|
||||
su - postgres
|
||||
psql -d vmail < /tmp/iredmail.pgsql
|
||||
```
|
||||
|
||||
* Remove downloaded file:
|
||||
|
||||
```
|
||||
rm -f /tmp/iredmail.pgsql
|
||||
```
|
||||
|
|
|
@ -28,6 +28,18 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#for-openldap-backend">For OpenLDAP backend</a><ul>
|
||||
<li><a href="#add-new-attributevalue-pairs-for-per-user-sogo-webmail-calendar-activesync-service-control">Add new attribute/value pairs for per-user SOGo webmail / calendar / activesync service control</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#for-mysql-and-mariadb-backends">For MySQL and MariaDB backends</a><ul>
|
||||
<li><a href="#add-new-sql-columns-in-vmailmailbox-table">Add new SQL columns in vmail.mailbox table</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#for-postgresql-backend">For PostgreSQL backend</a><ul>
|
||||
<li><a href="#add-new-sql-columns-in-vmailmailbox-table_1">Add new SQL columns in vmail.mailbox table</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -106,6 +118,95 @@ commands below to achieve it (Note: we use MySQL for example):</p>
|
|||
<pre><code>USE amavisd;
|
||||
UPDATE policy SET banned_rulenames="ALLOW_MS_WORD,ALLOW_MS_EXCEL" WHERE policy_name="user@domain.com";
|
||||
</code></pre>
|
||||
</div><div class="footer">
|
||||
</div>
|
||||
<h2 id="for-openldap-backend">For OpenLDAP backend</h2>
|
||||
<h3 id="add-new-attributevalue-pairs-for-per-user-sogo-webmail-calendar-activesync-service-control">Add new attribute/value pairs for per-user SOGo webmail / calendar / activesync service control</h3>
|
||||
<p>iRedMail-1.4.1 improves SOGo config file and it's able to enable or disable
|
||||
per-user SOGo webmail, calendar, activesync services with 3 new LDAP
|
||||
attribute/value pairs:</p>
|
||||
<ul>
|
||||
<li><code>enabledService=sogowebmail</code></li>
|
||||
<li><code>enabledService=sogocalendar</code></li>
|
||||
<li><code>enabledService=sogoactivesync</code></li>
|
||||
</ul>
|
||||
<p>The old <code>enabledService=sogo</code> is still used to enable or disable whole SOGo
|
||||
access.</p>
|
||||
<ul>
|
||||
<li>Download script used to update existing mail accounts:</li>
|
||||
</ul>
|
||||
<pre><code>cd /root/
|
||||
wget https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/update-ldap.py
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Open downloaded file <code>update-ldap.py</code>, set LDAP server related settings in
|
||||
this file:</p>
|
||||
<p>You can find required LDAP credential in iRedAdmin config file
|
||||
(<code>/opt/www/iredadmin/settings.py</code>), using either
|
||||
<code>cn=Manager,dc=xx,dc=xx</code> or <code>cn=vmailadmin,dc=xx,dc=xx</code> as bind dn is ok.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<pre><code># Part of file: updateLDAPValues_099_to_1.py
|
||||
|
||||
uri = 'ldap://127.0.0.1:389'
|
||||
basedn = 'o=domains,dc=example,dc=com'
|
||||
bind_dn = 'cn=vmailadmin,dc=example,dc=com'
|
||||
bind_pw = 'passwd'
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Execute this script with Python-3 to update LDAP data:</li>
|
||||
</ul>
|
||||
<pre><code># python3 update-ldap.py
|
||||
</code></pre>
|
||||
|
||||
<h2 id="for-mysql-and-mariadb-backends">For MySQL and MariaDB backends</h2>
|
||||
<h3 id="add-new-sql-columns-in-vmailmailbox-table">Add new SQL columns in <code>vmail.mailbox</code> table</h3>
|
||||
<p>iRedMail-1.4.1 introduces 3 new columns used to enable or disable per-user
|
||||
SOGo webmail, calendar and activesync services:</p>
|
||||
<ul>
|
||||
<li><code>enablesogowebmail</code></li>
|
||||
<li><code>enablesogocalendar</code></li>
|
||||
<li><code>enablesogoactivesync</code></li>
|
||||
</ul>
|
||||
<p>Download plain SQL file used to update SQL table, then import it as
|
||||
MySQL root user (Please run commands below as <code>root</code> user):</p>
|
||||
<pre><code>wget -O /tmp/iredmail.mysql https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/iredmail.mysql
|
||||
mysql vmail < /tmp/iredmail.mysql
|
||||
rm -f /tmp/iredmail.mysql
|
||||
</code></pre>
|
||||
|
||||
<h2 id="for-postgresql-backend">For PostgreSQL backend</h2>
|
||||
<h3 id="add-new-sql-columns-in-vmailmailbox-table_1">Add new SQL columns in <code>vmail.mailbox</code> table</h3>
|
||||
<p>iRedMail-1.4.1 introduces 3 new columns used to enable or disable per-user
|
||||
SOGo webmail, calendar and activesync services:</p>
|
||||
<ul>
|
||||
<li><code>enablesogowebmail</code></li>
|
||||
<li><code>enablesogocalendar</code></li>
|
||||
<li><code>enablesogoactivesync</code></li>
|
||||
</ul>
|
||||
<p>Download plain SQL file used to update SQL table:</p>
|
||||
<pre><code>wget -O /tmp/iredmail.pgsql https://github.com/iredmail/iRedMail/raw/1.4.1/update/1.4.1/iredmail.pgsql
|
||||
chmod +r /tmp/iredmail.pgsql
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Connect to PostgreSQL server as <code>postgres</code> user and import the SQL file:<ul>
|
||||
<li>on Linux, it's <code>postgres</code> user</li>
|
||||
<li>on FreeBSD, it's <code>pgsql</code> user</li>
|
||||
<li>on OpenBSD, it's <code>_postgresql</code> user</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<pre><code>su - postgres
|
||||
psql -d vmail < /tmp/iredmail.pgsql
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>Remove downloaded file:</li>
|
||||
</ul>
|
||||
<pre><code>rm -f /tmp/iredmail.pgsql
|
||||
</code></pre><div class="footer">
|
||||
<p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub 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://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
|
||||
</div></body></html>
|
Loading…
Reference in New Issue