SMTP (Simple Mail Transfer Protocol)



SMTP

SMTP is Simple Mail Transport Protocol. This is the protocol used by the email systems to transfer mail messages from one server to another. 





 

Mail User Agent:

The Mail User Agent (MUA), or mail client, is the application that is used to write, send and read email messages. Anyone who has written and sent a message on any computer has used a Mail User Agent of one type or another. 

   ex: 
       Popular locally installed email clients:  Evolution, Thunderbird, outlook, mutt(text based), lotus notes
  Popular web-based email clients : Gmail, Outlook.com and Yahoo! Mail.

Mail Transfer Agent:

The Mail Transfer Agent (MTA) is the part of the email system that does much of the work of transferring the email messages from one computer to another (either on the same local network or over the internet to a remote system). 


   ex:  For Linux, sendmail, Postfix, Qmail and Exim.   
        For Windows, Exchange server

Mail Delivery Agent:

A mail delivery agent or message delivery agent (MDA) is a computer software component that is responsible for the delivery of e-mail messages to a local recipient's mailbox. Also called an LDA, or local delivery agent.



Postfix as MTA:

                  package: postfix
                  service: postfix
                  port number: 25  (standard smtp port number)
                  main config file: /etc/postfix/main.cf


yum install postfix

The key options in the main.cf file are:

vi main.cf
myhostname = mail.domain.com
mydomain = domain.com
inet_interfaces = all

save and exit
:wq


chkconfig --level 35 postfix on
service postfix restart

Test:    mail    -s     <subject>    <mailaddress>

  To check mail,     su  -  user
                               $mail

Send Test Email

Now test the setup by sending a test email to your own email address, to send email use following command.

mail  user@domain.com
Subject: This is Subject Line
Email content line 1
Email content line 2
Email content line 3
^d

To send email press button CTRL+d (^d). Now check your mail box.

       Note: Default mail location   /var/spool/mail/$USER

No comments:

Post a Comment