From iRedMail
(Difference between revisions)
Jump to: navigation, search
(Configure iRedAdmin)

Revision as of 21:58, 5 May 2012


If you already have iRedAdmin open source edition installed, you can migrate from iRedAdmin open source edition to iRedAdmin-Pro with just few steps:


  • This installation guide is used to install iRedAdmin-Pro-MySQL on Gentoo Linux.
  • iRedAdmin-Pro is official web-based admin panel for iRedMail. There're three editions available:
    • iRedAdmin-Pro-LDAP: works with OpenLDAP backend.
    • iRedAdmin-Pro-MySQL: works with MySQL backend.
    • iRedAdmin-Pro-PGSQL: works with PostgreSQL backend.

System requirements

  • iRedMail-0.8.0 or later releases.
  • iRedAdmin-Pro-MySQL-1.3.0 or later releases.
  • Required Packages. They all are installed automatically during iRedMail installation.
    • Apache Web server. We use the built-in Apache-1.3. Note: iRedAdmin doesn't work with chrooted Apache, so don't forget to add -u flag in httpd_flags in /etc/rc.conf.local. For example:
httpd_flags="-DSSL -u"
    • Python 2.4+, core programming language. Warning: Python 3.x is not supported yet.
      •, 0.32+. A python-powered web framework.
      • MySQLdb. A thread-compatible interface to the popular MySQL database server that provides the Python database API.

iRedAdmin will run as default Apache user www.

Download iRedAdmin and configure Apache web server

  • Get iRedAdmin:
    • If you purchased iRedAdmin-Pro-MySQL, you should already have it. If not, please mail to support@ to get a download link.
    • If you didn't purchase iRedAdmin-Pro-MySQL, download iRedAdmin open source edition from download page.
  • Copy iRedAdmin to /var/www/, set correct file permissions, and create symbol link.
# tar xjf iRedAdmin-x.y.z.tar.bz2 -C /var/www/
# cd /var/www/
# chown -R iredadmin:iredadmin iRedAdmin-x.y.z
# chmod -R 0755 iRedAdmin-x.y.z
# ln -s iRedAdmin-x.y.z iredadmin
  • Add apache configure file: /var/www/conf/modules/iredadmin.conf.
File: /var/www/conf/modules/iredadmin.conf
AddType text/html .py
AddHandler cgi-script .py

<Directory "/var/www/iredadmin">
    Options +ExecCGI
    Order allow,deny
    Allow from all
  • Edit /var/www/conf/httpd.conf, make iredadmin accessible via HTTPS. Add below lines before </VirtualHost>:
File: /var/www/conf/httpd.conf
Alias /iredadmin/static /var/www/iredadmin/static
ScriptAlias /iredadmin /var/www/iredadmin/
  • Restart apache to enable mod_wsgi:
# /etc/rc.d/httpd restart

Create necessary MySQL database and grant privileges

  • Create MySQL database: iredadmin. Used to store sessions, admin operation logs, etc.
# mysql -uroot -p
mysql> CREATE DATABASE iredadmin DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> USE iredadmin;
mysql> SOURCE /var/www/iredadmin/docs/samples/iredadmin.sql;
  • Grant privileges to iredadmin user and set password for it.

WARNING: Here we use 'plain_passwd' as password of iredadmin user, please replace it with your own password.

# mysql -uroot -p
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON iredadmin.* TO iredadmin@localhost IDENTIFIED BY 'plain_passwd';

Configure iRedAdmin

The major config file of iRedAdmin is file /var/www/iredadmin/settings.ini.

  • Copy example config file, and set correct file owner (www) and permission (0400).
# cd /var/www/iredadmin/
# cp settings.ini.mysql.sample settings.ini
# chown www:iredadmin settings.ini
# chmod 0400 settings.ini

NOTE: If you are installing iRedAdmin-Pro, and have iRedAdmin open source edition installed, you can simply copy settings.ini from open source edition. Don't forget to set correct file owner and permission after copied.

  • Edit settings.ini.


    • All required usernames/passwords are stored in which generated during iRedMail installation, placed under iRedMail directory. e.g. /root/iRedMail-0.8.0/
    • For more inforamtion, please open settings.ini, it's self-documented.
File: settings.ini
# General settings ...

# Database "iredadmin". required by iRedAdmin.

# Database "vmail", stored all mail accounts.

# Database "policyd". Required for policyd integration.

# Database "amavisd". Required for Amavisd-New integration. includes spam quarantining/releasing.
  • Restart apache web server.
# /etc/rc.d/httpd restart


If iRedAdmin doesn't work as expected, you can set debug = True in settings.ini to turn on debug mode, restart apache web server, use your favourite web browser to access it again, create a new forum topic and paste error message in forum topic.

File: settings.ini
debug = True
Personal tools