2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-12-04 07:05:29 -06:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > Upgrade iRedMail from 0.8.3 to 0.8.4< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-12-04 07:05:29 -06:00
< / head >
< body >
< div id = "navigation" >
2016-04-19 12:48:51 -05:00
< a href = "/index.html" target = "_blank" >
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-02-29 02:15:19 -06:00
// < a href = "./index.html" > Document Index< / a > < / div > < h1 id = "upgrade-iredmail-from-083-to-084" > Upgrade iRedMail from 0.8.3 to 0.8.4< / h1 >
2014-12-04 07:05:29 -06:00
< div class = "toc" >
< ul >
< li > < a href = "#upgrade-iredmail-from-083-to-084" > Upgrade iRedMail from 0.8.3 to 0.8.4< / a > < ul >
< li > < a href = "#changelog" > ChangeLog< / a > < / li >
< li > < a href = "#general-all-backends-should-apply-these-steps" > General (All backends should apply these steps)< / a > < ul >
< li > < a href = "#update-etciredmail-release-with-iredmail-version-number" > Update /etc/iredmail-release with iRedMail version number< / a > < / li >
< li > < a href = "#upgrade-roundcube-webmail-to-the-latest-stable-release" > Upgrade Roundcube webmail to the latest stable release< / a > < / li >
< li > < a href = "#upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release" > Upgrade iRedAPD (Postfix policy server) to the latest stable release< / a > < / li >
< li > < a href = "#upgrade-iredadmin-open-source-edition-to-the-latest-stable-release" > Upgrade iRedAdmin (open source edition) to the latest stable release< / a > < / li >
< li > < a href = "#add-new-alias-virusalert-in-postfix-for-amavisd" > Add new alias virusalert in Postfix for Amavisd< / a > < / li >
< / ul >
< / li >
< li > < a href = "#openldap-backend-special" > OpenLDAP backend special< / a > < ul >
< li > < a href = "#fix-incorrect-ldap-query-filter-in-postfix" > Fix incorrect LDAP query filter in Postfix< / a > < ul >
< li > < a href = "#use-the-latest-ldap-schema-file-provided-by-iredmail" > Use the latest LDAP schema file provided by iRedMail< / a > < / li >
< li > < a href = "#update-existing-accounts" > Update existing accounts< / a > < / li >
< li > < a href = "#fix-incorrect-ldap-query-filter-in-postfix_1" > Fix incorrect LDAP query filter in Postfix< / a > < / li >
< / ul >
< / li >
< li > < a href = "#supports-alias-domains-in-postfix-per-user-bcc-lookup-files" > Supports alias domains in Postfix per-user bcc lookup files< / a > < / li >
2015-01-31 04:20:42 -06:00
< li > < a href = "#create-additional-sql-index-for-amavisd-database" > Create additional SQL index for Amavisd database< / a > < / li >
2014-12-04 07:05:29 -06:00
< / ul >
< / li >
< li > < a href = "#mysql-backend-special" > MySQL backend special< / a > < ul >
< li > < a href = "#add-4-new-columns-used-for-per-user-restriction" > Add 4 new columns used for per-user restriction< / a > < / li >
2015-01-31 04:20:42 -06:00
< li > < a href = "#create-additional-sql-index-for-amavisd-database_1" > Create additional SQL index for Amavisd database< / a > < / li >
2014-12-04 07:05:29 -06:00
< / ul >
< / li >
< li > < a href = "#postgresql-backend-special" > PostgreSQL backend special< / a > < ul >
< li > < a href = "#add-4-new-columns-used-for-per-user-restriction_1" > Add 4 new columns used for per-user restriction< / a > < / li >
2015-01-31 04:20:42 -06:00
< li > < a href = "#create-additional-sql-index-for-amavisd-database_2" > Create additional SQL index for Amavisd database< / a > < / li >
2014-12-04 07:05:29 -06:00
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / div >
2016-03-30 04:57:49 -06:00
< 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 = "../support.html" > the details< / a > and < a href = "../contact.html" > contact us< / a > .< / p >
< / div >
2014-12-04 07:05:29 -06:00
< h2 id = "changelog" > ChangeLog< / h2 >
< ul >
< li > 2013-03-28: Update /etc/iredmail-release with iRedMail version number.< / li >
< li > 2013-03-28: Upgrade Roundcube webmail to the latest 0.8.6.< / li >
< li > 2013-03-25: [ldap] Fix incorrect LDAP query filter in Postfix.< / li >
< li > 2013-01-08: [sql] Add 4 new columns in table < code > vmail.mailbox< / code > for MySQL/PostgreSQL backends.< / li >
< li > 2012-10-24: [ldap] Supports alias domains in Postfix per-user bcc lookup files.< / li >
< / ul >
< h2 id = "general-all-backends-should-apply-these-steps" > General (All backends should apply these steps)< / h2 >
< h3 id = "update-etciredmail-release-with-iredmail-version-number" > Update /etc/iredmail-release with 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 > # File: /etc/iredmail-release
0.8.4
< / code > < / pre >
< h3 id = "upgrade-roundcube-webmail-to-the-latest-stable-release" > Upgrade Roundcube webmail to the latest stable release< / h3 >
< p > Please follow Roundcube official tutorial to upgrade Roundcube webmail to the
2016-05-08 03:25:42 -05:00
latest stable release immediately: < a href = "https://github.com/roundcube/roundcubemail/wiki/Upgrade" > How to upgrade Roundcube< / a > .< / p >
2014-12-04 07:05:29 -06:00
< h3 id = "upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release" > Upgrade iRedAPD (Postfix policy server) to the latest stable release< / h3 >
< p > Please follow below tutorial to upgrade iRedAPD to the latest stable release:
2015-09-20 20:22:31 -05:00
< a href = "./upgrade.iredapd.html" > Upgrade iRedAPD to the latest stable release< / a > < / p >
2014-12-04 07:05:29 -06:00
< h3 id = "upgrade-iredadmin-open-source-edition-to-the-latest-stable-release" > Upgrade iRedAdmin (open source edition) to the latest stable release< / h3 >
< p > Please follow this tutorial to upgrade iRedAdmin open source edition to the
latest stable release: < a href = "./migrate.or.upgrade.iredadmin.html" > Upgrade iRedAdmin to the latest stable release< / a > < / p >
< h3 id = "add-new-alias-virusalert-in-postfix-for-amavisd" > Add new alias < code > virusalert< / code > in Postfix for Amavisd< / h3 >
< p > Amavisd will send an email notification to address < code > virusalert@[YOUR_HOSTNAME]< / code >
by default, but we don't have this user in Postfix alias file
< code > /etc/postfix/aliases< / code > (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.< / p >
< p > Add new alias (Note, use '/usr/local/etc/postfix/aliases' on FreeBSD instead),
and update the database:< / p >
< pre > < code > # echo 'virusalert: root' > > /etc/postfix/aliases
# postalias /etc/postfix/aliases
< / code > < / pre >
< h2 id = "openldap-backend-special" > OpenLDAP backend special< / h2 >
< h3 id = "fix-incorrect-ldap-query-filter-in-postfix" > Fix incorrect LDAP query filter in Postfix< / h3 >
< p > If you add external email addresses as mail list members, iRedAdmin-Pro will
store them in attribute < code > memberOfGroup< / code > , this will cause exported LDIF data
cannot be restored. Below are steps to fix this issue.< / p >
< p > To fix this issue, we need the latest LDAP schema file provided by iRedMail.
Steps are:< / p >
< ul >
< li > Download the newest iRedMail ldap schema file< / li >
< li > Copy old ldap schema file as a backup copy< / li >
< li > Replace the old one< / li >
< li > Restart OpenLDAP service.< / li >
< / ul >
< p > Here we go:< / p >
< h4 id = "use-the-latest-ldap-schema-file-provided-by-iredmail" > Use the latest LDAP schema file provided by iRedMail< / h4 >
< ul >
< li > On RHEL/CentOS/Scientific Linux (both release 5.x and 6.x), openSUSE, Gentoo, OpenBSD:< / li >
< / ul >
< pre > < code > # cd /tmp
2016-06-03 03:17:34 -05:00
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
2014-12-04 07:05:29 -06:00
# 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
< / code > < / pre >
< ul >
< li > On Debian/Ubuntu:< / li >
< / ul >
< pre > < code > # cd /tmp
2016-06-03 03:17:34 -05:00
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
2014-12-04 07:05:29 -06:00
# cd /etc/ldap/schema/
# cp iredmail.schema iredmail.schema.bak
# cp -f /tmp/iredmail.schema /etc/ldap/schema/
# /etc/init.d/slapd restart
< / code > < / pre >
< ul >
< li > On FreeBSD:< / li >
< / ul >
< pre > < code > # cd /tmp
2016-06-03 03:17:34 -05:00
# wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
2014-12-04 07:05:29 -06:00
2016-10-14 08:46:40 -05:00
# cd /usr/local/etc/openldap/schema/
2014-12-04 07:05:29 -06:00
# cp iredmail.schema iredmail.schema.bak
# cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
2016-10-14 08:46:40 -05:00
# service slapd restart
2014-12-04 07:05:29 -06:00
< / code > < / pre >
< h4 id = "update-existing-accounts" > Update existing accounts< / h4 >
< ul >
< li > Download python script used to adding missing values.< / li >
< / ul >
< pre > < code > # cd /root/
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_083_to_084.py
< / code > < / pre >
< p > Open downloaded file < code > updateLDAPValues_083_to_084.py< / code > , set LDAP server related
settings in file head. for example,< / p >
< pre > < code > # 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'
< / code > < / pre >
< p > You can find required LDAP credential in iRedAdmin config file or < code > iRedMail.tips< / code >
file under your iRedMail installation directory. 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 >
< p > Execute this script, it will fix incorrect values and add correct ones:< / p >
< pre > < code > # python updateLDAPValues_083_to_084.py
< / code > < / pre >
< h4 id = "fix-incorrect-ldap-query-filter-in-postfix_1" > Fix incorrect LDAP query filter in Postfix< / h4 >
< ul >
< li > On Linux/OpenBSD, please update < code > /etc/postfix/ldap/virtual_group_maps.cf< / code > .
On FreeBSD, update < code > /usr/local/etc/postfix/ldap/virtual_group_maps.cf< / code > instead.< / li >
< / ul >
< pre > < code > # 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)))
< / code > < / pre >
< p > Restarting Postfix service is required.< / p >
< h3 id = "supports-alias-domains-in-postfix-per-user-bcc-lookup-files" > Supports alias domains in Postfix per-user bcc lookup files< / h3 >
< ul >
< li > In < code > /etc/postfix/ldap/sender_bcc_maps_user.cf< / code > , replace < code > (mail=%s)< / code > by
< code > (|(mail=%s)(& (enabledService=shadowaddress)(shadowAddress=%s)))< / code > in parameter
< code > query_filter =< / code > . The final LDAP filter looks like below:< / li >
< / ul >
< pre > < code > # 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))
< / code > < / pre >
< ul >
< li > Perform the same modification in file < code > /etc/postfix/ldap/recipient_bcc_maps_user.cf< / code > ,
the final LDAP filter looks like below:< / li >
< / ul >
< pre > < code > # 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))
< / code > < / pre >
< p > Restarting Postfix service is required.< / p >
2015-01-31 04:20:42 -06:00
< h3 id = "create-additional-sql-index-for-amavisd-database" > Create additional SQL index for Amavisd database< / h3 >
2014-12-04 07:05:29 -06:00
< p > We need one new SQL index for Amavisd database, it's used to speed up
performance of viewing quarantined mails.< / p >
< p > < strong > Note< / strong > : It may take long time if you have many records in sql table < code > amavisd.msgs< / code > .< / p >
< pre > < code > $ mysql -uroot -p
mysql> USE amavisd;
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
< / code > < / pre >
< h2 id = "mysql-backend-special" > MySQL backend special< / h2 >
< h3 id = "add-4-new-columns-used-for-per-user-restriction" > Add 4 new columns used for per-user restriction< / h3 >
< p > New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
< code > vmail.mailbox< / code > :< / p >
< ul >
< li > allowedsenders< / li >
< li > rejectedsenders< / li >
< li > allowedrecipients< / li >
< li > rejectedrecipients< / li >
< / ul >
< p > 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.< / p >
< p > Please login to MySQL server as root user, execute SQL commands to add required
columns and indexes.< / p >
< pre > < code > # 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 '';
< / code > < / pre >
< p > Supported formats of sender/recipients are:< / p >
< ul >
< li > < code > user@example.com< / code > : single user< / li >
< li > < code > @example.com< / code > : entire domain< / li >
< li > < code > @.example.com< / code > : entire domain and all its sub domains< / li >
< li > < code > @.< / code > : any users< / li >
< / ul >
< p > Multiple senders/recipients must be separated by comma, for example:< / p >
< pre > < code > sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
< / code > < / pre >
2015-01-31 04:20:42 -06:00
< h3 id = "create-additional-sql-index-for-amavisd-database_1" > Create additional SQL index for Amavisd database< / h3 >
2014-12-04 07:05:29 -06:00
< p > We need one new SQL index for Amavisd database, it's used to speed up
performance of viewing quarantined mails.< / p >
< p > < strong > Note< / strong > : It may take long time if you have many records in sql table < code > amavisd.msgs< / code > .< / p >
< pre > < code > $ mysql -uroot -p
mysql> USE amavisd;
mysql> ALTER TABLE msgs ADD INDEX (quar_type);
< / code > < / pre >
< h2 id = "postgresql-backend-special" > PostgreSQL backend special< / h2 >
< h3 id = "add-4-new-columns-used-for-per-user-restriction_1" > Add 4 new columns used for per-user restriction< / h3 >
< p > New version of iRedAPD (Postfix policy daemon) requires 4 new columns in table
< code > vmail.mailbox< / code > :< / p >
< ul >
< li > allowedsenders< / li >
< li > rejectedsenders< / li >
< li > allowedrecipients< / li >
< li > rejectedrecipients< / li >
< / ul >
< p > 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.< / p >
< p > Please switch to PostgreSQL daemon user, then execute SQL commands to add
required new columns and indexes:< / p >
< ul >
< li > On Linux, PostgreSQL daemon user is < code > postgres< / code > .< / li >
< li > On FreeBSD, PostgreSQL daemon user is < code > pgsql< / code > .< / li >
< li > On OpenBSD, PostgreSQL daemon user is < code > _postgresql< / code > .< / li >
< / ul >
< pre > < code > # 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 '';
< / code > < / pre >
< p > Supported formats of sender/recipients are:< / p >
< ul >
< li > < code > user@example.com< / code > : single user< / li >
< li > < code > @example.com< / code > : entire domain< / li >
< li > < code > @.example.com< / code > : entire domain and all its sub domains< / li >
< li > < code > @.< / code > : any users< / li >
< / ul >
< p > Multiple senders/recipients must be separated by comma, for example:< / p >
< pre > < code > sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
< / code > < / pre >
2015-01-31 04:20:42 -06:00
< h3 id = "create-additional-sql-index-for-amavisd-database_2" > Create additional SQL index for Amavisd database< / h3 >
2014-12-04 07:05:29 -06:00
< p > We need one new SQL index for Amavisd database, it's used to speed up
performance of viewing quarantined mails.< / p >
< p > < strong > Note< / strong > : It may take long time if you have many records in sql table < code > amavisd.msgs< / code > .< / p >
< p > Please switch to PostgreSQL daemon user, then execute SQL commands to add required columns and indexes:< / p >
< ul >
< li > On Linux, PostgreSQL daemon user is < code > postgres< / code > .< / li >
< li > On FreeBSD, PostgreSQL daemon user is < code > pgsql< / code > .< / li >
< li > On OpenBSD, PostgreSQL daemon user is < code > _postgresql< / code > .< / li >
< / ul >
< pre > < code > # su - postgres
$ psql -d amavisd
sql> CREATE INDEX idx_msgs_quar_type ON msgs (quar_type);
2016-05-19 06:51:20 -05:00
< / code > < / pre > < div class = "footer" >
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > BitBucket 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://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "http://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
< / div >
< script type = "text/javascript" >
2015-02-05 07:02:53 -06:00
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
2014-12-04 07:05:29 -06:00
< / script >
< / body > < / html >