You are on page 1of 24

1

MAIL Server for Linux/Unix Sendmail Postfix Qmail The Qmail MTA is another alternative to sendmail. It is used by an impressive list of Internet sites. Smail It is reportedly easier to configure than sendmail. It also includes support for blocking messages. Exim The Exim MTA was developed at Cambridge (U.K.) and is licensed under the GPL. While based on an older MTA known as Smail,

2

168.0.254 192.1 192.168.0.1 client1 client1 ZOOM.0.0.168.0.168.168.2 client2 client2 3 .com user1 user1 user2 user2 Linux Linux Client Client 192.zoom.How Mail Server works ? DNS DNS Server Server 192.253 192.0.168.2 192.COM Windows Windows Client Client 192.168.com mail.253 server server Mail Mail Server Server 192.168.COM ZOOM.0.254 mail.zoom.0.

rpm m4-1.mc /etc/mail/sendmail.cf Service sendmail Daemon sendmail 4 .rpm sendmail-cf-8.i386.i386.13.1-2.1-2.Requirements Packages sendmail-8.i386.rpm sendmail-devel-8.1-2.rpm sendmail-doc-8.4.13.i386.1-16.13.13.rpm Port Numbers 25 Simple Mail Transfer Protocol 110 Post Office Protocol 143 Interim Mail Access Protocol Configuration File /etc/mail/sendmail.i386.1-2.

com mail.1 client1 client1 ZOOM.0.0.168.253 192.0.zoom.168.2 client2 client2 5 .168.253 server server Mail Mail Server Server 192.254 192.168.Mail Server Configuration DNS DNS Server Server 192.0.COM ZOOM.0.2 192.0.com user1 user1 user2 user2 Linux Linux Client Client 192.zoom.1 192.0.0.COM Windows Windows Client Client 192.168.168.168.168.254 mail.

conf 6 .168.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# rpm -ivh bind* caching* --force --aid [root@comp1 ~]# rpm -ivh bind* caching* --force --aid Open configuration for editing Open configuration for editing [root@comp1~]# vi /etc/named.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1~]# mount 192.conf [root@comp1~]# vi /etc/named.Configuring DNS Server Install the package by using one of the installation methods Install the package by using one of the installation methods [root@comp1~]# mount 192.

}.for". 7 . file zoom. file zoom. }.com" IN { type master./etc/named. type master.com" IN { zone "zoom.for".conf To change the options To change the options zone "zoom.

for [root@comp1 named]# cp localhost.for Open configuration for editing Open configuration for editing [root@comp1 named]# vi zoom.zone zoom.zone zoom.for [root@comp1 named]# vi zoom.Configuring Forward Lookup Copying Forward lookup zone file Copying Forward lookup zone file [root@comp1 ~]# cd /var/named/chroot/var/named/ [root@comp1 ~]# cd /var/named/chroot/var/named/ [root@comp1 named]# cp localhost.for 8 .

168.. adams) 42 serial (d.com.( server.168.253 A 192.zoom.0.253 192.0..for To add the options To add the options $TTL 86400 $TTL 86400 @ IN @ IN SOA SOA server.com.com. root.refresh refresh .retry retry .254 A 192.zoom.com.254 CNAME server CNAME server MX 5 mail MX 5 mail NS NS A A .serial (d../var/named/chroot/var/named/zoom.zoom.com.zoom.168.zoom.0.zoom.0. server. root. 9 .minimum minimum server..com.168.expiry expiry server server server2 server2 mail mail IN IN IN IN IN IN IN IN IN IN 192.( 42 .. adams) 3H 3H 15M 15M 1W 1W 1D )) 1D .

Configuring DNS Server IP address Open configuration for editing Open configuration for editing [root@comp1 ~]# vi /etc/resolv.0.168.conf Add the DNS server IP address in file /etc/resolv.conf [root@comp1 ~]# vi /etc/resolv.253 nameserver 192.253 10 .conf nameserver 192.conf Add the DNS server IP address in file /etc/resolv.0.168.

DNS Server To restart the DNS services To restart the DNS services [root@comp1 ~]# service named restart [root@comp1 ~]# service named restart 11 .

zoom.zoom.com 12 .com [root@comp1 ~]# dig mail.zoom.zoom.com Checking Name resolution Checking Name resolution [root@comp1 ~]# ping mail.com [root@comp1 ~]# ping mail.Checking from DNS Server Checking Forward Lookup Checking Forward Lookup [root@comp1 ~]# dig mail.

0.0.mc 13 .250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# rpm -ivh sendmail* m4* --force --aid [root@comp1 ~]# rpm -ivh sendmail* m4* --force --aid Open configuration for editing Open configuration for editing [root@comp1~]# vi /etc/mail/sendmail.mc [root@comp1~]# vi /etc/mail/sendmail.168.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1~]# mount 192.168.Configuring Mail Server Install the package by using one of the installation methods Install the package by using one of the installation methods [root@comp1~]# mount 192.

0.0.com')dnl LOCAL_DOMAIN(`mail.zoom.0.com')dnl 14 .mc To change the options To change the options dnl # DAEMON_OPTIONS(`Port=smtp./etc/mail/sendmail.1.0.Addr=127.1. dnl # DAEMON_OPTIONS(`Port=smtp.Addr=127.zoom. Name=MTA')dnl Name=MTA')dnl LOCAL_DOMAIN(`mail.

cf /etc/mail/sendmail.Mail Server To compile the file To compile the file [root@comp1 ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.mc > [root@comp1 ~]# m4 /etc/mail/sendmail.cf To restart the mail services To restart the mail services [root@comp1 ~]# service sendmail restart [root@comp1 ~]# service sendmail restart 15 .

Mail Server To create users To create users [root@comp1 ~]#useradd user1 [root@comp1 ~]#useradd user1 [root@comp1 ~]#useradd user2 [root@comp1 ~]#useradd user2 16 .

. Cc: Cc: [root@comp1 ~]# [root@comp1 ~]# To check mail as a user To check mail as a user [root@comp1 ~]#su --user1 [root@comp1 ~]#su user1 [user1@comp1 ~]$mail [user1@comp1 ~]$mail 17 .Testing Mail Server To send mail from one user to another To send mail from one user to another [root@comp1 ~]#mail user1 [root@comp1 ~]#mail user1 Subject: Test Message Subject: Test Message Hi Hi this is to test the mail this is to test the mail .

18 .

99.i386.1.rpm curl* php* perl* cyrus* httpd* 19 .EL4.EL4.noarch.11-2.rpm dovecot-0.3a-7.4.Requirements Packages squirrelmail-1.

168.0.0.2 client2 client2 20 .1 client1 client1 ZOOM.168.COM ZOOM.1 192.168.0.com mail.COM Windows Windows Client Client 192.zoom.0.168.0.253 192.168.0.com Linux Linux Client Client 192.254 192.0.2 192.168.zoom.253 server server Mail Mail Server Server 192.Squirrel Mail Configuration DNS DNS Server Server 192.0.168.168.254 mail.

250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# rpm -ivh squirrel* php* perl* curl* dove* cyrus* httpd* [root@comp1 ~]# rpm -ivh squirrel* php* perl* curl* dove* cyrus* httpd* --force --aid --force --aid 21 .250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1~]# mount 192.0.Configuring Squirrel Mail Install the package by using one of the installation methods Install the package by using one of the installation methods [root@comp1~]# mount 192.168.168.0.

Squirrel Mail To restart services To restart services [root@comp1 ~]# service cyrus-imapd restart [root@comp1 ~]# service cyrus-imapd restart [root@comp1 ~]# service dovecot restart [root@comp1 ~]# service dovecot restart [root@comp1 ~]# service httpd restart [root@comp1 ~]# service httpd restart 22 .

conf Add the DNS server IP address in file /etc/resolv.253 23 .Configuring DNS on Client Open configuration for editing Open configuration for editing [root@comp1 ~]# vi /etc/resolv.conf Add the DNS server IP address in file /etc/resolv.0.168.253 nameserver 192.0.conf nameserver 192.conf [root@comp1 ~]# vi /etc/resolv.168.

In the address box type http://mail.254/webmail 24 .com/webmail or http://192.zoom.0.0.254/webmail http://192. Open Mozilla or Fire Fox browser.168.168.zoom.com/webmail or In the address box type http://mail.HTTP Client Linux Accessing Webmail Accessing Webmail Open Mozilla or Fire Fox browser.