Mail Server Configuration1

15
Step4:Install “Postfix” package for SMTP and “Dovecot” package for POP and IMAP [root@mylinuxpc1 ~]# yum groupinstall "Mail Server" Loading "rhnplugin" plugin Loading "installonlyn" plugin Setting up Group Process Setting up repositories Setting up repositories Reading repository metadata in from local files Dependencies Resolved ================================================================= ============ Package Arch Version Repository Size ================================================================= ============ Installing: dovecot i386 1.0-1.2.rc15.el5 core 1.5 M sendmail i386 8.13.8-2.el5 core 631 k sendmail-cf i386 8.13.8-2.el5 core 311 k spamassassin i386 3.1.7-4.el5 core 913 k Transaction Summary ================================================================= ============ Install 4 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 3.3 M Is this ok [y/N]: y Downloading Packages:

description

msc

Transcript of Mail Server Configuration1

Step4:Install Postfix package for SMTP and Dovecot package for POP and IMAP

[root@mylinuxpc1 ~]# yum groupinstall "Mail Server"

Loading "rhnplugin" plugin

Loading "installonlyn" plugin

Setting up Group Process

Setting up repositories

Setting up repositories

Reading repository metadata in from local files

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

dovecot i386 1.0-1.2.rc15.el5 core 1.5 M

sendmail i386 8.13.8-2.el5 core 631 k

sendmail-cf i386 8.13.8-2.el5 core 311 k

spamassassin i386 3.1.7-4.el5 core 913 k

Transaction Summary

=============================================================================

Install 4 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 3.3 M

Is this ok [y/N]: yDownloading Packages:

(1/4): sendmail-8.13.8-2. 100% |=========================| 631 kB 00:00

(2/4): dovecot-1.0-1.2.rc 100% |=========================| 1.5 MB 00:00

(3/4): sendmail-cf-8.13.8 100% |=========================| 311 kB 00:00

(4/4): spamassassin-3.1.7 100% |=========================| 913 kB 00:00

Running Transaction Test

Installing: sendmail ######################### [1/4]

Installing: dovecot ######################### [2/4]

Installing: sendmail-cf ######################### [3/4]

Installing: spamassassin ######################### [4/4]

Installed: dovecot.i386 0:1.0-1.2.rc15.el5 sendmail.i386 0:8.13.8-2.el5 sendmail-cf.i386 0:8.13.8-2.el5 spamassassin.i386 0:3.1.7-4.el5

Complete!

[root@mylinuxpc1 ~]#

[root@mylinuxpc1 ~]# yum install "postfix"

Loading "rhnplugin" plugin

Loading "installonlyn" plugin

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

postfix i386 2:2.3.3-2 core 3.6 M

Installing for dependencies:

cyrus-sasl i386 2.1.22-4 core 2.2 M

Transaction Summary

=============================================================================

Install 2 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 5.7 M

Is this ok [y/N]: yDownloading Packages:

(1/2): cyrus-sasl-2.1.22- 100% |=========================| 2.2 MB 00:00

(2/2): postfix-2.3.3-2.i3 100% |=========================| 3.6 MB 00:00

Running Transaction Test

Installing: cyrus-sasl ######################### [1/2]

Installing: postfix ######################### [2/2]

Installed: postfix.i386 2:2.3.3-2

Dependency Installed: cyrus-sasl.i386 0:2.1.22-4

Complete!

[root@mylinuxpc1 ~]#

[root@mylinuxpc1 ~]# cd /var/ftp/pub/Server/

[root@mylinuxpc1 Server]#

[root@mylinuxpc1 Server]# pwd/var/ftp/pub/Server

[root@mylinuxpc1 Server]# rpm -Uvh system-switch-mail-0.5.25-12.noarch.rpm

Preparing... ########################################### [100%]

1:system-switch-mail ########################################### [100%]

[root@mylinuxpc1 Server]#

Step5:Change from Sendmail to Postfix(#system-switch-mail)

[root@mylinuxpc1 ~]# system-switch-mail

Select Postfix Select on OK Select OK

Step6: Create some Users (Ex: venkat,sai ,aditya ..etc)

[root@mylinuxpc1 ~]# useradd piyush

[root@mylinuxpc1 ~]# useradd santosh[root@mylinuxpc1 ~]# useradd manzoor[root@mylinuxpc1 ~]# passwd abrarStep7:Configure Postfix (/etc/postfix/main.cf) file

[root@mylinuxpc1 ~]# vi /etc/postfix/main.cf # INTERNET HOST AND DOMAIN NAMES

#mydomain = domain.tld

Remove # and type domain.tld as mytechies.com

mydomain = mytechies.com

# SENDING MAIL

#myorigin = $myhostname

#myorigin = $mydomain (Remove #)

#myorigin = $myhostname

myorigin = $mydomain# RECEIVING MAIL

#inet_interfaces = all (Remove #)

#inet_interfaces = $myhostname

#inet_interfaces = $myhostname, localhost

inet_interfaces = localhost (Add #)

inet_interfaces = all

#inet_interfaces = $myhostname

#inet_interfaces = $myhostname, localhost

#inet_interfaces = localhost

# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".

mydestination = $myhostname, localhost.$mydomain, localhost ,mytechies.com,# INTERNET OR INTRANET

#relayhost = $mydomain (Remove #)

#relayhost = [gateway.my.domain]

#relayhost = [mailserver.isp.tld]

#relayhost = uucphost

#relayhost = [an.ip.add.ress]

relayhost = $mydomain

#relayhost = [gateway.my.domain]

#relayhost = [mailserver.isp.tld]

#relayhost = uucphost

#relayhost = [an.ip.add.ress]

# INSTALL-TIME CONFIGURATION INFORMATION

Note :In the end of file type this line

virtual_alias-domains = mytechies.com

:x

root@mylinuxpc1 ~]#

Step8: Create E-mail IDs in Virtual file (/etc/postfix/virtual)

[root@mylinuxpc1 ~]# vi /etc/postfix/[email protected]

piyush

[email protected]

[email protected] manzoor

:x

[root@mylinuxpc1 ~]#

Step9:Map E-mail IDs to Usernames) ( # postmap virtual)

[root@mylinuxpc1 ~]# cd /etc/postfix/[root@mylinuxpc1 postfix]# postmap virtual[root@mylinuxpc1 postfix]#

Step10:Start postfix service

[root@mylinuxpc1 postfix]# service postfix restartShutting down postfix: [ OK ]

Starting postfix: [ OK ]

[root@mylinuxpc1 postfix]#

Step11: Configure Dovecot for IMAP and POP (/etc/dovecot.conf)

[root@mylinuxpc1 ~]# vi /etc/dovecot.conf## Dovecot configuration file

#protocols = imap imaps pop3 pop3s (Remove #)

protocols = imap imaps pop3 pop3s

#listen = [::] (Remove # and :: and type *)

listen = [*]

Step12:Start dovecot service

[root@mylinuxpc1 ~]# service dovecot startStarting Dovecot Imap: [ OK ]

[root@mylinuxpc1 ~]#

Steps for configuring E-mail Client for sending and receiving messages:

Step1: Configure IP Address as for Windows Client (192.168.5.x)

Step2: Configure E-mail Client (Outlook Express)

Step3: Send and Receive Message

Step2: Configure E-mail Client (Outlook Express)

Start Programs Outlook Express

Web Mail Client :

To Send / Receive Message by using Web Browser ( I.E / Firefox),you have configure

1.Apache Web Server

2.Squirrel Mail

Steps for configuring Web Mail :

Step1 :Install Squirrelmail package

Step2 :Configure Squireelmail

Step3 :Configure Apache for Squirrelmail

Step1 :Install Squirrelmail package

[root@mylinuxpc1 ~]# cd /var/ftp/pub/Server/[root@mylinuxpc1 Server]#

[root@mylinuxpc1 Server]# pwd/var/ftp/pub/Server

[root@mylinuxpc1 Server]# rpm -Uvh squirrelmail-1.4.8-4.el5.noarch.rpm

Preparing... ########################################### [100%]

1:squirrelmail ########################################### [100%]

[root@mylinuxpc1 Server]#

Step2 :Configure Squireelmail

[root@mylinuxpc1 ~]# cd /usr/share/squirrelmail/config/[root@mylinuxpc1 config]#

[root@mylinuxpc1 config]# pwd/usr/share/squirrelmail/config

[root@mylinuxpc1 config]# ls -ltotal 184

-rw-r--r-- 1 root root 29548 Jan 23 2007 config_default.php

lrwxrwxrwx 1 root root 45 Dec 13 00:02 config_local.php -> ../../../../etc/squirrelmail/config_local.php

lrwxrwxrwx 1 root root 39 Dec 13 00:02 config.php -> ../../../../etc/squirrelmail/config.php

-rwxr-xr-x 1 root root 144118 Jan 23 2007 conf.pl-rw-r--r-- 1 root root 492 Jan 23 2007 index.php

[root@mylinuxpc1 config]#

[root@mylinuxpc1 config]# . /conf.pl

Configuring Organization Name:

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[SquirrelMail]: MYTECHIESCOMPUTERS LTDCommand >>RCommand >>2Configuring SMTP and IMAP Server Settings:

SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

General

-------

1. Domain : localhost

2. Invert Time : false

3. Sendmail or SMTP : Sendmail

A. Update IMAP Settings : localhost:143 (uw)

B. Change Sendmail Config : /usr/sbin/sendmail

R Return to Main Menu

C Turn color off

S Save data

Q Quit

Command >> 1[localhost]: mytechies.com

Command >> 3

1. Sendmail

2. SMTP

Your choice [1/2] [1]: 2SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

General

-------

1. Domain : mytechies.com

2. Invert Time : false

3. Sendmail or SMTP : SMTP

IMAP Settings

--------------

4. IMAP Server : localhost

5. IMAP Port : 143

6. Authentication type : login

7. Secure IMAP (TLS) : false

8. Server software : uw

9. Delimiter : /

B. Update SMTP Settings : localhost:25

H. Hide IMAP Server Settings

R Return to Main Menu

C Turn color off

S Save data

Q Quit

Command >>

Command >> B SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

General

-------

1. Domain : mytechies.com

2. Invert Time : false

3. Sendmail or SMTP : SMTP

SMTP Settings

-------------

4. SMTP Server : localhost

5. SMTP Port : 25

6. POP before SMTP : false

7. SMTP Authentication : none

8. Secure SMTP (TLS) : false

9. Header encryption key :

A. Update IMAP Settings : localhost:143 (uw)

H. Hide SMTP Settings

R Return to Main Menu

C Turn color off

S Save data

Q Quit

Command >> 4This is the hostname of your SMTP server.

[localhost]: 192.168.5.1

Command >> ACommand >> 4This is the hostname where your IMAP server can be contacted.

[localhost]: 192.168.5.1SquirrelMail Configuration : Read: config.php (1.4.0)

---------------------------------------------------------

Server Settings

General

-------

1. Domain : mytechies.com2. Invert Time : false

3. Sendmail or SMTP : SMTPIMAP Settings

--------------

4. IMAP Server : 192.168.5.15. IMAP Port : 143

6. Authentication type : login

7. Secure IMAP (TLS) : false

8. Server software : uw

9. Delimiter : /

B. Update SMTP Settings : 192.168.5.1:25H. Hide IMAP Server Settings

R Return to Main Menu

C Turn color off

S Save data

Q Quit

Command >>

Command >> SData saved in config.php

Press enter to continue...

Command >> Q[root@mylinuxpc1 ~]#

Step3 :Configure Apache for Squirrelmail

[root@mylinuxpc1 ~]# gedit /etc/httpd/conf/httpd.confNameVirtualHost 192.168.5.1

ServerAdmin [email protected] DocumentRoot /usr/share/squirrelmail ServerName www.mytechies.com ErrorLog logs/dummy-host.example.com-error_log

CustomLog logs/dummy-host.example.com-access_log common

Save and Exit

[root@mylinuxpc1 ~]#

Step4: Starting Apache Web Server :

[root@mylinuxpc1 ~]# service httpd restartStopping httpd: [ OK ]

Starting httpd: [ OK ]

[root@mylinuxpc1 ~]#

Steps for sending /receiving messages from Web Browser

Step1 : Configure Preferred DNS server as 192.168.5.1

Step2 : Send and Receive mail by using web browser

Open Internet Explorer / Mozzilla Firefox

Type http://www.mytechies.com click on GoType Username venkat and type Password and Click on Login