Mail Server
Mail Server
Mail Server
04
Step 1 » Assign static IP and hostname and add a host entry for the host name .
Assign hostname in /etc/hostname
Step 3 » Install postfix and dependencies . Press enter for all prompted questions during
installation. we will do that in the next step.
Step 4 » After installation issue the below command to configure postfix.
root@ktc-77:/etc# sudo dpkg-reconfigure postfix
\
Step 5 » Now configure Postfix for SMTP-AUTH using Dovecot SASL by adding the below lines
to postfix config file /etc/postfix/main.cf .
ktc@mail:~$ sudo -i
[sudo] password for ktc:
root@mail:~# gedit /etc/postfix/main.cf
Step 6 » Now generate a digital certificate for tls. Issue the commands one by one and provide
details as per your domain.
root@mail:~# openssl genrsa -des3 -out server.key 2048
Step 8 » Open /etc/postfix/master.cf file and uncomment below lines to enable smtps ( 465 ) and
submission ( 587 ) .
Step 15 » Now enable SSL . Open /etc/dovecot/conf.d/10-ssl.conf file and find and uncomment the
below line ( Line no : 6 )
ssl = yes
root@mail:~# gedit /etc/dovecot/conf.d/10-ssl.conf
Step 16 »Restart dovecot service.
root@mail:~# sudo service dovecot restart
Step 17 » Now test pop3 and imap port access using the telnet command.
root@mail:~# telnet mail.abdulla.com 110
Step 18 » Create some users and check using mail clients like thunderbird or outlook
root@mail:~# sudo useradd -m abdulla -s /sbin/nologin
root@mail:~# sudo passwd abdulla
» Installing and configuring squirrelmail:
Step 19 » Install squirrelmail using the below command. This will install apache and PHP
packages.
root@mail:~# sudo apt-get install squirrelmail
Step 21 » Now open http://serverIP/squirrelmail in your browser and login using username
(bobby) . you can send and receive mail using squirrelmail.
Okay .. its over now ..