Upgrade/iRedMail/0.8.7-0.9.0

From iRedMail
(Difference between revisions)
Jump to: navigation, search
Line 56: Line 56:
 
= MySQL backend special =
 
= MySQL backend special =
  
== Add and remove SQL columns in '''vmail''' database ==
+
== Add and remove SQL columns in '''vmail''' and '''amavisd''' databases ==
 
We need new SQL columns in '''vmail''' database:
 
We need new SQL columns in '''vmail''' database:
 
* '''mailbox.enableindexer-worker''': used by Dovecot.
 
* '''mailbox.enableindexer-worker''': used by Dovecot.
 +
 +
And we need index for some SQL columns in '''amavisd''' database:
 +
* '''policy.policy_name''': used by iRedAdmin-Pro.
  
 
Now connect to SQL server as MySQL root user, create new columns, add required INDEX:
 
Now connect to SQL server as MySQL root user, create new columns, add required INDEX:
Line 66: Line 69:
 
mysql> ALTER TABLE mailbox ADD COLUMN `enableindexer-worker` TINYINT(1) NOT NULL DEFAULT 1;
 
mysql> ALTER TABLE mailbox ADD COLUMN `enableindexer-worker` TINYINT(1) NOT NULL DEFAULT 1;
 
mysql> ALTER TABLE mailbox ADD INDEX (`enableindexer-worker`);
 
mysql> ALTER TABLE mailbox ADD INDEX (`enableindexer-worker`);
 +
 +
mysql> USE amavisd;
 +
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
 
</pre>}}
 
</pre>}}
  
 
= PostgreSQL backend special =
 
= PostgreSQL backend special =
  
== Add and remove SQL columns in '''vmail''' database ==
+
== Add and remove SQL columns in '''vmail''' and '''amavisd''' databases ==
 
We need new SQL columns in '''vmail''' database:
 
We need new SQL columns in '''vmail''' database:
 
* '''mailbox.enableindexer-worker''': used by Dovecot.
 
* '''mailbox.enableindexer-worker''': used by Dovecot.
 +
 +
And we need index for some SQL columns in '''amavisd''' database:
 +
* '''policy.policy_name''': used by iRedAdmin-Pro.
  
 
Now connect to SQL server as PostgreSQL root user, create new columns, add required INDEX:
 
Now connect to SQL server as PostgreSQL root user, create new columns, add required INDEX:
Line 80: Line 89:
 
sql> ALTER TABLE mailbox ADD COLUMN enableindexer-worker INT2 NOT NULL DEFAULT 1;
 
sql> ALTER TABLE mailbox ADD COLUMN enableindexer-worker INT2 NOT NULL DEFAULT 1;
 
sql> CREATE INDEX idx_mailbox_enableindexer_worker ON mailbox (enableindexer-worker);
 
sql> CREATE INDEX idx_mailbox_enableindexer_worker ON mailbox (enableindexer-worker);
 +
 +
sql> \c amavisd;
 +
sql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
 
</pre>}}
 
</pre>}}

Revision as of 00:24, 19 June 2014

Contents



This is a DRAFT, do not apply it.



ChangeLog

  • 2014-06-07:
    • [OpenLDAP] Add new value for existing mail users: enabledService=indexer-worker.
    • [MySQL/PostgreSQL] New SQL column in vmail database: mailbox.enableindexer-worker.

General (All backends should apply these steps)

Update /etc/iredmail-release with iRedMail version number

iRedMail stores the initial version number in /etc/iredmail-release after installation completed, 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.9.0

Upgrade Roundcube webmail to the latest stable release

Please follow Roundcube official tutorial to upgrade Roundcube webmail to the latest stable release immediately: http://trac.roundcube.net/wiki/Howto_Upgrade

Upgrade phpMyAdmin to the latest stable release

Please follow this short tutorial to upgrade phpMyAdmin to the latest stable release: http://docs.phpmyadmin.net/en/latest/setup.html#upgrading-from-an-older-version

OpenLDAP backend special

Add new LDAP values for existing mail users

We will add two new LDAP attribute/value pairs for existing mail users: enabledService=indexer-worker. It's used by Dovecot.

Steps:

  • Download below python script to adding new values for existing mail users.
Terminal:
# cd /root/
# wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/updateLDAPValues_087_to_090.py

Open updateLDAPValues_087_to_090.py, config LDAP server related settings in file head. e.g.

File: updateLDAPValues_087_to_090.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'

Tip:

  • You can find them in iRedAdmin config file or iRedMail.tips file under your iRedMail installation directory.
  • Use 'cn=Manager' instead of 'cn=vmailadmin' here is ok too.

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

Terminal:
# python updateLDAPValues_087_to_090.py

That's all.

MySQL backend special

Add and remove SQL columns in vmail and amavisd databases

We need new SQL columns in vmail database:

  • mailbox.enableindexer-worker: used by Dovecot.

And we need index for some SQL columns in amavisd database:

  • policy.policy_name: used by iRedAdmin-Pro.

Now connect to SQL server as MySQL root user, create new columns, add required INDEX:

Terminal:
$ mysql -uroot -p
mysql> USE vmail;
mysql> ALTER TABLE mailbox ADD COLUMN `enableindexer-worker` TINYINT(1) NOT NULL DEFAULT 1;
mysql> ALTER TABLE mailbox ADD INDEX (`enableindexer-worker`);

mysql> USE amavisd;
mysql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);

PostgreSQL backend special

Add and remove SQL columns in vmail and amavisd databases

We need new SQL columns in vmail database:

  • mailbox.enableindexer-worker: used by Dovecot.

And we need index for some SQL columns in amavisd database:

  • policy.policy_name: used by iRedAdmin-Pro.

Now connect to SQL server as PostgreSQL root user, create new columns, add required INDEX:

Terminal:
# su - postgres
$ psql -d vmail
sql> ALTER TABLE mailbox ADD COLUMN enableindexer-worker INT2 NOT NULL DEFAULT 1;
sql> CREATE INDEX idx_mailbox_enableindexer_worker ON mailbox (enableindexer-worker);

sql> \c amavisd;
sql> CREATE UNIQUE INDEX policy_idx_policy_name ON policy (policy_name);
Personal tools