Sie sind auf Seite 1von 2

Email Service

=========================================
Email System Components:

1- Mail User Agent (MUA):


------------------------------------
A client used to compose and read e-mail (Outlook, Evolution, Thunderbirds)

2- Mail Transfer Agent (MTA):


-----------------------------------
An SMTP server used to relay or accespt e-mail for delivery (postfix, snedmail,
exim, qmail, exchange server)

3- Mail Delivery Agent (MDA):


-----------------------------------
A program used by the final MTS to deliver e-mail to the message store May be
included with the MTA or a seprate program such as procmail.

4- Mail Access Agent (MAA):


----------------------------------
An IMAP/POP3 server used by an MUA to access the message store (Dovecot, Cyrus
IMAP)

Installing Postfix
===============================================
Postfix is fast and popular SMTP server widely used. The main job of postfix is to
relay mail locally or to the intended destination outside the network.

Popular SMTP servers


---------------------------------
Sendmail
Postfix
Qmail
By default, Sendmail comes pre-installed with CentOS/RHEL, We will need to remove
it and install Postfix.

Step 1 � Install Postfix


============================
If Postfix not already installed on your machine, Install it using the following
command. Also, remove sendmail if already installed.
#yum remove sendmail
#yum install postfix

Note: Make postfix as default MTA for your system using the following command
#alternatives --set mta /usr/sbin/postfix

If above command not work and you get the output as �/usr/sbin/postfix has not been
configured as an alternative for mta�. Use below command to do the same else skip
it

#alternatives --set mta /usr/sbin/sendmail.postfix

alternatives --set mta /usr/sbin/sendmail.postfix

Step 2 � Configure Postfix


============================
Edit Postfix configuration file /etc/postfix/main.cf in your favorite editor and
make following changes.

#vi /etc/postfix/main.cf
myhostname = mail.kabul.com
mydomain = kabul.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost, $mydomain
mynetworks = 127.0.0.0/8, /32
relay_domains = $mydestination
home_mailbox = Maildir/
:wq

After executing above command edit the postfix configuration file and make sure all
changes are done properly.

Step 3 � Restart Postfix Service


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

restart Postfix service to read changes of configuration. Also, configure to


autostart on system boot.
#service postfix restart
#chkconfig postfix on

Step 4 � Open Firewall Port


================================
Now if your system is configured to use iptables firewall, So add firewall rules to
make postfix accessible from outside, using following commands.

#iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT


#iptables -A INPUT -m state --state NEW -m udp -p udp --dport 25 -j ACCEPT

Das könnte Ihnen auch gefallen