MAIL-SERVER

Mail Server Configuration in Linux

Mail Server and it’s Configuration

The two most widely used protocols on the Internet are http, hypertext transfer protocol (ie. the WWW) and smtp, simple mail transfer protocol (ie. email). We’ve just dealt with serving web content with Apache. Now we’ll deal with managing an email system.

There are a few new keywords we need to look into.

Mail user agent: MUA is the email client which we use to create an draft send mails. Generally Microsoft outlook, Kmail …etc.

Mail transfer agent Message mail transfers between sender and recipient will take place between the MTA’s. Exchange, Qmail, send mail, Postfix ..etc.

Simple Mail transfer protocol: Mail will transfer between the MTA’s.

Usage: To send and receive mails.

Package: postfix

Configuration file:

  • /etc/postfix/main.cf
  • /etc/dovecot/dovecot.conf

Port: 25

Daemon:

  • Postixd,
  • dovecot

Script:

/etc/init.d/postfix,

/etc/init.d/dovecot

Mail Server Configuration

MAIL-SERVER

Check if the DNS should be configured

Step 1: check the hostname of the system by using the below command

# hostname

Step 2: install the packages by using the below server

# yum install postfix dovecot –y

Step 3: Search an edit the configuration file /etc/postfix/main.cf

# vi /etc/postfix/main.cf

Myhostname = sandhya.example.com

My domain=example.com

My origin=$ domain

Inet_interfaces=$ myhostname, localhost

Home_mailbox=mkdir /

:wq!

Step 4: Edit configuration file /etc/dovecot/dovect/dovect.conf

#vi /etc/dovecot/dovect.conf

Protocols=iMAP POP3, LMAP

Step 5: Start the services and make them permanent

# service postfix start

# service dovecot start

# chkconfig postfix on

# chkconfig dovecot on

Step 6: Check users in the system in /etc/passwd

Step 7: To send a testmail to the user sandhya

# mail –s testmail sandhya

Hi This is an test email

Ctr+d

Step 8: Switch user as sandhya and check mail

# su – sandhya

cd /mkdir

cd new

Check for the email.

 

Leave a Comment

Your email address will not be published. Required fields are marked *