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: '
vmail.mailbox
for MySQL/PostgreSQL backends.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
+
+
+Please follow Roundcube official tutorial to upgrade Roundcube webmail to the +latest stable release immediately: How to upgrade Roundcube
+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
+Please follow this tutorial to upgrade iRedAdmin open source edition to the +latest stable release: Upgrade iRedAdmin to the latest stable release
+virusalert
in Postfix for AmavisdAmavisd 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
+
+
+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:
+# 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
+
+
+# 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
+
+
+/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.
+/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))
+
+
+/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.
+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);
+
+
+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:
+user@example.com
: single user@example.com
: entire domain@.example.com
: entire domain and all its sub domains@.
: any usersMultiple senders/recipients must be separated by comma, for example:
+sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
+
+
+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);
+
+
+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:
+postgres
.pgsql
._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 usersMultiple senders/recipients must be separated by comma, for example:
+sql> INSERT INTO mailbox SET allowedsenders='@gmail.com,user@example.com';
+
+
+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:
+postgres
.pgsql
._postgresql
.# 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. + + +