# ---- Add new user: iredadmin ----
# useradd -s /sbin/nologin -m -d /home/iredadmin iredadmin
Overview - Installation Guide for Red Hat Enterprise Linux, CentOS, Scientific Linux
Migration Tip: If you already have iRedAdmin open source edition installed, you can simply migrate it to iRedAdmin-Pro.
- Apache, 2.2+. Web server.
- Python 2.4+, core programming language. Warning: Python 3.x is not supported yet.
- Web.py, 0.32+. A python-powered web framework.
- MySQLdb. A thread-compatible interface to the popular MySQL database server that provides the Python database API.
- Python-LDAP, 2.3.7+. An object-oriented API to access LDAP directory servers from Python programs.
We will make iRedAdmin run with Apache web server, but as non-apache, low privilege user: iredadmin.
Make sure OpenLDAP includes amavisd schema file.
Restart OpenLDAP service.
# ---- Add below line in /etc/openldap/slapd.conf before line ----
# ---- 'include /etc/openldap/schema/iredmail.schema' if not present ----
include /etc/openldap/schema/amavisd-new.schema
# /etc/init.d/ldap restart
Make sure you have iRedMail yum repository configured: /etc/yum.repos.d/iRedMail.repo.
Install necessary packages.
[iRedMail]
name=iRedMail
baseurl=http://iredmail.org/yum/rpms/5/
enabled=1
gpgcheck=0
priority=1
# ---- For i386 ----
# yum install python-webpy python-ldap python-jinja2 MySQL-python mod_wsgi
# ---- For x86_64 ----
# yum install MySQL-python.x86_64 python-webpy.noarch python-jinja2.x86_64 python-ldap.x86_64 mod_wsgi.x86_64
- Download iRedAdmin from download page.
- Copy iRedAdmin to /var/www/, set correct file permissions, and create symbol link.
- Add apache configure file: /etc/httpd/conf.d/iredadmin.conf.
- Edit /etc/httpd/conf.d/ssl.conf, make iredadmin accessible via HTTPS. Add below lines before </VirtualHost>:
- Restart apache to enable mod_wsgi:
# tar xjf iRedAdmin-x.y.z.tar.bz2 -C /var/www/
# cd /var/www/
# chown -R iredadmin:iredadmin iRedAdmin-x.y.z
# chmod -R 0555 iRedAdmin-x.y.z
# ln -s iRedAdmin-x.y.z iredadmin
#
# Note: Uncomment below two lines if you want to make iRedAdmin accessible via HTTP.
#
#WSGIScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py/
#Alias /iredadmin/static /var/www/iredadmin/static/
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin
AddType text/html .py
<Directory /var/www/iredadmin/>
Order deny,allow
Allow from all
</Directory>WSGIScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /var/www/iredadmin/static/
# /etc/init.d/httpd restart- Create MySQL database: iredadmin.
- Grant privileges to iredadmin user and set password for it.
# 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;
WARNING: Here we use 'secret_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 'secret_passwd';
mysql> FLUSH PRIVILEGES;
- Copy example config file, and make it not world-writeable.
- Edit settings.ini and set several variables.
- NOTE: For more inforamtion, please read settings.ini, it's self-documented.
- NOTE: You should ensure both bind dn and bind_pw are correct with below command, you can find bind dn and password in your iRedMail installation directory, e.g. /root/iRedMail-0.5.1/iRedMail.tips, usually, it's cn=vmailadmin,dc=xxx,dc=xxx.
- Restart apache web server.
# cd /var/www/iredadmin/
# cp settings.ini.ldap.sample settings.ini
# chown iredadmin:iredadmin settings.ini
# chmod 0400 settings.ini
# ldapsearch -x -D 'YOUR_BIND_DN' -W[general]
admin = user@domain.ltd
debug = False
lang = en_US
backend = ldap
storage_base_directory = /var/vmail/vmail1
[iredadmin]
dbn = mysql
host = localhost
port = 3306
db = iredadmin
user = iredadmin
passwd = secret_passwd
[ldap]
uri = ldap://127.0.0.1:389
suffix = dc=iredmail,dc=org
basedn = o=domains,dc=iredmail,dc=org
domainadmin_dn = o=domainAdmins,dc=iredmail,dc=org
bind_dn = cn=vmailadmin,dc=iredmail,dc=org
bind_pw = passwd
[policyd]
# ---- This section is available in iRedAdmin-Pro-1.3.0. ----
# Policyd integration.
# For server-wide white-/blacklist and sender/recipient throttling.
enabled = True
dbn = mysql
host = localhost
port = 3306
db = policyd
user = policyd
passwd = passwd
# /etc/init.d/httpd restart
Open your web browser to access iRedAdmin.
Open your web browser to access iRedAdmin: httpS://your_server_ip_address/iredadmin/
Make sure you use HTTPS:// instead of HTTP://.
If iRedAdmin doesn't work as expected, you can simplily set 'debug = True' in settings.ini, 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.

