CipherMail Gateway Installation Guide



Similar documents
CipherMail Gateway Upgrade Guide

Ciphermail Gateway Separate Front-end and Back-end Configuration Guide

Configuring MailArchiva with Insight Server

OpenGeo Suite for Linux Release 3.0

Installation Guide. Copyright (c) 2015 The OpenNMS Group, Inc. OpenNMS SNAPSHOT Last updated :19:20 EDT

Installing Dspace 1.8 on Ubuntu 12.04

IUCLID 5 Guidance and support. Installation Guide Distributed Version. Linux - Apache Tomcat - PostgreSQL

JAMF Software Server Installation Guide for Linux. Version 8.6

1. Product Information

Online Backup Client User Manual Linux

SnapLogic Sidekick Guide

RecoveryVault Express Client User Manual

Online Backup Linux Client User Manual

Online Backup Client User Manual

Partek Flow Installation Guide

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.0

CactoScale Guide User Guide. Athanasios Tsitsipas (UULM), Papazachos Zafeirios (QUB), Sakil Barbhuiya (QUB)

ZCP trunk (build 51762) Z-Admin Manual. The Z-Admin Manual

An Esri White Paper March 2012 How to Set Up Esri Geoportal Server on Linux

Net/FSE Installation Guide v1.0.1, 1/21/2008

Mastering Advanced GeoNetwork

Online Backup Client User Manual

Verax Service Desk Installation Guide for UNIX and Windows

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

Administrator s Guide: perfsonar MDM 3.0

CN=Monitor Installation and Configuration v2.0

SOLR INSTALLATION & CONFIGURATION GUIDE FOR USE IN THE NTER SYSTEM

GeBro-BACKUP. Die Online-Datensicherung. Manual Pro Backup Client on a NAS

StreamServe Persuasion SP5 StreamStudio

Avira Update Manager User Manual

Git Fusion Guide August 2015 Update

Configure a Mail Server

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

USER GUIDE. Snow Inventory Client for Unix Version Release date Document date

JAMF Software Server Installation and Configuration Guide for Linux. Version 9.2

Enterprise Reporting Server v3.5

Setting up Ensembl Solr Search on an Ubuntu external server 22nd November 2013

Parallels Plesk Automation

ESET Mail Security & Zarafa 7 infrastructure Integration

How to Configure a BYOD Environment with the Unified AP in Standalone Mode

Ciphermail for BlackBerry Quick Start Guide

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

VERSION 9.02 INSTALLATION GUIDE.

DocuShare Installation Guide

ARIS Server Installation and Administration Guide ARIS. Version Service Release 1

Installation & Upgrade Guide

Installation and Deployment

Addonics T E C H N O L O G I E S. NAS Adapter. Model: NASU Key Features

Tableau Spark SQL Setup Instructions

Ciphermail Gateway Web LDAP Authentication Guide

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Installing the SSL Client for Linux

Lucid Key Server v2 Installation Documentation.

Kerio Connect. Administrator s Guide. Kerio Technologies

Online Backup Client User Manual Mac OS

Online Backup Client User Manual Mac OS

Written by Wirabumi Software Sunday, 30 December :27 - Last Updated Thursday, 03 January :52

Setting Up CAS with Ofbiz 5

Recommended File System Ownership and Privileges

KASPERSKY LAB. Kaspersky Anti-Virus 5.5 for Linux and FreeBSD Mail Servers ADMINISTRATOR S GUIDE

Wolfr am Lightweight Grid M TM anager USER GUIDE

Prerequisites and Configuration Guide

CommandCenter Secure Gateway

Introweb Remote Backup Client for Mac OS X User Manual. Version 3.20

Perforce Helix Threat Detection On-Premise Deployment Guide

Clearswift Information Governance

IBM WebSphere Application Server Version 7.0

QuickStart Guide for Managing Mobile Devices. Version 9.2

OS Installation: CentOS 5.8

Online Backup Client User Manual

Kerio MailServer 6. Administrator s Guide. Kerio Technologies

Cassandra Installation over Ubuntu 1. Installing VMware player:

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Dataworks System Services Guide

Installation and Administration Guide

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Rev 7 06-OCT Site Manager Installation Guide

VMware vcenter Log Insight Security Guide

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

DESLock+ Basic Setup Guide Version 1.20, rev: June 9th 2014

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Zend Server 5.0 Reference Manual

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

GroundWork Monitor Open Source Installation Guide

Tcat Server User s Guide. Version 6 R2 December 2009

Deployment - post Xserve

Creating an ESS instance on the Amazon Cloud

Plexxi Control Installation Guide Release 2.1.0

Simple. Control Panel. for your Linux Server. Getting Started Guide. Simple Control Panel // Linux Server

insync Installation Guide

14. CUCM 8 - free sftp solution for backup on ubuntu server

OPENPROJECT INSTALL ON CENTOS 7 RUNNING IN VMWARE PLAYER

Detailed Revision History: Advanced Internet System Management (v5.07)

University of Amsterdam VPN Linux User Guide (Version 1.2)

Implementing a SPAM and virus scanning mail server using RedHat Linux 8.0

A SHORT INTRODUCTION TO DUPLICITY WITH CLOUD OBJECT STORAGE. Version

Setting up PostgreSQL

Transcription:

CIPHERMAIL EMAIL ENCRYPTION CipherMail Gateway Installation Guide March 26, 2015, Rev: 9094

Copyright c 2008-2015, ciphermail.com. Acknowledgments: Thanks goes out to Andreas Hödle for feedback and input on gateway security.

CONTENTS CONTENTS Contents 1 Introduction 4 2 Ubuntu & Debian 4 2.1 Configure PostgreSQL........................ 5 2.2 Install CipherMail........................... 5 2.3 Configure scripts........................... 6 2.3.1 sudo.............................. 7 2.4 Configure backup........................... 7 2.5 Configure Postfix........................... 8 2.6 Install Tomcat............................. 9 2.7 Finalize................................ 11 3 Red Hat 5 & CentOS 5 13 3.1 SELinux................................ 13 3.2 Configure firewall........................... 13 3.3 Configure PostgreSQL........................ 14 3.4 Install CipherMail........................... 15 3.5 Configure scripts........................... 16 3.5.1 sudo.............................. 16 3.6 Configure backup........................... 17 3.7 Configure Postfix........................... 17 3.8 Install Tomcat............................. 20 3.9 Finalize................................ 21 4 Red Hat 6 & CentOS 6 23 4.1 SELinux................................ 23 4.2 Configure PostgreSQL........................ 24 4.3 Install CipherMail........................... 25 4.4 Configure scripts........................... 26 4.4.1 sudo.............................. 26 4.5 Configure backup........................... 27 4.6 Configure Postfix........................... 27 4.7 Install Tomcat............................. 29 4.8 Finalize................................ 30 A Configure Tomcat on Debian 5 32 B Adding Tomcat HTTPS connector 33 B.1 Tomcat 5............................... 33 B.2 Tomcat 6............................... 34 C Memory usage 35 D Securing the gateway 36 D.1 Port usage.............................. 36 D.2 Passwords.............................. 36 D.3 SSL certificate............................ 37 D.4 Prevent spoofing the From header................. 37 D.5 Securing the database........................ 37 2

CONTENTS CONTENTS D.6 Block access to WEB GUI...................... 37 3

2 UBUNTU & DEBIAN 1 Introduction This installation guide provides step-by-step instructions on how to install CipherMail. If CipherMail is going to be installed on Ubuntu, Debian, Red Hat or CentOS, you are advised to use the quick install guide which explains how to install CipherMail using the.deb or.rpm packages. If you do not want to use the.deb or.rpm packages or, if CipherMail need to be installed on a system not supported by the.deb or.rpm packages, use this guide. Although this guide assumes that CipherMail will be installed on Ubuntu, Debian, Red Hat or CentOS, installation on other system will be similar and typically require only minor changes. You are recommended to install CipherMail on a dedicated and clean machine. Note: The recommended way to install CipherMail is by using the DEB and RPM packages. See the quick install guide on how to install CipherMail with the DEB and RPM packages. Requirements PostgreSQL Postfix OpenJDK 6/7 ANT, ANT-optional Tomcat (or some other Servlet container) Note: commands that should be executed by the user are shown on lines starting with a $ sign (the $ sign is not part of the command to execute). It is recommended to copy and paste the commands directly to the command line. WARNING do not install CipherMail on a live email system! 2 Install CipherMail on Ubuntu & Debian This section explains how to install CipherMail on Ubuntu and Debian. Install required packages 12 $ sudo apt-get install postgresql postfix openjdk-7-jre \ openjdk-7-jre-headless tzdata-java ant ant-optional \ mktemp wget libsasl2-modules symlinks 1 The sudo package is required by CipherMail. Debian does not install sudo by default. If installing on Debian, sudo must be installed prior to installing CipherMail. 2 Alternatively, OpenJDK 6 can be installed instead of OpenJDK 7. 4

2.1 Configure PostgreSQL 2 UBUNTU & DEBIAN Note: during the installation of Postfix, select No Configuration. Check default Java version Before continuing, make sure that Java is properly installed. The following command should report that the default Java version is OpenJDK. $ java -version The output should indicate that Java version is 1.7 and that OpenJDK is used: java version "1.7.0_55" OpenJDK Runtime Environment (IcedTea 2.4.7) 2.1 Configure PostgreSQL CipherMail stores all settings in a PostgreSQL database. Create database user Create the database user djigzo with password djigzo 3. $ echo "CREATE USER djigzo NOCREATEUSER NOCREATEDB ENCRYPTED PASSWORD \ 'md5b720bc9de4ca53d53a4059882a0868b9';" sudo -u postgres psql Create database Create the database djigzo owned by database user djigzo. $ sudo -u postgres createdb --owner djigzo djigzo 2.2 Install CipherMail User and group djigzo with home dir /usr/local/djigzo should be created. CipherMail will be installed in the djigzo home dir and CipherMail will be running as user djigzo. $ sudo adduser --system --group --home /usr/local/djigzo \ --disabled-password --shell /bin/false djigzo Add user djigzo to the adm group to allow user djigzo to read the Postfix log files 4. $ sudo usermod -a -G adm djigzo Create a directory for CipherMail web owned by djigzo. $ sudo mkdir /usr/local/djigzo-web $ sudo chown djigzo:djigzo /usr/local/djigzo-web 3 The encoded password is equal to md5 concatenated with the MD5 hash of the username and password. 4 Only required if CipherMail Web GUI should be allowed to show Postfix log file content. 5

2.3 Configure scripts 2 UBUNTU & DEBIAN Download CipherMail A full installation of CipherMail requires the Cipher- Mail encryption back-end and the Web GUI front-end. Both can be downloaded from http://www.ciphermail.com. The following two.tar.gz files are required 5 : djigzo_2.10.0-3.tar.gz djigzo-web_2.10.0-3.tar.gz Untar the files $ sudo -u djigzo tar xzf djigzo_*.tar.gz --directory \ /usr/local/djigzo/ $ sudo -u djigzo tar xzf djigzo-web_*.tar.gz --directory \ /usr/local/djigzo-web/ Run post install script Some initialization will be done with an ANT script. $ cd /usr/local/djigzo $ sudo -u djigzo ant Import the database schema into Post- Importing the database schema gresql. $ sudo -u djigzo psql djigzo < /usr/local/djigzo/conf/djigzo.sql Update location of CipherMail CipherMail should be automatically started at system startup. The startup script should know the path where CipherMail is installed. $ sudo bash -c 'echo "DJIGZO_HOME=/usr/local/djigzo" >> \ /etc/default/djigzo' Add startup to init.d A softlink to the startup script will be added to /etc/init.d directory and /etc/rc?.d will be updated. $ sudo ln -s /usr/local/djigzo/scripts/djigzo /etc/init.d/ $ sudo update-rc.d djigzo defaults 2.3 Configure scripts For some of it s functionality, for example managing the Postfix mail queues, shell scripts will be used. These shell scripts should be executable, owned by root and only writeable by root. Some scripts will be executed from the scripts.d directory and symlinks should therefore be created: 5 The exact version will be different when a new version is released. 6

2.4 Configure backup 2 UBUNTU & DEBIAN $ cd /usr/local/djigzo/scripts/scripts.d $ sudo ln -s../backup.sh $ sudo ln -s../daemonized-restart.sh $ sudo ln -s../postfix-main-config.sh $ sudo ln -s../postfix.sh $ sudo ln -s../sasl.sh $ sudo ln -s../system.sh The scripts should be executable, owned by root and only writeable by owner: $ sudo chown -R root:root /usr/local/djigzo/scripts/* $ sudo chmod -R 755 /usr/local/djigzo/scripts/* 2.3.1 sudo For some scripts root access is required (for example to configure Postfix). To allow these scripts to run as root, certain lines should be added to the sudoers file. The following lines should be added to the sudoers file: User_Alias DJIGZO_USERS = djigzo Cmnd_Alias DJIGZO_COMMANDS = /usr/local/djigzo/scripts/do-execute-script.sh DJIGZO_USERS ALL=(ALL) NOPASSWD: DJIGZO_COMMANDS The sudoers file should be edited with visudo. $ sudo visudo 2.4 Configure backup CipherMail contains a backup functionality which can backup all the relevant settings. The files to backup will be read from the conf/backup.d directory. A symlink to the default list of files to backup should be added. $ cd /usr/local/djigzo/conf/backup.d/ $ sudo ln -s../backup_files The conf/backup.d directory should be owned by root and only writeable by the owner. 7

2.5 Configure Postfix 2 UBUNTU & DEBIAN $ sudo chown -R root:root /usr/local/djigzo/conf/backup.d/ $ sudo chmod -R 755 /usr/local/djigzo/conf/backup.d/ The backup_files file should be owned by root and only writeable by the owner. $ sudo chown root:root /usr/local/djigzo/conf/backup_files $ sudo chmod 644 /usr/local/djigzo/conf/backup_files 2.5 Configure Postfix CipherMail uses Postfix for sending and receiving of email (MTA) 6. CipherMail functions as a Postfix after queue filter. Postfix should therefore be configured to work with the encryption back-end. Two pre-configured Postfix configuration files, main.cf and master.cf, can be found in /usr/local/djigzo/conf/system. It is recommended to use these preconfigured Postfix configuration files. If Postfix is already configured and the existing settings should not be overwritten, the existing Postfix configuration files should be manually merged with the configuration files provided by Cipher- Mail. The most important Postfix configuration settings required by CipherMail will be discussed next. main.cf configuration The Postfix main configuration file should contain at minimal the content filter setting which tells Postfix that all email should be handled by the CipherMail encryption back-end. The content filter setting tells Postfix that the service running on 127.0.0.1:10025 will function as an after queue filter 7. content_filter = djigzo:[127.0.0.1]:10025 The other settings in the pre-configured main.cf file are only required for the MTA configuration page of CipherMail Web GUI. Settings starting with djigzo will be replaced when changes on the MTA page are applied. The djigzo... settings are used by main.cf and master.cf (the settings are referenced as ${djigzo...}). master.cf configuration the following lines: The Postfix master configuration file requires at least djigzo unix - - n - 4 smtp -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o smtp_generic_maps= 6 It is possible to use another MTA instead of Postfix, like for example Exim, but that s beyond the scope of this manual. 7 If you already configured a content filter you should configure additional filters in master.cf. This will however not be explained in this guide. 8

2.6 Install Tomcat 2 UBUNTU & DEBIAN 127.0.0.1:10026 inet n - n - 10 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks, no_header_body_checks,no_milters -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_authorized_xclient_hosts=127.0.0.0/8 message size limit Because CipherMail functions as an after queue filter the message size can be increased after being handled by the encryption backend. For example, signing a message will slightly increase the message because of the S/MIME signature. The after queue message size limit should therefore be larger than the message size limit before filtering (otherwise Postfix will reject the message after filtering). To make sure that the before filter size limit is lower than the after filter size limit, a limit should be set on the smtpd service. smtp inet n - - - - smtpd -o message_size_limit=${djigzo_before_filter_message_size_limit} Copy postfix config files It is advised to use the pre-configured Postfix configuration files. The pre-configured configuration files should be copied to the Postfix config directory. WARNING! THIS WILL OVERWRITE ALL SETTINGS IN THE ORIGINAL POSTFIX CONFIG FILES SO ONLY DO THIS IF THE ORIGINAL SETTINGS MAY BE OVERWRITTEN. IF EXISTING POSTFIX SETTINGS MUST BE KEPT YOU SHOULD MERGE THE REQUIRED CHANGES MANUALLY. $ sudo cp /usr/local/djigzo/conf/system/main.cf /etc/postfix/main.cf $ sudo cp /usr/local/djigzo/conf/system/master.cf /etc/postfix/master.cf Update aliases Postfix uses /etc/alias as the alias file. Make sure that the alias file is available and up-to-date. $ sudo newaliases Restart postfix $ sudo /etc/init.d/postfix restart 2.6 Install Tomcat Install the required Tomcat package $ sudo apt-get install tomcat6 9

2.6 Install Tomcat 2 UBUNTU & DEBIAN Set djigzo-web.home The system property djigzo-web.home should reference the location where CipherMail Web GUI is stored. The property will be added to the Tomcat default config file. $ sudo bash -c 'echo "JAVA_OPTS=\"\$JAVA_OPTS -Ddjigzo-web.home=\ /usr/local/djigzo-web\"" >> /etc/default/tomcat6' Configure Tomcat memory usage In order to allow the import of very large certificate files (.p7b or.pfx files with thousands of certificates) CipherMail requires that Tomcat is setup with at least 128 MB heap size. $ sudo bash -c 'echo "JAVA_OPTS=\"\$JAVA_OPTS \ -Djava.awt.headless=true -Xmx128M\"" >> /etc/default/tomcat6' Disable Java security manager CipherMail currently does not function properly when the Tomcat Java security manager is enabled. The Tomcat Java security manager should therefore be disabled. $ sudo bash -c 'echo "TOMCAT6_SECURITY=no" >> /etc/default/tomcat6' Allow reading and writing of SSL certificate CipherMail Web GUI allows new SSL certificates for the Web GUI to be uploaded using the SSL page. To support this functionality, Tomcat should be allowed to read and write the SSL certificate. $ sudo chown tomcat6:djigzo /usr/local/djigzo-web/ssl/sslcertificate.p12 Adding an HTTPS connector An HTTPS connector should be added to the Tomcat server configuration. If Tomcat is only used by CipherMail, it s advised to replace the existing Tomcat configuration file (/etc/tomcat6/server.xml) with the configuration file provided by CipherMail. $ sudo cp /usr/local/djigzo-web/conf/tomcat/server.xml /etc/tomcat6/ The path to djigzo-web should be updated $ sudo sed s#/share/djigzo-web/#/local/djigzo-web/# \ /etc/tomcat6/server.xml --in-place Note: if you want to keep the existing server.xml you need to manually add the HTTPS Connector. See Appendix B for more information. Adding the Web admin context enable the Web admin application. A context should be added to Tomcat to $ sudo bash -c 'echo "<Context docbase=\"/usr/local/djigzo-web/djigzo.war\ \" unpackwar=\"false\"/>" > /etc/tomcat6/catalina/localhost/ciphermail.xml' 10

2.7 Finalize 2 UBUNTU & DEBIAN Note: if you want CipherMail to use the root context, save the context file to ROOT.xml (overwriting the existing file) instead of to ciphermail.xml 8. Adding the Web portal context If the portal functionality is required, a specific portal context should be added to Tomcat. $ sudo bash -c 'echo "<Context docbase=\"/usr/local/djigzo-web/djigzo-portal.war\ \" unpackwar=\"false\"/>" > /etc/tomcat6/catalina/localhost/web.xml' Restart Tomcat configuration. Tomcat should be restarted to make it use the new Tomcat $ sudo /etc/init.d/tomcat6 restart 2.7 Finalize Create a softlink to the djigzo log file. $ sudo ln -s /usr/local/djigzo/logs/james.wrapper.log /var/log/djigzo.log Protect files user djigzo. Some files containing passwords should only be readable by $ sudo chmod 640 /usr/local/djigzo/conf/djigzo.properties $ sudo chmod 640 /usr/local/djigzo/conf/hibernate.cfg.xml Restart services Restart Postfix and CipherMail. $ sudo /etc/init.d/postfix restart $ sudo /etc/init.d/djigzo restart Open the Web GUI CipherMail should now be running (wait some time for Tomcat to startup). The login page can be accessed using the following URL https://192.168.178.2:8443/ciphermail 9 (change the IP address accordingly) Note: CipherMail comes with a pre-installed SSL certificate which is not by default trusted by your browser. You should therefore manually accept the SSL certificate. Login Use the following login credentials: username: password: admin admin 8 the root context allows you to access CipherMail using a URL of the form https://192.168.178.2:8443 instead of https://192.168.178.2:8443/ciphermail 9 if CipherMail was installed as the root context, the URL should be https://192.168.178.2:8443 11

2.7 Finalize 2 UBUNTU & DEBIAN Note: the login procedure can take some time after a restart because the Web GUI requires some internal initialization after a restart. If CipherMail is not running, check the following log files for er- Log output rors: CipherMail log $ less /var/log/djigzo.log Tomcat log $ sudo less /var/log/tomcat6/catalina.out Note: replace * with the current date to view the most recent log file. 12

3 RED HAT 5 & CENTOS 5 3 Install CipherMail on Red Hat 5 & CentOS 5 This section explains how to install CipherMail on Red Hat 5 and CentOS 5. It is assumed that all commands are run as root (i.e., the user is logged in as root). 3.1 SELinux By default SELinux is enabled on RedHat/CentOS. SELinux prevents certain operations to be executed which are required by CipherMail. For example, a local listening port on port 10026 must be opened by Postfix (this port is used by CipherMail as the Postfix reinjection port). SELinux however, by default, does not allow this. Disabling SELinux is recommended if you are not familiar with SELinux. SELinux can be disabled by editing the file /etc/sysconfig/selinux. SELINUX to disabled and reboot the server. Set 3.2 Configure firewall Red Hat and CentOS by default block access to most ports. The firewall should therefore be configured to allow access to certain ports used by CipherMail. The following ports should be remotely accessible: 25 (SMTP) and 8443 10. The firewall can be configured with the system-config-securitylevel-tui tool. $ yum install system-config-securitylevel-tui $ system-config-securitylevel-tui Note: port numbers should be postfixed with :tcp. For example, to open port 8443, add 8443:tcp to the port configuration. Install required packages $ yum install redhat-lsb postgresql postgresql-server postfix \ java-1.6.0-openjdk ant ant-nodeps mktemp wget system-switch-mail Check default Java version Before continuing make sure that Java is properly installed. The following command should report that the default Java version is OpenJDK. $ java -version The output should indicate that Java version is 1.6 and that OpenJDK is used: java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.9) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) 10 See Appendix D.1 for an overview of all ports used by CipherMail. 13

3.3 Configure PostgreSQL 3 RED HAT 5 & CENTOS 5 3.3 Configure PostgreSQL CipherMail stores all settings in a PostgreSQL database. Make PostgreSQL autostart PostgreSQL should be started at reboot. $ /sbin/chkconfig postgresql on Start PostgreSQL $ /sbin/service postgresql start Enable password authentication By default PostgreSQL does not allow applications to login with user name and password. PostgreSQL should be configured to allow login with user name and password by editing the file: /var/lib/pgsql/data/pg_hba.conf. The line containing ident sameuser should be commented out (or completely removed) and a line with md5 authentication should be added: $ vi /var/lib/pgsql/data/pg_hba.conf #host all all 127.0.0.1/32 ident sameuser host all all 127.0.0.1/32 md5 Enable autovacuum With the default install of PostgreSQL on RedHat/CentOS, the autovacuum service is not enabled. The PostgreSQL vacuum command should be run on a regular basis to keep the database in optimal shape and to make sure that disk space occupied by updated or deleted rows is automatically recovered. The autovacuum service should be enabled by uncommenting and changing the following settings in the PostgreSQL main configuration file. $ vi /var/lib/pgsql/data/postgresql.conf stats_start_collector = on stats_row_level = on autovacuum = on autovacuum_naptime = 60 Restart PostgreSQL take effect. PostgreSQL should be restarted for the changes to $ /sbin/service postgresql restart 14

3.4 Install CipherMail 3 RED HAT 5 & CENTOS 5 Create database user Create the database user djigzo with password djigzo 11. $ echo "CREATE USER djigzo NOCREATEUSER NOCREATEDB ENCRYPTED PASSWORD \ 'md5b720bc9de4ca53d53a4059882a0868b9';" sudo -u postgres psql Create database Create the database djigzo owned by database user djigzo. $ sudo -u postgres createdb --owner djigzo djigzo 3.4 Install CipherMail User and group djigzo with home dir /usr/local/djigzo should be created. CipherMail will be installed in the djigzo home dir and CipherMail will be running as user djigzo. $ /usr/sbin/adduser --home-dir /usr/local/djigzo -m \ --shell /sbin/nologin djigzo Create a directory for CipherMail web which will be owned by djigzo. $ mkdir /usr/local/djigzo-web $ chown djigzo:djigzo /usr/local/djigzo-web Download CipherMail A full installation of CipherMail requires the Cipher- Mail encryption back-end and the Web GUI front-end. Both can be downloaded from http://www.ciphermail.com. The following two.tar.gz files are required 12 : djigzo_2.10.0-3.tar.gz djigzo-web_2.10.0-3.tar.gz Untar the files Untar and make the files owned by user djigzo. $ tar xzf djigzo_*.tar.gz --directory /usr/local/djigzo/ $ chown -R djigzo:djigzo /usr/local/djigzo $ tar xzf djigzo-web_*.tar.gz --directory /usr/local/djigzo-web/ $ chown -R djigzo:djigzo /usr/local/djigzo-web Run post install script Some initialization will be done with an ANT script. $ cd /usr/local/djigzo $ sudo -u djigzo ant Import the database schema into Post- Importing the database schema gresql. $ sudo -u djigzo psql djigzo < /usr/local/djigzo/conf/djigzo.sql 11 The encoded password is equal to md5 concatenated with the MD5 hash of the user name and password. 12 The exact version will be different when a new version is released. 15

3.5 Configure scripts 3 RED HAT 5 & CENTOS 5 Copy startup script Red Hat/CentOS requires a modified startup script (overwrite the existing script). $ cp /usr/local/djigzo/dist/redhat/djigzo /usr/local/djigzo/scripts/ Update location of CipherMail CipherMail should be automatically started at system startup. The startup script should know the path where CipherMail is installed. $ echo "DJIGZO_HOME=/usr/local/djigzo" >> /etc/default/djigzo Add startup to init.d A softlink to the startup script will be added to /etc/init.d directory and /etc/rc?.d will be updated. $ ln -s /usr/local/djigzo/scripts/djigzo /etc/init.d/ $ /sbin/chkconfig --add djigzo 3.5 Configure scripts For some of it s functionality, for example managing the Postfix mail queues, shell scripts will be used. These shell scripts should be executable, owned by root and only writeable by root. Some scripts will be executed from the scripts.d directory and symlinks should therefore be created: $ cd /usr/local/djigzo/scripts/scripts.d $ ln -s../backup.sh $ ln -s../daemonized-restart.sh $ ln -s../postfix-main-config.sh $ ln -s../postfix.sh $ ln -s../sasl.sh $ ln -s../system.sh The scripts should be executable, owned by root and only writeable by owner: $ chown -R root:root /usr/local/djigzo/scripts/* $ chmod -R 755 /usr/local/djigzo/scripts/* 3.5.1 sudo For some scripts root access is required (for example to configure Postfix). To allow these scripts to run as root, certain lines should be added to the sudoers file. 16

3.6 Configure backup 3 RED HAT 5 & CENTOS 5 The following lines should be added to the sudoers file: User_Alias DJIGZO_USERS = djigzo Cmnd_Alias DJIGZO_COMMANDS = /usr/local/djigzo/scripts/do-execute-script.sh DJIGZO_USERS ALL=(ALL) NOPASSWD: DJIGZO_COMMANDS By default Red Hat/CentOS enable the sudoers setting requiretty. This should be commented out because CipherMail need to run commands without a tty (the line containing requiretty can be found halfway the sudoers file). # requiretty must be commented out! #Defaults requiretty The sudoers file should be edited with visudo. $ visudo 3.6 Configure backup CipherMail contains a backup functionality which can backup all the relevant settings. The files to backup will be read from the conf/backup.d directory. A symlink to the default list of files to backup should be added. $ cd /usr/local/djigzo/conf/backup.d/ $ ln -s../backup_files The conf/backup.d directory should be owned by root and only writeable by the owner. $ chown -R root:root /usr/local/djigzo/conf/backup.d/ $ chmod -R 755 /usr/local/djigzo/conf/backup.d/ The backup_files file should be owned by root and only writeable by the owner. $ chown root:root /usr/local/djigzo/conf/backup_files $ chmod 644 /usr/local/djigzo/conf/backup_files 3.7 Configure Postfix CipherMail uses Postfix for sending and receiving of email (MTA) 13. CipherMail functions as a Postfix after queue filter. Postfix should therefore be configured to work with the encryption back-end. Two pre-configured Postfix configuration files, main.cf and master.cf, can be 13 It is possible to use another MTA instead of Postfix, like for example Exim, but that s beyond the scope of this manual. 17

3.7 Configure Postfix 3 RED HAT 5 & CENTOS 5 found in /usr/local/djigzo/conf/system and /usr/local/djigzo/dist/redhat/. It is recommended that these Postfix configuration files are used. If Postfix is already configured and the existing settings should not be overwritten, the existing Postfix configuration files should be manually merged with the configuration files provided by CipherMail. The most important Postfix configuration settings required by CipherMail will be discussed next. main.cf configuration The Postfix main configuration file should contain at minimal the content filter setting which tells Postfix that all email should be handled by the CipherMail encryption back-end. The content filter setting tells Postfix that the service running on 127.0.0.1:10025 will function as an after queue filter 14. content_filter = djigzo:[127.0.0.1]:10025 The other settings in the pre-configured main.cf file are only required for the MTA configuration page of CipherMail Web GUI. Settings starting with djigzo will be replaced when changes on the MTA page are applied. The djigzo... settings are used by main.cf and master.cf (the settings are referenced as ${djigzo...}). master.cf configuration the following lines: The Postfix master configuration file requires at least djigzo unix - - n - 4 smtp -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o smtp_generic_maps= 127.0.0.1:10026 inet n - n - 10 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks, no_header_body_checks,no_milters -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_authorized_xclient_hosts=127.0.0.0/8 message size limit Because CipherMail functions as an after queue filter the message size can be increased after being handled by the encryption backend. For example, signing a message will slightly increase the message because of the S/MIME signature. The after queue message size limit should 14 If you already configured a content filter you should configure additional filters in master.cf. This will however not be explained in this guide. 18

3.7 Configure Postfix 3 RED HAT 5 & CENTOS 5 therefore be larger than the message size limit before filtering (otherwise Postfix will reject the message after filtering). To make sure that the before filter size limit is lower than the after filter size limit, a limit should be set on the smtpd service. smtp inet n - - - - smtpd -o message_size_limit=${djigzo_before_filter_message_size_limit} Copy postfix config files It is advised to use the pre-configured Postfix configuration files. The pre-configured configuration files should be copied to the Postfix config directory. WARNING! THIS WILL OVERWRITE ALL SETTINGS IN THE ORIGINAL POSTFIX CONFIG FILES SO ONLY DO THIS IF THE ORIGINAL SETTINGS MAY BE OVERWRITTEN. IF EXISTING POSTFIX SETTINGS MUST BE KEPT YOU SHOULD MERGE THE REQUIRED CHANGES MANUALLY. $ cp /usr/local/djigzo/conf/system/main.cf /etc/postfix/main.cf $ cp /usr/local/djigzo/dist/redhat/master.cf /etc/postfix/ Update aliases Postfix uses /etc/alias as the alias file. Make sure that the alias file is available and up-to-date. $ newaliases Make Postfix the default MTA A Postfix after queue filter is used for encrypting and decrypting incoming and outgoing email. Red Hat/CentOS installs Sendmail by default. Because CipherMail requires Postfix we must switch the default MTA from Sendmail to Postfix. $ system-switch-mail Optionally, if Sendmail is no longer required, Sendmail can be removed. $ yum remove sendmail Restart postfix $ /sbin/service postfix restart Note: If Postfix was not yet running Shutting down postfix will fail. This can be ignored. Make mail logs readable The mail logs should be readable by user djigzo. $ chmod +r /var/log/maillog 19

3.8 Install Tomcat 3 RED HAT 5 & CENTOS 5 Update log paths CipherMail by default expects the mail logs to be stored in mail.log. Red Hat/CentOS however store the mail logs in maillog. The paths in soap.xml should be updated. $ sed s#/var/log/mail.log.1#/var/log/maillog.1# \ /usr/local/djigzo/conf/spring/soap.xml --in-place $ sed s#/var/log/mail.log#/var/log/maillog# \ /usr/local/djigzo/conf/spring/soap.xml --in-place 3.8 Install Tomcat $ yum install tomcat5 CipherMail web requires xalan jars in the Tom- Add xalan to endorsed jars cat endorsed directory. $ rebuild-jar-repository /var/lib/tomcat5/common/endorsed \ xalan-j2-2.7.0.jar $ rebuild-jar-repository /var/lib/tomcat5/common/endorsed \ xalan-j2-serializer-2.7.0.jar Update Javamail Red Hat/CentOS by default installs an older version of Javamail. The newer version of Javamail provided by CipherMail will be added as a new alternative. $ alternatives --install /usr/share/java/javamail.jar javamail \ /usr/local/djigzo/lib/mail.jar 20000 Set djigzo-web.home The system property djigzo-web.home should reference the location where CipherMail Web GUI is stored. The property will be added to the Tomcat default config file. $ echo "JAVA_OPTS=\"\$JAVA_OPTS -Ddjigzo-web.home=\ /usr/local/djigzo-web\"" >> /etc/sysconfig/tomcat5 Configure Tomcat memory usage In order to allow the import of very large certificate files (.p7b or.pfx files with thousands of certificates) CipherMail requires that Tomcat is setup with at least 128 MB heap size. $ echo "JAVA_OPTS=\"\$JAVA_OPTS \ -Djava.awt.headless=true -Xmx128M\"" >> /etc/sysconfig/tomcat5 Adding an HTTPS connector An HTTPS connector should be added to the Tomcat server configuration. If Tomcat is only used by CipherMail, it s advised to replace the existing Tomcat configuration file (/etc/tomcat5/server.xml) with the configuration file provided by CipherMail. 20

3.9 Finalize 3 RED HAT 5 & CENTOS 5 $ cp /usr/local/djigzo-web/conf/tomcat/server-t5.xml /etc/tomcat5/server.xml The path to djigzo-web should be updated to make sure the SSL certificate is loaded from /usr/local/djigzo-web. $ sed s#/share/djigzo-web/#/local/djigzo-web/# \ /etc/tomcat5/server.xml --in-place Note: if you want to keep the existing server.xml you need to manually add the HTTPS Connector. See Appendix B for more information. Adding the Web admin context enable the Web admin application. A context should be added to Tomcat to $ echo "<Context docbase=\"/usr/local/djigzo-web/djigzo.war\" unpackwar=\ \"false\"/>" > /etc/tomcat5/catalina/localhost/ciphermail.xml Note: if you want CipherMail to use the root context, save the context file to ROOT.xml (overwriting the existing file) instead of to ciphermail.xml 15. Adding the Web portal context If the portal functionality is required, a specific portal context should be added to Tomcat. $ echo "<Context docbase=\"/usr/local/djigzo-web/djigzo-portal.war\" unpackwar=\ \"false\"/>" > /etc/tomcat5/catalina/localhost/web.xml Allow reading and writing of SSL certificate CipherMail Web GUI allows new SSL certificates for the Web GUI to be uploaded using the SSL page. To support this functionality, Tomcat should be allowed to read and write the SSL certificate. $ chown tomcat:djigzo /usr/local/djigzo-web/ssl/sslcertificate.p12 Tomcat should be automatically started at re- Make Tomcat start at reboot boot. $ /sbin/chkconfig tomcat5 on 3.9 Finalize Create a softlink to the djigzo log file. $ ln -s /usr/local/djigzo/logs/james.wrapper.log /var/log/djigzo.log 15 the root context allows you to access CipherMail using a URL of the form https://192.168.178.2:8443 instead of https://192.168.178.2:8443/ciphermail 21

3.9 Finalize 3 RED HAT 5 & CENTOS 5 Protect files djigzo. Some files containing passwords should only readable by user $ chmod 640 /usr/local/djigzo/conf/djigzo.properties $ chmod 640 /usr/local/djigzo/conf/hibernate.cfg.xml Restart services Restart Postfix, CipherMail and Tomcat. $ /sbin/service postfix restart $ /sbin/service djigzo restart $ /sbin/service tomcat5 restart Open the Web GUI CipherMail should now be running (wait some time for Tomcat to startup). The login page can be accessed using the following URL https://192.168.178.2:8443/ciphermail 16 (change the IP address accordingly) Note: CipherMail comes with a pre-installed SSL certificate which is not by default trusted by your browser. You should therefore manually accept the SSL certificate. Login Use the following login credentials: username: password: admin admin Note: the login procedure can take some time after a restart because the Web GUI requires some internal initialization after a restart. If CipherMail is not running, check the following log files for er- Log output rors: CipherMail log $ less /var/log/djigzo.log Tomcat log $ less /var/log/tomcat5/catalina.out 16 if CipherMail was installed as the root context, the URL should be https://192.168.178.2:8443 22

4 RED HAT 6 & CENTOS 6 4 Install CipherMail on Red Hat 6 & CentOS 6 This section explains how to install CipherMail on Red Hat 6 and CentOS 6. It is assumed that all commands are run as root (i.e., the user is logged in as root). 4.1 SELinux By default SELinux is enabled on RedHat/CentOS. SELinux prevents certain operations to be executed which are required by CipherMail. For example, a local listening port on port 10026 must be opened by Postfix (this port is used by CipherMail as the Postfix reinjection port). SELinux however, by default, does not allow this. Disabling SELinux is recommended if you are not familiar with SELinux. SELinux can be disabled by editing the file /etc/sysconfig/selinux. SELINUXTYPE to disabled and reboot the server. Set Configure firewall Red Hat and CentOS by default block access to most ports. The firewall should therefore be configured to allow access to certain ports used by CipherMail. The following ports should be remotely accessible: SMTP (25) and 8443 17. The firewall can be configured with the system-configfirewall-tui tool. $ yum install system-config-firewall-tui $ system-config-firewall-tui Note: Port 25 can be opened by selecting Mail (SMTP) in the Trusted Services list. Port 8443 with protocol tcp should be added to the Other Ports. Install required packages $ yum install redhat-lsb postgresql postgresql-server postfix \ java-1.6.0-openjdk-devel ant ant-nodeps mktemp symlinks wget Check default Java version Before continuing make sure that Java is properly installed. The following command should report that the default Java version is OpenJDK. $ java -version The output should indicate that Java version is 1.6 and that OpenJDK is used: java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.9) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) 17 See Appendix D.1 for an overview of all ports used by CipherMail. 23

4.2 Configure PostgreSQL 4 RED HAT 6 & CENTOS 6 4.2 Configure PostgreSQL CipherMail stores all settings in a PostgreSQL database. Initialize PostgreSQL $ /sbin/service postgresql initdb $ /sbin/service postgresql restart Make PostgreSQL autostart PostgreSQL should be started at reboot. $ /sbin/chkconfig postgresql on Enable password authentication By default PostgreSQL does not allow applications to login with user name and password. PostgreSQL should be configured to allow login with user name and password by editing the file: /var/lib/pgsql/data/pg_hba.conf. The line containing ident sameuser should be commented out (or completely removed) and a line with md5 authentication should be added: $ vi /var/lib/pgsql/data/pg_hba.conf #host all all 127.0.0.1/32 ident sameuser host all all 127.0.0.1/32 md5 Restart PostgreSQL $ /sbin/service postgresql restart Create database user Create the database user djigzo with password djigzo 18. $ echo "CREATE USER djigzo NOCREATEUSER NOCREATEDB ENCRYPTED PASSWORD \ 'md5b720bc9de4ca53d53a4059882a0868b9';" sudo -u postgres psql Create database Create the database djigzo owned by database user djigzo. $ sudo -u postgres createdb --owner djigzo djigzo 18 The encoded password is equal to md5 concatenated with the MD5 hash of the user name and password. 24

4.3 Install CipherMail 4 RED HAT 6 & CENTOS 6 4.3 Install CipherMail User and group djigzo with home dir /usr/local/djigzo should be created. CipherMail will be installed in the djigzo home dir and CipherMail will be running as user djigzo. $ /usr/sbin/adduser --home-dir /usr/local/djigzo -m \ --shell /sbin/nologin djigzo Create a directory for CipherMail web which will be owned by djigzo. $ mkdir /usr/local/djigzo-web $ chown djigzo:djigzo /usr/local/djigzo-web Download CipherMail A full installation of CipherMail requires the Cipher- Mail encryption back-end and the Web GUI front-end. Both can be downloaded from http://www.ciphermail.com. The following two.tar.gz files are required 19 : djigzo_2.10.0-3.tar.gz djigzo-web_2.10.0-3.tar.gz Untar the files Untar and make the files owned by user djigzo. $ tar xzf djigzo_*.tar.gz --directory /usr/local/djigzo/ $ chown -R djigzo:djigzo /usr/local/djigzo $ tar xzf djigzo-web_*.tar.gz --directory /usr/local/djigzo-web/ $ chown -R djigzo:djigzo /usr/local/djigzo-web Run post install script $ cd /usr/local/djigzo $ sudo -u djigzo ant Import the database schema into Post- Importing the database schema gresql. Some initialization will be done with an ANT script. $ sudo -u djigzo psql djigzo < /usr/local/djigzo/conf/djigzo.sql Copy startup script Red Hat/CentOS requires a modified startup script (overwrite the existing script). $ cp /usr/local/djigzo/dist/redhat/djigzo /usr/local/djigzo/scripts/ Update location of CipherMail CipherMail should be automatically started at system startup. The startup script should know the path where CipherMail is installed. $ echo "DJIGZO_HOME=/usr/local/djigzo" >> /etc/default/djigzo 19 The exact version will be different when a new version is released. 25

4.4 Configure scripts 4 RED HAT 6 & CENTOS 6 Add startup to init.d A softlink to the startup script will be added to /etc/init.d directory and /etc/rc?.d will be updated. $ ln -s /usr/local/djigzo/scripts/djigzo /etc/init.d/ $ /sbin/chkconfig --add djigzo 4.4 Configure scripts For some of it s functionality, for example managing the Postfix mail queues, shell scripts will be used. These shell scripts should be executable, owned by root and only writeable by root. Some scripts will be executed from the scripts.d directory and symlinks should therefore be created: $ cd /usr/local/djigzo/scripts/scripts.d $ ln -s../backup.sh $ ln -s../daemonized-restart.sh $ ln -s../postfix-main-config.sh $ ln -s../postfix.sh $ ln -s../sasl.sh $ ln -s../system.sh The scripts should be executable, owned by root and only writeable by owner: $ chown -R root:root /usr/local/djigzo/scripts/* $ chmod -R 755 /usr/local/djigzo/scripts/* 4.4.1 sudo For some scripts root access is required (for example to configure Postfix). To allow these scripts to run as root, certain lines should be added to the sudoers file. The following lines should be added to the sudoers file: User_Alias DJIGZO_USERS = djigzo Cmnd_Alias DJIGZO_COMMANDS = /usr/local/djigzo/scripts/do-execute-script.sh DJIGZO_USERS ALL=(ALL) NOPASSWD: DJIGZO_COMMANDS By default Red Hat/CentOS enable the sudoers setting requiretty. This should be commented out because CipherMail need to run commands without a tty (the line containing requiretty can be found halfway the sudoers file). 26

4.5 Configure backup 4 RED HAT 6 & CENTOS 6 # requiretty must be commented out! #Defaults requiretty The sudoers file should be edited with visudo. $ visudo 4.5 Configure backup CipherMail contains a backup functionality which can backup all the relevant settings. The files to backup will be read from the conf/backup.d directory. A symlink to the default list of files to backup should be added. $ cd /usr/local/djigzo/conf/backup.d/ $ ln -s../backup_files The conf/backup.d directory should be owned by root and only writeable by the owner. $ chown -R root:root /usr/local/djigzo/conf/backup.d/ $ chmod -R 755 /usr/local/djigzo/conf/backup.d/ The backup_files file should be owned by root and only writeable by the owner. $ chown root:root /usr/local/djigzo/conf/backup_files $ chmod 644 /usr/local/djigzo/conf/backup_files 4.6 Configure Postfix CipherMail uses Postfix for sending and receiving of email (MTA) 20. CipherMail functions as a Postfix after queue filter. Postfix should therefore be configured to work with the encryption back-end. Two pre-configured Postfix configuration files, main.cf and master.cf, can be found in /usr/local/djigzo/conf/system and /usr/local/djigzo/dist/redhat/. It is recommended that these Postfix configuration files are used. If Postfix is already configured and the existing settings should not be overwritten, the existing Postfix configuration files should be manually merged with the configuration files provided by CipherMail. The most important Postfix configuration settings required by CipherMail will be discussed next. main.cf configuration The Postfix main configuration file should contain at minimal the content filter setting which tells Postfix that all email should be handled by the CipherMail encryption back-end. The content filter setting tells Postfix that the service running on 127.0.0.1:10025 will function as an after queue filter 21. 20 It is possible to use another MTA instead of Postfix, like for example Exim, but that s beyond the scope of this manual. 21 If you already configured a content filter you should configure additional filters in master.cf. This will however not be explained in this guide. 27

4.6 Configure Postfix 4 RED HAT 6 & CENTOS 6 content_filter = djigzo:[127.0.0.1]:10025 The other settings in the pre-configured main.cf file are only required for the MTA configuration page of CipherMail Web GUI. Settings starting with djigzo will be replaced when changes on the MTA page are applied. The djigzo... settings are used by main.cf and master.cf (the settings are referenced as ${djigzo...}). master.cf configuration the following lines: The Postfix master configuration file requires at least djigzo unix - - n - 4 smtp -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o smtp_generic_maps= 127.0.0.1:10026 inet n - n - 10 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks, no_header_body_checks,no_milters -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -o smtpd_authorized_xclient_hosts=127.0.0.0/8 message size limit Because CipherMail functions as an after queue filter the message size can be increased after being handled by the encryption backend. For example, signing a message will slightly increase the message because of the S/MIME signature. The after queue message size limit should therefore be larger than the message size limit before filtering (otherwise Postfix will reject the message after filtering). To make sure that the before filter size limit is lower than the after filter size limit, a limit should be set on the smtpd service. smtp inet n - - - - smtpd -o message_size_limit=${djigzo_before_filter_message_size_limit} Copy postfix config files It is advised to use the pre-configured Postfix configuration files. The pre-configured configuration files should be copied to the Postfix config directory. WARNING! THIS WILL OVERWRITE ALL SETTINGS IN THE ORIGINAL POSTFIX CONFIG FILES SO ONLY DO THIS IF THE ORIGINAL SETTINGS MAY BE OVERWRITTEN. IF EXISTING POSTFIX SETTINGS MUST BE KEPT YOU SHOULD MERGE THE REQUIRED CHANGES MANUALLY. 28

4.7 Install Tomcat 4 RED HAT 6 & CENTOS 6 $ cp /usr/local/djigzo/conf/system/main.cf /etc/postfix/main.cf $ cp /usr/local/djigzo/dist/redhat/master-2.6.cf /etc/postfix/master.cf Update aliases Postfix uses /etc/alias as the alias file. Make sure that the alias file is available and up-to-date. $ newaliases Restart postfix If Postfix was not yet running Shutting down postfix will fail. This can be ignored. $ /sbin/service postfix restart Make mail logs readable $ chmod +r /var/log/maillog The mail logs should be readable by user djigzo. Update log paths CipherMail by default expects the mail logs to be stored in mail.info. Red Hat/CentOS however store the mail logs in maillog. The paths in soap.xml should be updated. $ sed s#/var/log/mail.log.1#/var/log/maillog.1# \ /usr/local/djigzo/conf/spring/soap.xml --in-place $ sed s#/var/log/mail.log#/var/log/maillog# \ /usr/local/djigzo/conf/spring/soap.xml --in-place 4.7 Install Tomcat $ yum install tomcat6 Update Javamail Red Hat/CentOS by default installs an older version of Javamail. The newer version of Javamail provided by CipherMail will be added as a new alternative. $ alternatives --install /usr/share/java/javamail.jar javamail \ /usr/local/djigzo/lib/mail.jar 20000 Set djigzo-web.home The system property djigzo-web.home should reference the location where CipherMail Web GUI is stored. The property will be added to the Tomcat default config file. $ echo "JAVA_OPTS=\"\$JAVA_OPTS -Ddjigzo-web.home=\ /usr/local/djigzo-web\"" >> /etc/sysconfig/tomcat6 Configure Tomcat memory usage In order to allow the import of very large certificate files (.p7b or.pfx files with thousands of certificates) CipherMail requires that Tomcat is setup with at least 128 MB heap size. $ echo "JAVA_OPTS=\"\$JAVA_OPTS \ -Djava.awt.headless=true -Xmx128M\"" >> /etc/sysconfig/tomcat6 29

4.8 Finalize 4 RED HAT 6 & CENTOS 6 Adding an HTTPS connector An HTTPS connector should be added to the Tomcat server configuration. If Tomcat is only used by CipherMail, it s advised to replace the existing Tomcat configuration file (/etc/tomcat6/server.xml) with the configuration file provided by CipherMail. $ cp /usr/local/djigzo-web/conf/tomcat/server.xml /etc/tomcat6/ The path to djigzo-web should be updated to make sure the SSL certificate is loaded from /usr/local/djigzo-web. $ sed s#/share/djigzo-web/#/local/djigzo-web/# \ /etc/tomcat6/server.xml --in-place Note: if you want to keep the existing server.xml you need to manually add the HTTPS Connector. See Appendix B for more information. Adding the Web admin context enable the Web admin application. A context should be added to Tomcat to $ echo "<Context docbase=\"/usr/local/djigzo-web/djigzo.war\" unpackwar=\ \"false\"/>" > /etc/tomcat6/catalina/localhost/ciphermail.xml Note: if you want CipherMail to use the root context, save the context file to ROOT.xml (overwriting the existing file) instead of to ciphermail.xml 22. Adding the Web portal context If the portal functionality is required, a specific portal context should be added to Tomcat. $ echo "<Context docbase=\"/usr/local/djigzo-web/djigzo-portal.war\" unpackwar=\ \"false\"/>" > /etc/tomcat6/catalina/localhost/web.xml Allow reading and writing of SSL certificate CipherMail Web GUI allows new SSL certificates for the Web GUI to be uploaded using the SSL page. To support this functionality, Tomcat should be allowed to read and write the SSL certificate. $ chown tomcat:djigzo /usr/local/djigzo-web/ssl/sslcertificate.p12 Tomcat should be automatically started at re- Make Tomcat start at reboot boot. $ /sbin/chkconfig tomcat6 on 4.8 Finalize Create a softlink to the djigzo log file. $ ln -s /usr/local/djigzo/logs/james.wrapper.log /var/log/djigzo.log 22 the root context allows you to access CipherMail using a URL of the form https://192.168.178.2:8443 instead of https://192.168.178.2:8443/ciphermail 30

4.8 Finalize 4 RED HAT 6 & CENTOS 6 Protect files djigzo. Some files containing passwords should only readable by user $ chmod 640 /usr/local/djigzo/conf/djigzo.properties $ chmod 640 /usr/local/djigzo/conf/hibernate.cfg.xml Restart services Restart Postfix, CipherMail and Tomcat. $ /sbin/service postfix restart $ /sbin/service djigzo restart $ /sbin/service tomcat6 restart Open the Web GUI CipherMail should now be running (wait some time for Tomcat to startup). The login page can be accessed using the following URL https://192.168.178.2:8443/ciphermail 23 (change the IP address accordingly) Note: CipherMail comes with a pre-installed SSL certificate which is not by default trusted by your browser. You should therefore manually accept the SSL certificate. Login Use the following login credentials: username: password: admin admin Note: the login procedure can take some time after a restart because the Web GUI requires some internal initialization after a restart. If CipherMail is not running, check the following log files for er- Log output rors: CipherMail log $ less /var/log/djigzo.log Tomcat log $ less /var/log/tomcat6/catalina.out 23 if CipherMail was installed as the root context, the URL should be https://192.168.178.2:8443 31