Home » Email Marketing » OpenEMM on Centos

OpenEMM on Centos

The complete installation process of OpenEMM on Centos
Operating System: 64 Bit
If you work with a 64 Bit Linux you have to install additional packages for compatibility with OpenEMM’s sub-programs
– RedHat Linux:

yum install ld-linux.so.2 sqlite libxml2.i386

Operating System: Package Installation
Install the required packages. Further depencies will be resolved automatically by the installation programm.
– RedHat Linux:

yum install mysql-server sendmail-cf MySQL-python libxml2

Operating System: Create user ‘openemm
Create a special group and user for OpenEMM:

#groupadd openemm
#useradd -m -g openemm -d /home/openemm -c “OpenEMM-2011” openemm

Installation: Sun Java JDK

Create a directory for software required by OpenEMM:

mkdir -p /opt/openemm

Download the jdk binary file from source URL.

Copy the file to the new directory:

#cp jdk-6u25-linux-i586.bin /opt/openemm

Change to this directory:

#cd /opt/openemm

Grant the file execution permission:

#chmod u+x jdk-6u25-linux-i586.bin

Execute the Java file:


Create a symbolic link java for the JDK directory:

#ln -s jdk1.6.0_25 java

Test the JDK:

/opt/openemm/java/bin/java –version

You should get an output like this:

java version “1.6.0_25”
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)

4 Installation: Tomcat

Download the latest binary distribution of release 6 from http://tomcat.apache.org. The core package will be sufficient.
Create a directory for software required by OpenEMM:

#mkdir -p /opt/openemm

Copy the file to the new directory:

#cp apache-tomcat-6.0.32.tar.gz /opt/openemm

Change to this directory:

cd /opt/openemm

unpack the Tomcat file:

# tar -xvzf apache-tomcat-6.0.32.tar.gz

Create a symbolic link tomcat for the new directory:

# ln -s apache-tomcat-6.0.32 tomcat

If you want to make sure that Tomcat works, enter the following commands (and make sure to stop an existing
installation of OpenEMM first):
Set environment variable JAVA_HOME:

# export JAVA_HOME=”/opt/openemm/java”

Change into Tomcat directory:

#cd tomcat

Start Tomcat:


Check for Tomcat installation screen: http://localhost:8080 (URL to be entered in browser)
Stop Tomcat:


Installation of OpenEMM 2011

Get the latest version of the OpenEMM binary code from
Copy the tarball to a temporary location – /tmp is a good choice. Change to the home directory and run the following
commands to create a version specific directory for the new OpenEMM version and to create a symbolic link from
openemm to that directory:

#cd /home
#mv openemm openemm-2011
#ln -s openemm-2011 openemm

Change to OpenEMM’s directory and unpack the OpenEMM tarball. Do not forget option “p” for the tar command, because
some files need to have owner and group root or special permissions which are preset in the tarball!

#cd /home/openemm
#tar xzvpf /tmp/OpenEMM-2011-bin.tar.gz

Finally, move the documentation folder to /usr/share/doc where doc files are usually located on a Linux system:

#mkdir -p /usr/share/doc/OpenEMM-2011
#mv USR_SHARE/* /usr/share/doc/OpenEMM-2011
#rm -r USR_SHARE

If you decide to install OpenEMM in a other directory than /home/openemm please make sure that your home directory
contains a symbolic link to that directory and grant the required file access permissions with

#chown -R openemm:openemm
6.1 Read Access to Maillog
OpenEMM requires read access to log file /var/log/maillog.
For RedHat Linux open file /etc/logrotate.d/syslog and add the following line after the line sharedscripts:

create 0604

Also run

#chmod 604 /var/log/maillog

to set the permissions of the current maillog.

6.2 Initialize/Update the OpenEMM and the OpenEMM CMS Database
Make sure that MySQL is running.
– RedHat Linux:

#/etc/init.d/mysqld restart

– Ubuntu:

service mysql restart

– SuSE Linux:

/etc/init.d/mysql restart
#cd /usr/share/doc/OpenEMM-2011
#mysqladmin -u root -p create openemm_cms

(omit option –p in case your MySQL system is not password protected)

#mysql -u root -p openemm_cms < openemm_cms-2011.sql
#cd /usr/share/doc/OpenEMM-2011
#mysqladmin -u root -p create openemm

(omit option –p in case your MySQL system is not password protected)
If you plan to use the redirect features of OpenEMM, open file openemm-2011.sql with a text editor like edit or vim, and
find and replace the string
with a valid redirection URL. In our example it is


If you plan to use the bounce management for asynchronous bounces, replace the empty mailloop string ” directly after
the redirection URL you just entered in the step before, with the sender hostname (see section 8.2). In our example it is


The sender hostname will be used as domain name for the forward addresses generated by the bounce filter.
Finally, load the OpenEMM database layout by

#mysql -u root -p openemm < openemm-2011.sql

6.4 Start and Stop OpenEMM
Change to user openemm with

#su – openemm

Do not forget the hyphen in the first line!
To start the OpenEMM environment, change to the home directory of OpenEMM and launch the start script with

#openemm.sh start

and to stop OpenEMM

#openemm.sh stop

If script openemm.sh is not found make sure that file .bash_profile in directory /home/openemm contains line


Point your webbrowser to
(insert your own Console URL here) and log into OpenEMM as

Username: admin
Password: openemm

6.5 Bounce management:-

Use an e-mail address with the sender hostname (in our example news@host.linuxpcfix.org) Since no real e-mail
addresses exist for the sender hostname, normally it would not be possible to reply to an e-mail with this sender address.
To forward responses to a valid e-mail address you have to define a bounce filter with an e-mail feedback address of your
choice. The forward address generated by the bounce filter (in our example ext_1@host.linuxpcfix.org) has to be
defined as an alias in directory /home/openemm/conf/bav in a new file named bav.conf-local. Our example:

#vi /home/openemm/conf/bav/bav.conf-local
news@host.linuxpcfix.org alias:ext_1@host.linuxpcfix.org

7 Appendix A: Configuration of Sendmail

Open file sendmail.mc in directory /etc/mail and change the line

#vi /etc/mail/sendmail.mc
– RedHat: DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA’)dnl
– Ubuntu: DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=′)dnl


– RedHat: dnl DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA’)dnl
– Ubuntu: dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=′)dnl

This will enable Sendmail to listen on all available network interfaces. By default Sendmail is listing only on the local interface lo0 for connections and “dnl” out-comments this directive.

Add the following line at the end of the file:

INPUT_MAIL_FILTER(`bav’, `S=unix:/home/openemm/var/run/bav.sock, F=T’)dnl

This will enable the dynamic mail loop required by the bounce management to process asynchronous bounces.

If file relay-domains does not exist in directory /etc/mail, create the file – for example by

#touch relay-domains

and add a line at the end of the file which specifies your DNS entry for the sender hostname (FQDN). In our example it is


This will make sure that responses to an email adress with domain host.linuxpcfix.org are accepted by Sendmail for
Open file mailertable in the same directory or create it if it does not exist with

#touch mailertable

and add a line at the end which activates the internal forwarding for the sender hostname to procmail for filtering:

host.linuxpcfix.org procmail:/home/openemm/conf/bav/bav.rc

To activate all changes to the Sendmail configuration, make sure to have package sendmail-cf installed and run the
following commands:

#make -C /etc/mail
#/etc/init.d/sendmail reload

You may ignore the warning that /home/openemm/var/run/bav.sock is missing, since this file will be provided during installation of OpenEMM


I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *


Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud