How to Install iRedMail on CentOS 7 & RHEL 7

iRedMail is out of the box open source mail server solution on Linux like operating system. The beauty of iRedMail is that it provides web based admin panel from where mail admin or system admins can do all email related operations task. Some of other features are listed below :

Support unlimited email accounts.
It provides Roundcube as webmail (MUA )
It used Postfix as MTA & Dovecot as MDA
It pvoides Calendar service via CalDAV & Contact service via CardDAV
It uses SpamAssassin for Spam scan and Amavis & Clamav for Mail virus scan.
OpenLDAP, MariaDB and PostgreSQL can be used to save mail accounts

In this article we will demonstrate how to install and configure iRedMail on CentOS 7 & RHEL 7. I am going to use followings for iRedMail setup.

OS = CentOS 7 or RHEL 7
Domain = nsitmail.com
Server Hostname = mail.nsitmail.com

Note : In case if you want mails from your mail server to be delivered in inbox not in spam folder then update the DNS records like A & PTR  before installation and TXT ( SPF & DKIM ) after installation.

Step:1 Set hostname and disable Selinux.

Set the proper hostname using hostnamectl command if it is not set.

[root@mail ~]# hostnamectl set-hostname mail.nsitmail.com
[root@mail ~]# hostname -f
mail.nsitmail.com
[root@mail ~]#

Update the /etc/hosts file

127.0.0.1 mail.nsitmail.com localhost.localdomain localhost

Disable Selinux

[root@mail ~]# setenforce 0

Edit the file /etc/sysconfig/selinux , set the parameter “SELINUX=disabled” , Reboot the server to disable selinux completely.
Step:2 Download the tar file of iRedmail.

Download the latest version of iRedmail from their Official Web Site or use below wget command to download from terminal.

[root@mail ~]# wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.3.tar.bz2

Step:3 Extract the tar file & execute installation Script.

[root@mail ~]# ll
total 124
-rw-r--r-- 1 root root 126277 Dec 20 19:12 iRedMail-0.9.3.tar.bz2
[root@mail ~]#
[root@mail ~]# tar -jxvf iRedMail-0.9.3.tar.bz2
[root@mail ~]# cd iRedMail-0.9.3
[root@mail iRedMail-0.9.3]# sh iRedMail.sh

After couple of seconds , below screen will appear , Select yes and press enter.

1

Define the folder or directory where users mailbox will be stored.

2

Select the web Server for iRedmail. Default is Nginx.

3

Select the database of your choice which will store domain names and mail accounts. In my case i am using MariaDB.

4

Define the domain name for your mail server. In my case domain name is “nsitmail.com”

5

Set Password for postmaster account.

6

Select Optional Components of iRedmail installation8

Press “y” to continue installation, Mail Server info & Credentials are kept in the file “/root/iRedMail-0.9.3/config”. Please keep this file in secure place.

9

10

As per instructions , reboot the server to enable all mail services.

Postfix mail logs and iRedmail logs are stored in “/var/log/maillog” and “/var/log/iredapd/iredapd.log” respectively.

Note : Default administrator name is “postmaster@nsitmail.com”

Following are the Important URLs after the Installation is completed , replace the domain name as per your setup in mentioned URLs.

iRedAdmin – official web-based admin panel:

https://mail.nsitmail.com/iredadmin/

Username: postmaster@nsitmail.com, password: XXXXXXXXXX

Roundcube webmail URL :

http://mail.nsitmail.com/mail/

SOGo Groupware

https://mail.nsitmail.com/SOGo/

Step:4 Create Users & domain from Admin Panel.

To create users first login to admin panel. Use user name as “postmaster@<domain>” and password that we set during installation.

1-11-2

Click on Add option and then Select Users.

1-3

Add a new Domain :

From the admin Panel , Select “Domain & accounts” option and then click on Add domain

1-4

Define the domain name & Organization Name and then further we can create users on newly created domain.

1-5

Step:5 Access Roundcube (Webmail).

Open the url in the browser “https://mail.nsitmail.com/mail/” , replace the domain name as per your setup.

1-6

1-7

Send a test mail to verify the functionality.

1-8

As we see that i got the mail from iRedmail mail server, so we can say the iRedmail is successfully installed and configured.

Continue Reading

Configure CUPS Printing Server on CentOS

Configure CUPS Printing on CentOS

when you need to setup a CentOS Linux print server, CUPS (Common UNIX Printing System)to the rescue!

login to your server, and su to root.

1- Install CUPS

yum install cups

2- Install dependency

yum install ghostscript.x86_64 hplip-common.x86_64

3-start the cups service, and then set to to run on startup

service cups start
chkconfig cups on

to best administer CUPS we need to configure the web GUI

vim /etc/cups/cupsd.conf

add the following line to the top (this allows easy administration)

DefaultEncryption Never

safelist your network to allow access

download

–obviously you want to enter the IP of the server here, rather than what i have,

now allow your local subnet to have access to the web GUI

download (1)

that’s just for the web access, but for the ADMIN pages, you may want to lock it down further:

download (2)

save + quit after all configured

also make sure to allow the port through IPtables (if enabled)

restart the cups service once completed

download (4)

browse to https://serverip:631

download (5)

That is all

Continue Reading

HOW TO INSTALL VESTA CP

Step 1 – First, login to your server’s shell via SSH as root, as always, for this task I use putty.

2013-12-23_154432

Step 2 – Next, download VestaCP installation script using curl command:

curl -O http://vestacp.com/pub/vst-install.sh

download-vestacp-620x195

Step 3 – Next, issue this magic command to start installing VestaCP:

bash vst-install.sh

4

Step 4 – The installer asks to confirm disabling SELinux and start the install process. Type Y and hit Enter.
Step 5 – The installer also asks to enter valid email address. So type your valid email address and double-check it to make sure your email is correct because VestaCP will also send your admin password there.

5

Step 6 – Once you hit Enter on your keyboard, the installer starts. Sit tight and wait for the installerto process and finish its job.
Step 7 – As long as you found no fatal error, the installer should finish quicker and you will see something like this on your screen:

7

You can also check your mailbox just to ensure the password is delivered and mail server (Exim) works properly on your server.

8

Step 8 – Now open up your favorite browser and login to VestaCP web-based UI using your VPS IP at port 8083.

https://xxx.xxx.xxx.xxx:2083/
Login as admin and use given password,
As you may also aware that the link is https:// which means via secure connection (SSL) so you may have to add / confirm exception on your browser.

vestacp-login

Voila! You should now see the main UI of Vesta hosting control panel.

vestacp-main-ui-620x242*click on image to view larger size.
Congratulation! You now have Vesta CP installed and a ready-to-use VPS to host all your websites.

Continue Reading

How to install MailServer Zimbra on Centos 7

Disabled SELINUX

# vim /etc/sysconfig/selinux

Change enforcing to disabled :

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Stop any MTA services installed in the server

# systemctl stop postfix
# systemctl disable postfix
# systemctl stop sendmail
# systemctl disable sendmail

Update the OS

# yum update -y

Install the required packages and libraries by issuing the following command :

#yum install perl perl-core ntpl nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite -y

Extract the downloaded tar file :

Using the following command you can extract the tar file, We downloaded in previous step

wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz
tar xzf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

Go to extracted ZCS Open Source Edition :

cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110

Instal Zimbra.

./install.sh
Continue Reading

Install and configure an FTP server in CentOS 7.

With the open end we will follow the steps. First baixaremos the required packages . For this type :

# yum update vsf*

We’ll be getting new updates packages only FTP service, which in Linux is known as vsftpd .
Made the update will go to the next step , which is the installation of the FTP service. For this type :

# yum install vsftpd

To appear like the screen below , press the Y button to accept and continue the installation.
After installation we will have to start the FTP service. For this type :

Centos 6:

# service vsftpd start

Centos 7 :

#systemctl start vsftpd

Ready , installed and started the FTP service. Now we can perform tests to see the operation of the service. It’s time to create a username and password to connect to your FTP server , for this type :

useradd

Example:

# useradd test

Let’s create the password for the user. which in my case is test :

# passwd test

You will be asked for you to enter a password and click on you are asked to repeat the password. After that, we have created the username and password released to access the FTP server.

Now we switch to the user created . For this type primarily the following command to log in as user test :

# su - test

Create a folder within this user :

# mkdir Softwares

Remember that Linux is case sensitive, so if you type the first letter capitalized , remember to type correctly later.
Okay, now we need to know the number of IP address that is on your computer in order to make the FTP connection.

Continue Reading