TECHIES WORLD

For Techs.... Techniques.... Technologies....

Linux

How to install postfix with dovecot and squirrelmail in Centos

Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail, intended as an alternative to Sendmail MTA.

This tutorial explains the detailed steps to install postfix with dovecot and squirrelmail.

Step1: Remove sendmail if installed

#yum remove sendmail

Step2: Configure '/etc/hosts' file with the domain name

192.168.10.11 example.com

Step3: Disable SELinux

#setenfoce 0

Note: For set this permanently, update the below line in '/etc/sysconfig/selinux'

SELINUX=disabled

Step4: Install EPEL repository

#wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm

#rpm -Uvh epel-release-5-4.noarch.rpm

Step5: Install postfix

#yum install postfix -y

Step6: Edit the postfix configuration file '/etc/postfix/main.cf' and update the below lines

## Uncomment and set your mail server FQDN ##

myhostname = example.com

## Uncomment and Set domain name ##

mydomain = example.com

## Uncomment ##

myorigin = $mydomain

## Set ipv4 ##

inet_interfaces = all

## Change to all ##

inet_protocols = all

## Comment ##

#mydestination = $myhostname, localhost.$mydomain, localhost,

## Uncomment ##

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

## Uncomment and add IP range ##

mynetworks = 192.168.1.0/24, 127.0.0.0/8

## Uncomment ##

home_mailbox = Maildir/

Step7: Start postfix service

#service postfix restart

Step8: Enable postfix to run in the startup

#chkconfig postfix on

Step9: Install dovecot

#yum install dovecot

Step10: Update dovecot config file '/etc/dovecot/dovecot.conf'

## umcomment ##

protocols = imap pop3 lmtp

Step11: Update dovecot config file '/etc/dovecot/conf.d/10-mail.conf'

## uncomment ##

mail_location = maildir:~/Maildir

Step12: Update dovecot config file '/etc/dovecot/conf.d/10-auth.conf'

## uncomment##

disable_plaintext_auth = yes

## Add a letter "login" ##

auth_mechanisms = plain login

Step13: Update dovecot config file '/etc/dovecot/conf.d/10-master.conf'

## Uncomment and add "postfix" ##

user = postfix

group = postfix

Step14: Start dovecot service

#service dovecot start

Step15: Enable dovecot to run in the startup

#chkconfig dovecot on

Step16: Install squirrelmail by following the steps in the below URL

http://techies-world.com/squirrelmail-installation/

 

That's all.....

Leave a Reply