iredmail-doc/en_US/upgrade/0-upgrade.iredmail.1.1-1.2.md

233 lines
6.8 KiB
Markdown
Raw Normal View History

2020-02-28 01:39:32 -06:00
# Upgrade iRedMail from 1.1 to 1.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
2020-04-16 10:48:47 -05:00
* Apr 17, 2020: initial release.
2020-02-28 01:39:32 -06:00
## 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.2
```
2020-04-16 10:48:47 -05:00
### Upgrade iRedAPD (Postfix policy server) to the latest stable release
Please follow below tutorial to upgrade iRedAPD to the latest stable release:
[Upgrade iRedAPD to the latest stable release](./upgrade.iredapd.html)
### Upgrade Roundcube webmail to the latest stable release (1.4.3)
!!! warning "Roundcube 1.4"
Since Roundcube 1.3, at least __PHP 5.4__ is required. If your server is
running PHP 5.3 and cannot upgrade to 5.4, please upgrade Roundcube
the latest 1.2 branch instead.
* [How to upgrade Roundcube](https://github.com/roundcube/roundcubemail/wiki/Upgrade).
### Upgrade netdata to the latest stable release (1.21.1)
If you have netdata installed, you can upgrade it by following this tutorial:
[Upgrade netdata](./upgrade.netdata.html).
2020-03-15 22:29:00 -06:00
### Fixed: mail delivery abort if program 'altermime' is not available
The script `mlmmj-amime-receive` has a bug which may abort mail delivery if
program `altermime` is not available on the system, this update fixes it.
Run commands below to update file `/usr/bin/mlmmj-amime-receive` (Linux) or
`/usr/local/bin/mlmmj-amime-receive` (FreeBSD/OpenBSD):
On Linux:
```
cd /usr/bin/
wget -O mlmmj-amime-receive https://github.com/iredmail/iRedMail/raw/1.2/samples/mlmmj/mlmmj-amime-receive
chown mlmmj:mlmmj mlmmj-amime-receive
chmod 0550 mlmmj-amime-receive
```
On FreeBSD or OpenBSD:
```
cd /usr/local/bin/
wget -O mlmmj-amime-receive https://github.com/iredmail/iRedMail/raw/1.2/samples/mlmmj/mlmmj-amime-receive
chown mlmmj:mlmmj mlmmj-amime-receive
chmod 0550 mlmmj-amime-receive
```
2020-02-28 01:39:32 -06:00
## For OpenLDAP backend
### Improved last login track
In iRedMail-1.0, Dovecot is configured to store user last login time in SQL
database `iredadmin`, but it only tracks either POP3 or IMAP login. In
2020-04-16 10:48:47 -05:00
iRedMail-1.2, it tracks both. Please follow steps below to implement this
improvement.
2020-02-28 01:39:32 -06:00
* Open file `/etc/dovecot/dovecot.conf` (Linux/OpenBSD) or
`/usr/local/etc/dovecot/dovecot.conf` (FreeBSD), find the `last_login_key`
parameter and replace it by below one:
```
last_login_key = last-login/%s/%u/%d
```
* Open file `/etc/dovecot/dovecot-last-login.conf` (Linux/OpenBSD) or
`/usr/local/etc/dovecot/dovecot-last-login.conf` (FreeBSD), __remove__ existing
2020-04-16 10:48:47 -05:00
`map {}` block and __add__ 2 new `map {}` blocks used to track
2020-02-28 01:39:32 -06:00
POP3/IMAP/LMTP/LDA services.
```
map {
pattern = shared/last-login/imap/$user/$domain
table = last_login
value_field = imap
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
pattern = shared/last-login/pop3/$user/$domain
table = last_login
value_field = pop3
value_type = uint
fields {
username = $user
domain = $domain
}
}
```
* Download prepared SQL file used to alter SQL tables:
```
wget -O /root/last_login.mysql https://github.com/iredmail/iRedMail/raw/1.2/update/1.2/last_login.mysql
mysql iredadmin < /root/last_login.mysql
rm -f /root/last_login.mysql
```
* Restarting Dovecot service is required.
2020-03-31 21:41:02 -06:00
### Fixed: can not store mail subject with emoji characters in `amavisd` database
In `amavisd` database, column `msgs.subject` is defined as `VARCHAR(255)`, it
doesn't support emoji characters. Please login to MySQL/MariaDB server as `root`
user or `amavisd` user, then run SQL commands below to fix it:
```
USE amavisd;
ALTER TABLE msgs MODIFY COLUMN subject VARBINARY(255) NOT NULL DEFAULT '';
```
2020-04-16 21:11:01 -05:00
### [OPTIONAL] Fail2ban: Store banned IP addresses in SQL database
If you're running iRedAdmin-Pro, it's very useful to store banned IP addresses
in SQL database, then you can view and manage them with iRedAdmin-Pro directly.
* [Fail2ban: Store banned IP addresses in SQL database](./fail2ban.sql.html)
2020-02-28 01:39:32 -06:00
## For MySQL/MariaDB backends
### Improved last login track
In iRedMail-1.0, Dovecot is configured to store user last login time in SQL
database `iredadmin`, but it only tracks either POP3 or IMAP login. In
2020-04-16 10:48:47 -05:00
iRedMail-1.2, it tracks both. Please follow steps below to implement this
improvement.
2020-02-28 01:39:32 -06:00
* Open file `/etc/dovecot/dovecot.conf` (Linux/OpenBSD) or
`/usr/local/etc/dovecot/dovecot.conf` (FreeBSD), find the `last_login_key`
parameter and replace it by below one:
```
last_login_key = last-login/%s/%u/%d
```
* Open file `/etc/dovecot/dovecot-last-login.conf` (Linux/OpenBSD) or
`/usr/local/etc/dovecot/dovecot-last-login.conf` (FreeBSD), __remove__ existing
2020-04-16 10:48:47 -05:00
`map {}` block and __add__ 2 new `map {}` blocks used to track
2020-02-28 01:39:32 -06:00
POP3/IMAP/LMTP/LDA services.
```
map {
pattern = shared/last-login/imap/$user/$domain
table = last_login
value_field = imap
value_type = uint
fields {
username = $user
domain = $domain
}
}
map {
pattern = shared/last-login/pop3/$user/$domain
table = last_login
value_field = pop3
value_type = uint
fields {
username = $user
domain = $domain
}
}
```
* Download prepared SQL file used to alter SQL tables:
```
wget -O /root/last_login.mysql https://github.com/iredmail/iRedMail/raw/1.2/update/1.2/last_login.mysql
2020-02-28 03:27:13 -06:00
mysql vmail < /root/last_login.mysql
2020-02-28 01:39:32 -06:00
rm -f /root/last_login.mysql
```
* Restarting Dovecot service is required.
2020-03-31 21:41:02 -06:00
### Fixed: can not store mail subject with emoji characters in `amavisd` database
In `amavisd` database, column `msgs.subject` is defined as `VARCHAR(255)`, it
doesn't support emoji characters. Please login to MySQL/MariaDB server as `root`
user or `amavisd` user, then run SQL commands below to fix it:
```
USE amavisd;
ALTER TABLE msgs MODIFY COLUMN subject VARBINARY(255) NOT NULL DEFAULT '';
```
2020-04-16 21:11:01 -05:00
### [OPTIONAL] Fail2ban: Store banned IP addresses in SQL database
If you're running iRedAdmin-Pro, it's very useful to store banned IP addresses
in SQL database, then you can view and manage them with iRedAdmin-Pro directly.
* [Fail2ban: Store banned IP addresses in SQL database](./fail2ban.sql.html)
## For PostgreSQL backend
### [OPTIONAL] Fail2ban: Store banned IP addresses in SQL database
If you're running iRedAdmin-Pro, it's very useful to store banned IP addresses
in SQL database, then you can view and manage them with iRedAdmin-Pro directly.
* [Fail2ban: Store banned IP addresses in SQL database](./fail2ban.sql.html)