Mail Server Using Postfix
Mail Server Using Postfix
Mail Server Using Postfix
~]#
~]#
~]#
~]#
as shown below.
[root@server ~]# vi /etc/postfix/main.cf
myhostname = server.arkit.co.in ##line no 75 - uncomment and
enter your host name
mydomain = arkit.co.in ##line no 83 - uncomment and enter your
domain name
myorigin = $mydomain ##line no 99 - uncomment
inet_interfaces = all ##line no 116 - change to all
mydestination = $myhostname, localhost.$mydomain, localhost,
$mydomain ##line no 164 - add $domain at the end
mynetworks = 192.168.1.0/24, 127.0.0.0/8 ##line no 264 uncomment and add your network range
home_mailbox = Maildir/ ##line no 419 - uncomment
Start the postfix service.
[root@server ~]# service postfix start
Starting postfix:
]
[root@server ~]# chkconfig postfix on
Test Postfix
The commands shown in bold letters should be entered by the user.
Note: The dot after the test command is important.
[root@server ~]# telnet localhost smtp
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server.arkit.co.in ESMTP Postfix
ehlo localhost
250-server.arkit.co.in
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<user1>
250 2.1.0 Ok
rcpt to:<user1>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
OK
test
.
250 2.0.0 Ok: queued as 117113FF18
quit
221 2.0.0 Bye
Connection closed by foreign host.
Check Mail
Navigate to the user mail directory and check for the new mail.
[root@server ~]# cd /home/user1/Maildir/new/
[root@server new]# ls
1360236956.Vfd00I35afM181256.server.arkit.co.in
[root@server new]# cat
1360236956.Vfd00I35afM181256.server.arkit.co.in
Return-Path: <user1@arkit.co.in>
X-Original-To: user1
Delivered-To: user1@arkit.co.in
Received: from localhost (localhost [IPv6:::1])
by server.arkit.co.in (Postfix) with ESMTP id 117113FF18
for <user1>; Thu, 7 Feb 2013 17:05:32 +0530 (IST)
Message-Id: <20130207113547.117113FF18@server.arkit.co.in>
Date: Thu, 7 Feb 2013 17:05:32 +0530 (IST)
From: user1@arkit.co.in
To: undisclosed-recipients:;
test
Thats it. Postfix working now.
Install Dovecot
[root@server ~]# yum install dovecot
Configure Dovecot
Open the dovecot config file /etc/dovecot/dovecot.conf. Find and uncomment the
line as shown below.
[root@server ~]# vi /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
Open the file /etc/dovecot/conf.d/10-mail.conf and uncomment the line as shown
below.
[root@server ~]# vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir ##line no 24 - uncomment
Open the /etc/dovecot/conf.d/10-auth.conf and edit as shown below.
OK
.
quit
+OK Logging out.
Connection closed by foreign host.
[root@server ~]#
Dovecot is working now.
Install Squirrelmail
Install EPEL repository first. And install SquirrelMail package from EPEL repository.
[root@server ~]# wget
http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-68.noarch.rpm
[root@server ~]# rpm -ivh epel-release-6-8.noarch.rpm
[root@server ~]# yum install squirrelmail
[root@server ~]# service httpd start
Starting httpd:
[
]
[root@server ~]# chkconfig httpd on
[root@server ~]#
Configure Squirrelmail
Go to the squirrelmail config directory and use the command ./conf.pl to start
configure as shown below.
[root@server ~]# cd /usr/share/squirrelmail/config/
[root@server config]# ./conf.pl
SquirrelMail Configuration : Read: config.php (1.4.0)
--------------------------------------------------------Main Menu -1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C
Turn color off
S
Save data
Q
Quit
Command >>1
OK
Order allow,deny
Allow from all
</Directory>
Restart the httpd service.
[root@server ~]# service httpd restart
Stopping httpd:
]
Starting httpd:
]
[root@server ~]#
Create Users
[root@server
[root@server
[root@server
[root@server
~]#
~]#
~]#
~]#
useradd user1
useradd user2
passwd user1
passwd user2
Open the browser from any clients. Type the following in the address bar.
http://serveripaddress/webmail
or
http://yourdomainname/webmail
OK
OK