How to install Icewarp mail server on CentOS 7 Linux

You may know Icewarp mail server. it’s one of the leading mail server software that offers a lot of great capabilities and features. in this article we want to describe how to install Icewarp mail server on CentOS 7 Linux.

if you want to know more about Icewarp mail server, please refere to Icewarp web site. also you can download latest linux version of Icewarp from here.

Here are our environment OS and software versions:

OS: Centos 7.6 on VMware
Database: Mariadb 10.3
Number of Disks: four 500 GB
Disk Layout: LVM
Firewall: CSF

 

1- Initial Setup

In Icewarp you can choose whether to use database engine or sql lite for storing informations.

here we use database engine with replication for better high availability. if you wanted to know how to setup replication you can refer to database replication with mariadb on CentOS 7 linux.

Also for storing user emails, we use four 500 GB disks with lvm layout. to know about lvm setup, refer to how to create LVM with four disks on CentOS 7 linux.

In addition, refere to how to install CSF on CentOS 7 Linux and put the following configuration in csf.conf:

# TCP_IN = "21,22,25,80,110,143,443,465,587,636,990,993,995,1080,2703,3306,4567,4568,4444,4069,4070,4567,5160,5222,5223,5229,5269,7830,8822,8899,32000,32001"
# TCP_OUT = "21,22,25,80,110,143,443,465,587,636,990,993,995,1080,2703,4069,4070,4567,5160,5222,5223,5229,5269,7830,8822,8899,32000,32001"
# UDP_IN = "20,21,53,10000:10250,32002"
# UDP_OUT = "20,21,53,10000:10250,32002,4567"

2- Create required databases

In previous step we decided to use database engine for storing icewarp data. Icewarp has some databases that needs to be created.

so login to mariadb and tun the following commands:

# mysqladmin -u root -p create icewarp_accounts collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_antispam collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_groupware collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_dircache collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_webcache collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_webmail collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_activesync collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_reports collate='utf8_general_ci';
# mysqladmin -u root -p create icewarp_loganalyzer collate='utf8_general_ci';

verify created database by logging in to mysql on DB servers

# mysql -u root -p
# SHOW databases;

grant privilege to icewarp server on database

# mysql -u root -p

Enter password:

# mysql>GRANT ALL ON *.* to root@'192.168.1.1' IDENTIFIED BY 'put-your-password';
# mysql>FLUSH PRIVILEGES;
# mysql>exit

3- Install Icewarp mail server

ok. now Make sure the system has utf8 locale:

# locale

then stop and remove sendmail or postfix or any email server that uses port 25:

# systemctl stop postfix
# systemctl disable postfix

unpack compressed icewarp package on Icewarp Server

# tar -xzvf IceWarpServer-12.1.1_RHEL7_x64.tar.gz

change directory to Icewarp installation folder on Icewarp Server

# cd IceWarpServer-12.1.1.4_RHEL7_x64

Run installation script on Icewarp Server

# ./install.sh

follow instruction and press Y to install required packages
follow instruction and press Y to install ghostscript
follow instruction and press Y to install OpenJDK JRE 1.7.0
follow instruction and press Y to install TrueType fonts
follow instruction and press Enter to install it in /opt/icewarp
follow instruction and press Enter run its service as root user
follow instruction and press Y to enable OpenSSL libraries
follow instruction and press Y to add IceWarp Server as a system service
follow instruction and press Y to start IceWarp Server on system startup
follow instruction and press Enter to set name of server to machine hostname
follow instruction and enter afraneticewarpdemo.com for primary domain
follow instruction and enter desired username for admin
follow instruction and enter desired password
follow instruction and press Y to get trial license

**      Your name: tux tips
**      Contact email: [email protected]
**      Company: dummycorp
**      Address: Zagreb
**      ZIP code: 123456789
**      Choose your country: 50

follow instruction and press N
follow instruction and press Y to register trial license
after successfull installation you should see this message

** Trial license registered successfully

change directory to /opt/icewarp and run wizard.sh script

# cd /opt/icewarp
# ./wizard.sh

press enter and then press [3] Storage Setup
select [1] Set Accounts storage
select [2] Setup to use MySQL database
press Y and again Y and then Enter and then enter root and proved password
Enter icewarp_accounts
press Y and wait for creating tables
press Y to data from file being convert to database
press Q to exit the script
start icewarp

# systemctl enable icewarp
# systemctl start icewarp

verify that primary IceWarp Server services are operating properly:

# telnet localhost 25
# telnet localhost 110
# telnet localhost 143

verify required tables created in icewarp_accounts:

# mysql -u root -p
# USE icewarp_accounts;
# show tables;
## Aliases
## Domains
## MetaDats
## UserAccess
## Users

verify license by selecting [2] License operations and then [1] Display license information:

# ./wizard.sh

so finally to access web interface, use the following address:

# http://localhost/webmail/