Install OpenEMM 2015 on Ubuntu 14.04 LTS

We install a OpenEMM 2015 on Ubuntu 14.04 LTS server edition last week, running on a Linode instance.

Our customer would like to send a email to 10,000 on next day of installation, and we choose OpenEMM for his case. To comply with local law in HK for mass information sending, we provides a unsubscription link and service with OpenEMM.

We refer to OpenEMM Documentation Files on its sourceforge project page. Hereby is our notes of system installation of OpenEMM 2015 on Ubuntu Server.

OpenEMM won’t support the newest version of some software, so we choose Ubuntu 14.04 LTS with Longer  Term Support from Canonical, instead of latest 16.04 LTS.

Installing screen, vim, modifying ssh port and hostname  

$ apt-get install screen vim

then change openssh daemon to port 8022 from 22, restart sshd.

next, we change hostname on /etc/hostname and edit /etc/hosts

$ hostname -F /etc/hostname

Installing MySQL database sever and 32-bit libraries

$ apt-get install mysql-server python-mysqldb

Make sure MySQL 5.6 (or lower) and Python 2 (not 3) installed with above command

$ apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

Install ia32-libs replacements with above apt-get command

Installing Postfix, Java SE SDK, Tomcat for OpenEMM

$ groupadd openemm
$ useradd -m -g openemm -G adm -d /home/openemm -s /bin/bash -c 「OpenEMM-2015」 openemm

$ apt-get install postfix

Please see appendix B for further details. BTW, if you plan to use Postfix you do not have to start (or stop) it, since this is already done by the start script of OpenEMM.

Also refer to 3.3 on Page 5

Download Java SE SDK from

We installed SDK 8u112 Linux x64 on December 2016.

$ mkdir -p /opt/openemm
$ cp ~sammyfung/jdk-8u112-linux-x64.tar.gz /opt/openemm/
$ cd /opt/openemm
$ tar -xvzf jdk-8u112-linux-x64.tar.gz
$ ln -s jdk1.8.0_112 java
$ java/bin/java -version
java version 「1.8.0_112」
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

Additionally, install JCE Java Cryptography Extension from

$ apt-get install unzip
$ unzip ~sfung/
$ cp UnlimitedJCEPolicyJDK8/*.jar /opt/openemm/java/jre/lib/security

If you want to use an installed JDK, simply edit /home/openemm/bin/ after the installation of the OpenEMM tarball and adjust the parameter JAVA_HOME accordingly.

Download Tomcat 8 from and we installed Tomcat 8.5.8 on December 2016.

$ cd /opt/openemm/
$ tar -xvzf ~/apache-tomcat-8.5.8.tar.gz
$ ln -s apache-tomcat-8.5.8 tomcat

Let’s test installed Tomcat

$ export JAVA_HOME=/opt/openemm/java
$ cd tomcat
$ bin/

Try http://hostname.domainname:8080 on your web browser.

$ bin/

Installing OpenEMM

We skipped Part 6 Firewall setup.

Download OpenEMM from

To use Postfix instead of Sendmail, OpenEMM 2015 R3 (or above) is required.

$ cd /home
$ mv openemm openemm-2015
$ ln -s openemm-2015 openemm
$ cd /home/openemm
$ mkdir -p /usr/share/doc/OpenEMM-2015
$ mv USR_SHARE/* /usr/share/doc/OpenEMM-2015
$ rm -r USR_SHARE

$ service mysql restart
$ cd /usr/share/doc/OpenEMM-2015

For new OpenEMM installation, to install database

$ mysqladmin -u root -p create openemm_cms
$ mysql -u root -p openemm_cms < openemm_cms-2015.sql
$ mysqladmin -u root -p create openemm
$ vim openemm-2015_R3.sql

According page 11 A), we change http://localhost:8080 to http://yourhostname.domainname:8080 for URL redirection. And replace empty string 」 next to above URL to yourhostname.domainname to use mailloop. Save the SQL file and import to MySQL.

$ mysql -u root -p openemm < openemm-2015_R3.sql

$ vim /home/openemm/webapps/openemm/WEB-INF/classes/

change system.url

$ vim /home/openemm/webapps/openemm/WEB-INF/classes/

change cms.ccr.url

Starting OpenEMM

$ su – openemm
$ start

Tomcat check failure, I found issue should be permission denied

$ ls /opt/openemm/tomcat/bin/
ls: cannot open directory /opt/openemm/tomcat/bin/: Permission denied

I solved it with the following commands.

$ chown -R openemm.openemm /opt/openemm/tomcat
$ chown -R openemm.openemm /opt/openemm/apache-tomcat-8.5.8

Try to login OpenEMM again with default login name and password: admin / openemm

Please change the password of admin after successful login.

Notes: Sending to Yahoo

Error might occur when sending to Yahoo, adjusting email campaign setting might solve it.

Notes: Reverse DNS (PTR record) and Postfix

Few email servers will receive from other email servers with hostname matching its PTR record. You can change the hostname at the PTR record of your Linode instance at Linode admin dashboard.

Alternatively, you can modify your hostname ($my_hostname) to match PTR record at Postfix config file.

Related posts

Sammy Fung

Sammy 是 Linux 技術顧問,擁有 20 年 Linux 技術經驗。