Tuesday, August 24, 2010

Mail Server Configuretion

############## TO configure the sendmail.##############

1)To assigne the hostname.
mail.example.com

2)To configure the DNS Mster server.
#rpm -ivh bind* --force

3)Open the configuretion file.
#vim /var/named/chroot/etc/named.conf

options {
     directory "/var/named";
};

zone "example.com"{
   type master;
   file "example.for";

4)Copy the file
#cp /usr/share/doc/bind-9.3.3/sample/var/named/localdomain.zone /var/named/chroot/var/named/example.for

5)To open the file.
#vim /var/named/chroot/var/named/example.for
$TTL    86400
@               IN SOA  mail.example.com. root (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
                IN NS           mail.example.com.
                IN MX 14        mail.eample.com.
mail            IN A            10.0.0.1

6)To restart the service.
# service named restart

7)To check.
#dig mail.example.com
#dig -t MX example.com

################# To confgure sendmail.################
1)To install the package.
#rpm -ivh sendmail* m4* --force

2)To open the configuretion file.
#vim /etc/mail/sendmail.mc
LINE NO-116
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
To comment this line.

LINE NO-155
LOCAL_DOMAIN(`mail.example.com')dnl

3)To compile the sendmail.mc file.
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

4)To restart the service.
#service sendmail restart

5)To open the /etc/hosts file
#vim /etc/hosts
127.0.0.1       localhost.localdomain   localhost    mail.example.com     mail

MAIL SERVER configuretion is over.

6)To create user.
#useradd u1
#useradd u2
#useradd u3
#passwd u1
#passwd u2
#passwd u3

*SQUERREL MAIL configuretion.

1)To install the packages.
squirrelmail*
dovecot*
curl*
php*
perl*
cyrus*
httpd*

2)Restart the following servicec.
# service httpd start
#service dovecot start
#service cyrus-imapd start
#service saslauthd start

To client side configuretion.
#vim /etc/resolve.conf
nameserver 10.0.0.1(webmail server ip)