New: upgrade.iredmail.1.4.1-1.4.2.html.

This commit is contained in:
Zhang Huangbin 2021-09-13 11:13:26 +08:00
parent 4f9ff792dd
commit 798e37b699
6 changed files with 385 additions and 2 deletions

View File

@ -146,7 +146,7 @@ service slapd restart
```
cd /tmp
ftp https://github.com/iredmail/iRedMail/raw/1.0/samples/iredmail/iredmail.schema
ftp https://github.com/iredmail/iRedMail/raw/1.4.0/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
rcctl restart slapd

View File

@ -0,0 +1,176 @@
# Upgrade iRedMail from 1.4.1 to 1.4.2
[TOC]
!!! note "Paid Remote Upgrade Support"
We offer remote upgrade support if you don't want to get your hands dirty,
check [the details](https://www.iredmail.org/support.html) and
[contact us](https://www.iredmail.org/contact.html).
## ChangeLog
* Sep 13, 2021: Initial release.
## General (All backends should apply these changes)
### Update `/etc/iredmail-release` with new iRedMail version number
iRedMail stores the release version in `/etc/iredmail-release` after
installation, it's recommended to update this file after you upgraded iRedMail,
so that you can know which version of iRedMail you're running. For example:
```
1.4.2
```
## For OpenLDAP backend
### Remove unused LDAP attributes
Few LDAP attributes in `iredmail.schema` file are not used since day one, it's
time to remove them:
- `lastLoginDate`
- `lastLoginIP`
- `lastLoginProtocol`
Download the latest iRedMail LDAP schema file
* On RHEL/CentOS:
```
wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
service slapd restart
```
* On Debian/Ubuntu:
```
wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/ldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/ldap/schema/
service slapd restart
```
* On FreeBSD:
```
wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /usr/local/etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
service slapd restart
```
* On OpenBSD:
> Note: if you're running ldapd as LDAP server, the schema directory is
> `/etc/ldap`, and service name is `ldapd`.
```
cd /tmp
ftp https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
rcctl restart slapd
```
## For MySQL and MariaDB backends
### Fix incorrect SQL column types in `vmail.mailbox` tables
iRedMail-1.4.1 introduced 3 new columns used to enable or disable per-user
SOGo webmail, calendar and activesync services, but they were set to improper
column `CHAR(1)` because SOGo doesn't support it, we will change them to
`VARCHAR(1)`:
- `enablesogowebmail`
- `enablesogocalendar`
- `enablesogoactivesync`
Please 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.2/update/1.4.2/iredmail.mysql
mysql vmail < /tmp/iredmail.mysql
rm -f /tmp/iredmail.mysql
```
### SOGo: Re-create SQL VIEW and update config file
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/sogo.mysql https://github.com/iredmail/iRedMail/raw/1.4.2/update/1.4.2/sogo.mysql
mysql sogo < /tmp/sogo.mysql
rm -f /tmp/sogo.mysql
```
## For PostgreSQL backend
### Fix incorrect SQL column types in `vmail.mailbox` tables
iRedMail-1.4.1 introduced 3 new columns used to enable or disable per-user
SOGo webmail, calendar and activesync services, but they were set to improper
column `CHAR(1)` because SOGo doesn't support it, we will change them to
`VARCHAR(1)`:
- `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.2/update/1.4.2/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
```
### SOGo: Re-create SQL VIEW and update config file
Download plain SQL file used to update SQL table:
```
wget -O /tmp/sogo.pgsql https://github.com/iredmail/iRedMail/raw/1.4.2/update/1.4.2/sogo.pgsql
chmod +r /tmp/sogo.pgsql
```
Please open file `/tmp/sogo.pgsql`, replace string `VMAIL_DB_BIND_PASSWD` by
the real password of SQL user `vmail`. You can find the password in any file
under `/etc/postfix/pgsql/`.
After updated `/tmp/sogo.pgsql`, please 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 sogo < /tmp/sogo.pgsql
```
* Remove downloaded file:
```
rm -f /tmp/sogo.pgsql
```

View File

@ -36,6 +36,7 @@
Release Notes | Date | Upgrade tutorial | Comment
---|---|---|---
[1.4.2](https://forum.iredmail.org/) | Sep 13, 2021 | [Upgrade from iRedMail-1.4.1](./upgrade.iredmail.1.4.1-1.4.2.html) | Contains SQL/LDAP structure change.
[1.4.1](https://forum.iredmail.org/topic18392.html) | Sep 8, 2021 | [Upgrade from iRedMail-1.4.0](./upgrade.iredmail.1.4.0-1.4.1.html) | Contains SQL/LDAP structure change.
[1.4.0](https://forum.iredmail.org/topic18033.html) | Apr 13, 2021 | [Upgrade from iRedMail-1.3.2](./upgrade.iredmail.1.3.2-1.4.0.html) | Contains SQL/LDAP structure change.
[1.3.2](https://forum.iredmail.org/topic17474.html) | Oct 28, 2020 | [Upgrade from iRedMail-1.3.1](./upgrade.iredmail.1.3.1-1.3.2.html) | Bug fix release.

View File

@ -74,6 +74,12 @@ check <a href="https://www.iredmail.org/support.html">the details</a> and
</thead>
<tbody>
<tr>
<td><a href="https://forum.iredmail.org/">1.4.2</a></td>
<td>Sep 13, 2021</td>
<td><a href="./upgrade.iredmail.1.4.1-1.4.2.html">Upgrade from iRedMail-1.4.1</a></td>
<td>Contains SQL/LDAP structure change.</td>
</tr>
<tr>
<td><a href="https://forum.iredmail.org/topic18392.html">1.4.1</a></td>
<td>Sep 8, 2021</td>
<td><a href="./upgrade.iredmail.1.4.0-1.4.1.html">Upgrade from iRedMail-1.4.0</a></td>

View File

@ -171,7 +171,7 @@ service slapd restart
</li>
</ul>
<pre><code>cd /tmp
ftp https://github.com/iredmail/iRedMail/raw/1.0/samples/iredmail/iredmail.schema
ftp https://github.com/iredmail/iRedMail/raw/1.4.0/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
rcctl restart slapd

View File

@ -0,0 +1,200 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upgrade iRedMail from 1.4.1 to 1.4.2</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="https://www.iredmail.org" target="_blank">
<img alt="iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-141-to-142">Upgrade iRedMail from 1.4.1 to 1.4.2</h1>
<div class="toc">
<ul>
<li><a href="#upgrade-iredmail-from-141-to-142">Upgrade iRedMail from 1.4.1 to 1.4.2</a><ul>
<li><a href="#changelog">ChangeLog</a></li>
<li><a href="#general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</a><ul>
<li><a href="#update-etciredmail-release-with-new-iredmail-version-number">Update /etc/iredmail-release with new iRedMail version number</a></li>
</ul>
</li>
<li><a href="#for-openldap-backend">For OpenLDAP backend</a><ul>
<li><a href="#remove-unused-ldap-attributes">Remove unused LDAP attributes</a></li>
</ul>
</li>
<li><a href="#for-mysql-and-mariadb-backends">For MySQL and MariaDB backends</a><ul>
<li><a href="#fix-incorrect-sql-column-types-in-vmailmailbox-tables">Fix incorrect SQL column types in vmail.mailbox tables</a></li>
<li><a href="#sogo-re-create-sql-view-and-update-config-file">SOGo: Re-create SQL VIEW and update config file</a></li>
</ul>
</li>
<li><a href="#for-postgresql-backend">For PostgreSQL backend</a><ul>
<li><a href="#fix-incorrect-sql-column-types-in-vmailmailbox-tables_1">Fix incorrect SQL column types in vmail.mailbox tables</a></li>
<li><a href="#sogo-re-create-sql-view-and-update-config-file_1">SOGo: Re-create SQL VIEW and update config file</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="admonition note">
<p class="admonition-title">Paid Remote Upgrade Support</p>
<p>We offer remote upgrade support if you don't want to get your hands dirty,
check <a href="https://www.iredmail.org/support.html">the details</a> and
<a href="https://www.iredmail.org/contact.html">contact us</a>.</p>
</div>
<h2 id="changelog">ChangeLog</h2>
<ul>
<li>Sep 13, 2021: Initial release.</li>
</ul>
<h2 id="general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</h2>
<h3 id="update-etciredmail-release-with-new-iredmail-version-number">Update <code>/etc/iredmail-release</code> with new iRedMail version number</h3>
<p>iRedMail stores the release version in <code>/etc/iredmail-release</code> after
installation, it's recommended to update this file after you upgraded iRedMail,
so that you can know which version of iRedMail you're running. For example:</p>
<pre><code>1.4.2
</code></pre>
<h2 id="for-openldap-backend">For OpenLDAP backend</h2>
<h3 id="remove-unused-ldap-attributes">Remove unused LDAP attributes</h3>
<p>Few LDAP attributes in <code>iredmail.schema</code> file are not used since day one, it's
time to remove them:</p>
<ul>
<li><code>lastLoginDate</code></li>
<li><code>lastLoginIP</code></li>
<li><code>lastLoginProtocol</code></li>
</ul>
<p>Download the latest iRedMail LDAP schema file</p>
<ul>
<li>On RHEL/CentOS:</li>
</ul>
<pre><code>wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
service slapd restart
</code></pre>
<ul>
<li>On Debian/Ubuntu:</li>
</ul>
<pre><code>wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/ldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/ldap/schema/
service slapd restart
</code></pre>
<ul>
<li>On FreeBSD:</li>
</ul>
<pre><code>wget -O /tmp/iredmail.schema https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /usr/local/etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
service slapd restart
</code></pre>
<ul>
<li>
<p>On OpenBSD:</p>
<blockquote>
<p>Note: if you're running ldapd as LDAP server, the schema directory is
<code>/etc/ldap</code>, and service name is <code>ldapd</code>.</p>
</blockquote>
</li>
</ul>
<pre><code>cd /tmp
ftp https://github.com/iredmail/iRedMail/raw/1.4.2/samples/iredmail/iredmail.schema
mv /etc/openldap/schema/iredmail.schema{,.bak}
cp -f /tmp/iredmail.schema /etc/openldap/schema/
rcctl restart slapd
</code></pre>
<h2 id="for-mysql-and-mariadb-backends">For MySQL and MariaDB backends</h2>
<h3 id="fix-incorrect-sql-column-types-in-vmailmailbox-tables">Fix incorrect SQL column types in <code>vmail.mailbox</code> tables</h3>
<p>iRedMail-1.4.1 introduced 3 new columns used to enable or disable per-user
SOGo webmail, calendar and activesync services, but they were set to improper
column <code>CHAR(1)</code> because SOGo doesn't support it, we will change them to
<code>VARCHAR(1)</code>:</p>
<ul>
<li><code>enablesogowebmail</code></li>
<li><code>enablesogocalendar</code></li>
<li><code>enablesogoactivesync</code></li>
</ul>
<p>Please 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.2/update/1.4.2/iredmail.mysql
mysql vmail &lt; /tmp/iredmail.mysql
rm -f /tmp/iredmail.mysql
</code></pre>
<h3 id="sogo-re-create-sql-view-and-update-config-file">SOGo: Re-create SQL VIEW and update config file</h3>
<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/sogo.mysql https://github.com/iredmail/iRedMail/raw/1.4.2/update/1.4.2/sogo.mysql
mysql sogo &lt; /tmp/sogo.mysql
rm -f /tmp/sogo.mysql
</code></pre>
<h2 id="for-postgresql-backend">For PostgreSQL backend</h2>
<h3 id="fix-incorrect-sql-column-types-in-vmailmailbox-tables_1">Fix incorrect SQL column types in <code>vmail.mailbox</code> tables</h3>
<p>iRedMail-1.4.1 introduced 3 new columns used to enable or disable per-user
SOGo webmail, calendar and activesync services, but they were set to improper
column <code>CHAR(1)</code> because SOGo doesn't support it, we will change them to
<code>VARCHAR(1)</code>:</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.2/update/1.4.2/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 &lt; /tmp/iredmail.pgsql
</code></pre>
<ul>
<li>Remove downloaded file:</li>
</ul>
<pre><code>rm -f /tmp/iredmail.pgsql
</code></pre>
<h3 id="sogo-re-create-sql-view-and-update-config-file_1">SOGo: Re-create SQL VIEW and update config file</h3>
<p>Download plain SQL file used to update SQL table:</p>
<pre><code>wget -O /tmp/sogo.pgsql https://github.com/iredmail/iRedMail/raw/1.4.2/update/1.4.2/sogo.pgsql
chmod +r /tmp/sogo.pgsql
</code></pre>
<p>Please open file <code>/tmp/sogo.pgsql</code>, replace string <code>VMAIL_DB_BIND_PASSWD</code> by
the real password of SQL user <code>vmail</code>. You can find the password in any file
under <code>/etc/postfix/pgsql/</code>.</p>
<p>After updated <code>/tmp/sogo.pgsql</code>, please connect to PostgreSQL server as
<code>postgres</code> user and import the SQL file:
<em> on Linux, it's <code>postgres</code> user
</em> on FreeBSD, it's <code>pgsql</code> user
* on OpenBSD, it's <code>_postgresql</code> user</p>
<pre><code>su - postgres
psql -d sogo &lt; /tmp/sogo.pgsql
</code></pre>
<ul>
<li>Remove downloaded file:</li>
</ul>
<pre><code>rm -f /tmp/sogo.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>