From a0620a5fc920a63c8dd29a5426001d7ffbd3a2c9 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Thu, 4 Dec 2014 21:05:29 +0800 Subject: [PATCH] New: upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md. --- TODO.md | 3 +- convert.sh | 6 +- html/iredmail.releases.html | 2 +- html/upgrade.iredmail.0.8.3-0.8.4.html | 323 ++++++++++++++++++++++ html/upgrade.iredmail.0.8.7-0.9.0.html | 2 +- upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md | 316 +++++++++++++++++++++ upgrade/0-upgrade.iredmail.0.8.7-0.9.0.md | 2 +- upgrade/iredmail.releases.md | 2 +- 8 files changed, 649 insertions(+), 7 deletions(-) create mode 100644 html/upgrade.iredmail.0.8.3-0.8.4.html create mode 100644 upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md diff --git a/TODO.md b/TODO.md index 38de6fd1..c0d38b5a 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,7 @@ # TODO -* iRedMail upgrade tutorials +* [WIP] iRedMail upgrade tutorials + * Upgrade iRedAPD: http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD * How to enable SSHA512/BCRYPT in Dovecot + Roundcubemail. * How to custom SpamAssassin scores diff --git a/convert.sh b/convert.sh index c2cc50b7..88801dad 100644 --- a/convert.sh +++ b/convert.sh @@ -92,9 +92,11 @@ for chapter_dir in ${all_chapter_dirs}; do fi # Get title. + # title format: '# title' _article_title="$(head -1 ${article_file} | awk -F'# ' '{print $2}')" - #_article_title="$(head -1 ${article_file} | awk -F'Title: ' '{print $2}')" - #echo "article title: ${_article_title}" + # title format: '

title

' + #_article_title="$(head -1 ${article_file} | awk -F'

' '{print $2}' | awk -F'

' '{print $1}')" + #echo "* [${_article_title}](${chapter_dir_in_article}/${article_html_file})" >> ${INDEX_MD} if [ X"${hide_article_in_index}" == X'NO' ]; then echo "* [${_article_title}](${article_html_file})" >> ${INDEX_MD} diff --git a/html/iredmail.releases.html b/html/iredmail.releases.html index 39ffc598..b57de4c2 100644 --- a/html/iredmail.releases.html +++ b/html/iredmail.releases.html @@ -16,7 +16,7 @@
  • 0.8.7, released on May 13, 2014. Release notes, Upgrade from iRedMail-0.8.6
  • 0.8.6, released on Dec 16, 2013. Release notes, Upgrade from iRedMail-0.8.5
  • 0.8.5, released on Jul 16, 2013. Release notes, Upgrade from iRedMail-0.8.4
  • -
  • 0.8.4, released on Mar 26, 2013. Release notes, Upgrade from iRedMail-0.8.3
  • +
  • 0.8.4, released on Mar 26, 2013. Release notes, Upgrade from iRedMail-0.8.3
  • 0.8.3, released on Oct 13, 2012. Release notes, Upgrade from iRedMail-0.8.2
  • 0.8.2, released on Sep 19, 2012. Release notes, Upgrade from iRedMail-0.8.1
  • 0.8.1, released on Jun 8, 2012. Release notes, Upgrade from iRedMail-0.8.0
  • diff --git a/html/upgrade.iredmail.0.8.3-0.8.4.html b/html/upgrade.iredmail.0.8.3-0.8.4.html new file mode 100644 index 00000000..4ebfadec --- /dev/null +++ b/html/upgrade.iredmail.0.8.3-0.8.4.html @@ -0,0 +1,323 @@ + + + + Upgrade iRedMail from 0.8.3 to 0.8.4 + + + + +

    Upgrade iRedMail from 0.8.3 to 0.8.4

    +
    + +
    +

    ChangeLog

    + +

    General (All backends should apply these steps)

    +

    Update /etc/iredmail-release with 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:

    +
    # File: /etc/iredmail-release
    +
    +0.8.4
    +
    + +

    Upgrade Roundcube webmail to the latest stable release

    +

    Please follow Roundcube official tutorial to upgrade Roundcube webmail to the +latest stable release immediately: How to upgrade Roundcube

    +

    Upgrade iRedAPD (Postfix policy server) to the latest stable release

    +

    Please follow below tutorial to upgrade iRedAPD to the latest stable release: +How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release

    +

    Upgrade iRedAdmin (open source edition) to the latest stable release

    +

    Please follow this tutorial to upgrade iRedAdmin open source edition to the +latest stable release: Upgrade iRedAdmin to the latest stable release

    +

    Add new alias virusalert in Postfix for Amavisd

    +

    Amavisd will send an email notification to address virusalert@[YOUR_HOSTNAME] +by default, but we don't have this user in Postfix alias file +/etc/postfix/aliases (on Linux/OpenBSD), or /usr/local/etc/postfix/aliases +(on FreeBSD) or SQL/LDAP database, so emails cannot be delivered. Below steps +add an alias in Postfix alias file, and it will be forwarded to root user by +default.

    +

    Add new alias (Note, use '/usr/local/etc/postfix/aliases' on FreeBSD instead), +and update the database:

    +
    # echo 'virusalert: root' >> /etc/postfix/aliases
    +# postalias /etc/postfix/aliases
    +
    + +

    OpenLDAP backend special

    +

    Fix incorrect LDAP query filter in Postfix

    +

    If you add external email addresses as mail list members, iRedAdmin-Pro will +store them in attribute memberOfGroup, this will cause exported LDIF data +cannot be restored. Below are steps to fix this issue.

    +

    To fix this issue, we need the latest LDAP schema file provided by iRedMail. +Steps are:

    + +

    Here we go:

    +

    Use the latest LDAP schema file provided by iRedMail

    + +
    # cd /tmp
    +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
    +
    +# cd /etc/openldap/schema/
    +# cp iredmail.schema iredmail.schema.bak
    +
    +# cp -f /tmp/iredmail.schema /etc/openldap/schema/
    +# /etc/init.d/slapd restart       # <-- Or: /etc/init.d/ldap restart
    +
    + + +
    # cd /tmp
    +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
    +
    +# cd /etc/ldap/schema/
    +# cp iredmail.schema iredmail.schema.bak
    +
    +# cp -f /tmp/iredmail.schema /etc/ldap/schema/
    +# /etc/init.d/slapd restart
    +
    + + +
    # cd /tmp
    +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema
    +
    +# cd /usr/local/etc/ldap/schema/
    +# cp iredmail.schema iredmail.schema.bak
    +
    +# cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
    +# /usr/local/etc/rc.d/slapd restart
    +
    + +

    Update existing accounts

    + +
    # cd /root/
    +# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_083_to_084.py
    +
    + +

    Open downloaded file updateLDAPValues_083_to_084.py, set LDAP server related +settings in file head. for example,

    +
    # Part of file: updateLDAPValues_083_to_084.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'
    +
    + +

    You can find required LDAP credential in iRedAdmin config file or iRedMail.tips +file under your iRedMail installation directory. Using either +cn=Manager,dc=xx,dc=xx or cn=vmailadmin,dc=xx,dc=xx as bind dn is ok.

    +

    Execute this script, it will fix incorrect values and add correct ones:

    +
    # python updateLDAPValues_083_to_084.py
    +
    + +

    Fix incorrect LDAP query filter in Postfix

    + +
    # Part of file: ldap/virtual_group_maps.cf
    +
    +# OLD setting
    +#query_filter    = (&(memberOfGroup=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailUser)(objectClass=mailExternalUser)))
    +
    +# New setting
    +query_filter    = (&(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(memberOfGroup=%s)(shadowAddress=%s))(|(objectClass=mailUser)(objectClass=mailExternalUser)))
    +
    + +

    Restarting Postfix service is required.

    +

    Supports alias domains in Postfix per-user bcc lookup files

    + +
    # Part of file: ldap/sender_bcc_maps_user.cf
    +
    +query_filter    = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc))
    +
    + + +
    # Part of file: ldap/recipient_bcc_maps_user.cf
    +
    +query_filter    = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc))
    +
    + +

    Restarting Postfix service is required.

    +

    Create addition SQL index for Amavisd database

    +

    We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails.

    +

    Note: It may take long time if you have many records in sql table amavisd.msgs.

    +
    $ mysql -uroot -p
    +mysql> USE amavisd;
    +mysql> ALTER TABLE msgs ADD INDEX (quar_type);
    +
    + +

    MySQL backend special

    +

    Add 4 new columns used for per-user restriction

    +

    New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table +vmail.mailbox:

    + +

    They're used for per-user restriction. For example, you can now define who can +send email to your local user, or your user can send email to which external +domains or users.

    +

    Please login to MySQL server as root user, execute SQL commands to add required +columns and indexes.

    +
    # mysql -uroot -p
    +mysql> USE vmail;
    +mysql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
    +mysql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
    +mysql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
    +mysql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
    +
    + +

    Supported formats of sender/recipients are:

    + +

    Multiple senders/recipients must be separated by comma, for example:

    +
    sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
    +
    + +

    Create addition SQL index for Amavisd database

    +

    We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails.

    +

    Note: It may take long time if you have many records in sql table amavisd.msgs.

    +
    $ mysql -uroot -p
    +mysql> USE amavisd;
    +mysql> ALTER TABLE msgs ADD INDEX (quar_type);
    +
    + +

    PostgreSQL backend special

    +

    Add 4 new columns used for per-user restriction

    +

    New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table +vmail.mailbox:

    + +

    They're used for per-user restriction. For example, you can now define who can +send email to your local user, or your user can send email to which external +domains or users.

    +

    Please switch to PostgreSQL daemon user, then execute SQL commands to add +required new columns and indexes:

    + +
    # su - postgres
    +$ psql -d vmail
    +sql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT '';
    +sql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT '';
    +sql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT '';
    +sql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT '';
    +
    + +

    Supported formats of sender/recipients are:

    + +

    Multiple senders/recipients must be separated by comma, for example:

    +
    sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
    +
    + +

    Create addition SQL index for Amavisd database

    +

    We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails.

    +

    Note: It may take long time if you have many records in sql table amavisd.msgs.

    +

    Please switch to PostgreSQL daemon user, then execute SQL commands to add required columns and indexes:

    + +
    # su - postgres
    +$ psql -d amavisd
    +sql> CREATE INDEX idx_msgs_quar_type ON msgs (quar_type);
    +

    If you found something wrong +in this document, please do +contact us to fix it.

    This tutorial is published under a CC BY-ND 3.0 license. + + + \ No newline at end of file diff --git a/html/upgrade.iredmail.0.8.7-0.9.0.html b/html/upgrade.iredmail.0.8.7-0.9.0.html index 405bd854..17c0ae88 100644 --- a/html/upgrade.iredmail.0.8.7-0.9.0.html +++ b/html/upgrade.iredmail.0.8.7-0.9.0.html @@ -77,7 +77,7 @@ latest stable release immediately: How to upgrade iRedAPD-1.4.1 or later versions to iRedAPD-1.4.4

    +How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release

    Upgrade iRedAdmin (open source edition) to the latest stable release

    Please follow this tutorial to upgrade iRedAdmin open source edition to the latest stable release: Upgrade iRedAdmin to the latest stable release

    diff --git a/upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md b/upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md new file mode 100644 index 00000000..02090038 --- /dev/null +++ b/upgrade/0-upgrade.iredmail.0.8.3-0.8.4.md @@ -0,0 +1,316 @@ +# Upgrade iRedMail from 0.8.3 to 0.8.4 + +[TOC] + +## ChangeLog + +* 2013-03-28: Update /etc/iredmail-release with iRedMail version number. +* 2013-03-28: Upgrade Roundcube webmail to the latest 0.8.6. +* 2013-03-25: [ldap] Fix incorrect LDAP query filter in Postfix. +* 2013-01-08: [sql] Add 4 new columns in table `vmail.mailbox` for MySQL/PostgreSQL backends. +* 2012-10-24: [ldap] Supports alias domains in Postfix per-user bcc lookup files. + +## General (All backends should apply these steps) + +### Update /etc/iredmail-release with 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: + +``` +# File: /etc/iredmail-release + +0.8.4 +``` + +### Upgrade Roundcube webmail to the latest stable release + +Please follow Roundcube official tutorial to upgrade Roundcube webmail to the +latest stable release immediately: [How to upgrade Roundcube](http://trac.roundcube.net/wiki/Howto_Upgrade) + +### Upgrade iRedAPD (Postfix policy server) to the latest stable release + +Please follow below tutorial to upgrade iRedAPD to the latest stable release: +[How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD) + +### Upgrade iRedAdmin (open source edition) to the latest stable release + +Please follow this tutorial to upgrade iRedAdmin open source edition to the +latest stable release: [Upgrade iRedAdmin to the latest stable release](./migrate.or.upgrade.iredadmin.html) + +### Add new alias `virusalert` in Postfix for Amavisd + +Amavisd will send an email notification to address `virusalert@[YOUR_HOSTNAME]` +by default, but we don't have this user in Postfix alias file +`/etc/postfix/aliases` (on Linux/OpenBSD), or /usr/local/etc/postfix/aliases +(on FreeBSD) or SQL/LDAP database, so emails cannot be delivered. Below steps +add an alias in Postfix alias file, and it will be forwarded to root user by +default. + +Add new alias (Note, use '/usr/local/etc/postfix/aliases' on FreeBSD instead), +and update the database: + +``` +# echo 'virusalert: root' >> /etc/postfix/aliases +# postalias /etc/postfix/aliases +``` + +## OpenLDAP backend special + +### Fix incorrect LDAP query filter in Postfix + +If you add external email addresses as mail list members, iRedAdmin-Pro will +store them in attribute `memberOfGroup`, this will cause exported LDIF data +cannot be restored. Below are steps to fix this issue. + +To fix this issue, we need the latest LDAP schema file provided by iRedMail. +Steps are: + +* Download the newest iRedMail ldap schema file +* Copy old ldap schema file as a backup copy +* Replace the old one +* Restart OpenLDAP service. + +Here we go: + +#### Use the latest LDAP schema file provided by iRedMail + +* On RHEL/CentOS/Scientific Linux (both release 5.x and 6.x), openSUSE, Gentoo, OpenBSD: + +``` +# cd /tmp +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema + +# cd /etc/openldap/schema/ +# cp iredmail.schema iredmail.schema.bak + +# cp -f /tmp/iredmail.schema /etc/openldap/schema/ +# /etc/init.d/slapd restart # <-- Or: /etc/init.d/ldap restart +``` + +* On Debian/Ubuntu: + +``` +# cd /tmp +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema + +# cd /etc/ldap/schema/ +# cp iredmail.schema iredmail.schema.bak + +# cp -f /tmp/iredmail.schema /etc/ldap/schema/ +# /etc/init.d/slapd restart +``` + +* On FreeBSD: + +``` +# cd /tmp +# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail.schema + +# cd /usr/local/etc/ldap/schema/ +# cp iredmail.schema iredmail.schema.bak + +# cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/ +# /usr/local/etc/rc.d/slapd restart +``` + +#### Update existing accounts + +* Download python script used to adding missing values. + +``` +# cd /root/ +# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_083_to_084.py +``` + +Open downloaded file `updateLDAPValues_083_to_084.py`, set LDAP server related +settings in file head. for example, + +``` +# Part of file: updateLDAPValues_083_to_084.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' +``` + +You can find required LDAP credential in iRedAdmin config file or `iRedMail.tips` +file under your iRedMail installation directory. Using either +`cn=Manager,dc=xx,dc=xx` or `cn=vmailadmin,dc=xx,dc=xx` as bind dn is ok. + +Execute this script, it will fix incorrect values and add correct ones: + +``` +# python updateLDAPValues_083_to_084.py +``` + +#### Fix incorrect LDAP query filter in Postfix + +* On Linux/OpenBSD, please update `/etc/postfix/ldap/virtual_group_maps.cf`. + On FreeBSD, update `/usr/local/etc/postfix/ldap/virtual_group_maps.cf` instead. + +``` +# Part of file: ldap/virtual_group_maps.cf + +# OLD setting +#query_filter = (&(memberOfGroup=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailUser)(objectClass=mailExternalUser))) + +# New setting +query_filter = (&(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(memberOfGroup=%s)(shadowAddress=%s))(|(objectClass=mailUser)(objectClass=mailExternalUser))) +``` + +Restarting Postfix service is required. + +### Supports alias domains in Postfix per-user bcc lookup files + +* In `/etc/postfix/ldap/sender_bcc_maps_user.cf`, replace `(mail=%s)` by + `(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))` in parameter + `query_filter =`. The final LDAP filter looks like below: + +``` +# Part of file: ldap/sender_bcc_maps_user.cf + +query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc)) +``` + +* Perform the same modification in file `/etc/postfix/ldap/recipient_bcc_maps_user.cf`, + the final LDAP filter looks like below: + +``` +# Part of file: ldap/recipient_bcc_maps_user.cf + +query_filter = (&(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s)))(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc)) +``` + +Restarting Postfix service is required. + +### Create addition SQL index for Amavisd database + +We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails. + +__Note__: It may take long time if you have many records in sql table `amavisd.msgs`. + +``` +$ mysql -uroot -p +mysql> USE amavisd; +mysql> ALTER TABLE msgs ADD INDEX (quar_type); +``` + +## MySQL backend special + +### Add 4 new columns used for per-user restriction + +New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table +`vmail.mailbox`: + +* allowedsenders +* rejectedsenders +* allowedrecipients +* rejectedrecipients + +They're used for per-user restriction. For example, you can now define who can +send email to your local user, or your user can send email to which external +domains or users. + +Please login to MySQL server as root user, execute SQL commands to add required +columns and indexes. + +``` +# mysql -uroot -p +mysql> USE vmail; +mysql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT ''; +mysql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT ''; +mysql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT ''; +mysql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT ''; +``` + +Supported formats of sender/recipients are: + +* `user@example.com`: single user +* `@example.com`: entire domain +* `@.example.com`: entire domain and all its sub domains +* `@.`: any users + +Multiple senders/recipients must be separated by comma, for example: + +``` +sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com'; +``` + +### Create addition SQL index for Amavisd database + +We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails. + +__Note__: It may take long time if you have many records in sql table `amavisd.msgs`. + +``` +$ mysql -uroot -p +mysql> USE amavisd; +mysql> ALTER TABLE msgs ADD INDEX (quar_type); +``` + +## PostgreSQL backend special + +### Add 4 new columns used for per-user restriction + +New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table +`vmail.mailbox`: + +* allowedsenders +* rejectedsenders +* allowedrecipients +* rejectedrecipients + +They're used for per-user restriction. For example, you can now define who can +send email to your local user, or your user can send email to which external +domains or users. + +Please switch to PostgreSQL daemon user, then execute SQL commands to add +required new columns and indexes: + +* On Linux, PostgreSQL daemon user is `postgres`. +* On FreeBSD, PostgreSQL daemon user is `pgsql`. +* On OpenBSD, PostgreSQL daemon user is `_postgresql`. + +``` +# su - postgres +$ psql -d vmail +sql> ALTER TABLE mailbox ADD COLUMN allowedsenders TEXT NOT NULL DEFAULT ''; +sql> ALTER TABLE mailbox ADD COLUMN rejectedsenders TEXT NOT NULL DEFAULT ''; +sql> ALTER TABLE mailbox ADD COLUMN allowedrecipients TEXT NOT NULL DEFAULT ''; +sql> ALTER TABLE mailbox ADD COLUMN rejectedrecipients TEXT NOT NULL DEFAULT ''; +``` + +Supported formats of sender/recipients are: + +* `user@example.com`: single user +* `@example.com`: entire domain +* `@.example.com`: entire domain and all its sub domains +* `@.`: any users + +Multiple senders/recipients must be separated by comma, for example: +``` +sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com'; +``` + +### Create addition SQL index for Amavisd database + +We need one new SQL index for Amavisd database, it's used to speed up +performance of viewing quarantined mails. + +__Note__: It may take long time if you have many records in sql table `amavisd.msgs`. + +Please switch to PostgreSQL daemon user, then execute SQL commands to add required columns and indexes: + +* On Linux, PostgreSQL daemon user is `postgres`. +* On FreeBSD, PostgreSQL daemon user is `pgsql`. +* On OpenBSD, PostgreSQL daemon user is `_postgresql`. +``` +# su - postgres +$ psql -d amavisd +sql> CREATE INDEX idx_msgs_quar_type ON msgs (quar_type); +``` diff --git a/upgrade/0-upgrade.iredmail.0.8.7-0.9.0.md b/upgrade/0-upgrade.iredmail.0.8.7-0.9.0.md index 460fd5c0..57cb8e33 100644 --- a/upgrade/0-upgrade.iredmail.0.8.7-0.9.0.md +++ b/upgrade/0-upgrade.iredmail.0.8.7-0.9.0.md @@ -43,7 +43,7 @@ iRedAPD-1.4.4 brings several new plugins, and works with Postfix parameter `smtpd_end_of_data_restrictions` (protocol state `END-OF-MESSAGE`). Please follow below tutorial to upgrade iRedAPD to the latest stable release: -[How to upgrade iRedAPD-1.4.1 or later versions to iRedAPD-1.4.4](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD) +[How to upgrade iRedAPD-1.4.1 or later versions to the latest stable release](http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD) ### Upgrade iRedAdmin (open source edition) to the latest stable release diff --git a/upgrade/iredmail.releases.md b/upgrade/iredmail.releases.md index 31d55694..0bfb4684 100644 --- a/upgrade/iredmail.releases.md +++ b/upgrade/iredmail.releases.md @@ -4,7 +4,7 @@ * __0.8.7__, released on May 13, 2014. [Release notes](http://www.iredmail.org/forum/topic6872-news-announcements-bug-fixes-iredmail087-has-been-released.html), [Upgrade from iRedMail-0.8.6](./upgrade.iredmail.0.8.6-0.8.7.html) * __0.8.6__, released on Dec 16, 2013. [Release notes](http://www.iredmail.org/forum/topic5831-iredmail086-has-been-released.html), [Upgrade from iRedMail-0.8.5](./upgrade.iredmail.0.8.5-0.8.6.html) * __0.8.5__, released on Jul 16, 2013. [Release notes](http://www.iredmail.org/forum/topic5167-news-announcements-bug-fixes-iredmail085-has-been-released.html), [Upgrade from iRedMail-0.8.4](./upgrade.iredmail.0.8.4-0.8.5.html) -* __0.8.4__, released on Mar 26, 2013. [Release notes](http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html), [Upgrade from iRedMail-0.8.3](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.3-0.8.4) +* __0.8.4__, released on Mar 26, 2013. [Release notes](http://www.iredmail.org/forum/topic4646-news-announcements-bug-fixes-iredmail084-has-been-released.html), [Upgrade from iRedMail-0.8.3](./upgrade.iredmail.0.8.3-0.8.4.html) * __0.8.3__, released on Oct 13, 2012. [Release notes](http://www.iredmail.org/forum/topic4016-news-announcements-bug-fixes-iredmail083-has-been-released.html), [Upgrade from iRedMail-0.8.2](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.2-0.8.3) * __0.8.2__, released on Sep 19, 2012. [Release notes](http://www.iredmail.org/forum/topic3913-news-announcements-bug-fixes-iredmail082-has-been-released.html), [Upgrade from iRedMail-0.8.1](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.1-0.8.2) * __0.8.1__, released on Jun 8, 2012. [Release notes](http://www.iredmail.org/forum/topic3499-news-announcements-bug-fixes-iredmail081-has-been-released.html), [Upgrade from iRedMail-0.8.0](http://www.iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.8.0-0.8.1)