SMTP
(Simple Mail Transfer Protocol)
is a TCP/IP protocol used in sending and receiving e-mail. However, since it is limited in its ability to queue messages at the receiving end, it is usually used with one of two other protocols, POP3 or IMAP, that let the user save messages in a server mailbox and download them periodically from the server. In other words, users typically use a program that uses SMTP for sending e-mail and either POP3 or IMAP for receiving e-mail. On Unix-based systems, sendmail is the most widely-used SMTP server for e-mail. A commercial package, Sendmail, includes a POP3 server. MicrosoftExchange includes an SMTP server and can also be set up to include POP3 support.
SMTP usually is implemented to operate over Internet port 25. An alternative to SMTP that is widely used in Europe is X.400. Many mail servers now support Extended Simple Mail Transfer Protocol (ESMTP), which allows multimedia files to be delivered as e-mail.
how SMTP works??
SMTP stands for Simple Mail Transfer Protocol as the name suggest it is basically used for emails.. SMTP specified for outgoing mail uses and default sits on TCP Port 25..(Uses 587 in new versions) Electronic mail servers uses SMTP for send and receive emails while the User Client interface only uses SMTP mainly for sending messages to the mail servers..for relaying...
For receving emails the User Client applications mainly use POP (Post office Protocol) and IMAP (Internet Messaging Access Protocol)
For receving emails the User Client applications mainly use POP (Post office Protocol) and IMAP (Internet Messaging Access Protocol)
Firstly as the user writes and the mail is submitted (by MUA Mail User Agent) to a Mail Server (MSA, Mail Submission Agent ) using SMTP on TCP Port 25 or 587..From there the Mail Submission Agent submits the mail to the Mail Transfer Agent(Mail transfer Agent) ..Each Process is a a Mail Transfer Agent in its own right , I.e an SMTP server...
Then the Boundary Mail transfer Agent locates the target host by looking up the host-name in DNS to look up the mail exchange record for the target's (recipient's) Domain name..
Then the MTA (Mail transfer Agent ) further looks for the A record in order to get the ip address of the target..
Then it connects to the host's ip as an SMTP Client..
Once the host accepts the requests it hands on the email to the MDA (Mail Delivery Agent)..
The mail delivery agent is used for the local mail delivery..
Once Delivered to the local mail server , the mail is stored for batch retrieval by authentication mail clients (MUA's)..
Then The Mail is received by the End-User's mail client , using IMAP or POP...
IMAP - It is a Protocol that allows both access to the mail and managing stored emails..
POP - It is a Protocol is used to retrieve emails
Then the Boundary Mail transfer Agent locates the target host by looking up the host-name in DNS to look up the mail exchange record for the target's (recipient's) Domain name..
Then the MTA (Mail transfer Agent ) further looks for the A record in order to get the ip address of the target..
Then it connects to the host's ip as an SMTP Client..
Once the host accepts the requests it hands on the email to the MDA (Mail Delivery Agent)..
The mail delivery agent is used for the local mail delivery..
Once Delivered to the local mail server , the mail is stored for batch retrieval by authentication mail clients (MUA's)..
Then The Mail is received by the End-User's mail client , using IMAP or POP...
IMAP - It is a Protocol that allows both access to the mail and managing stored emails..
POP - It is a Protocol is used to retrieve emails
commands
SMTP is similar to any other INTERNET protocol like HTTP , FTP etc...Just like them SMTP session includes issuing of some commands between server and client..
The SMTP session basically includes 3 command/reply pairs..
MAIL - This command is basically used to establish return address or Return path...This is basically a address for bounce messages
RCPT - This command is to establish the recipient of a message … The command is issued multiple times for multiple recipients
DATA - This is the main command that to send the message text..It consists of a message header and a message body..
Example of message header :-
Example of Message Body :-
RCPT - This command is to establish the recipient of a message … The command is issued multiple times for multiple recipients
DATA - This is the main command that to send the message text..It consists of a message header and a message body..
Example of message header :-
To: bahamomani@users.sourceforge.net From: bahamomani@users.sourceforge.net Cc: Subject: Re : Cne project Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Message-Id: <E1PkVWQ-0002qn-Cl@sfs-web-10.v29.ch3.sourceforge.com> Date: Wed, 27 mar 2013 05:44:54
Example of Message Body :-
Code:
Hello World.... How are you... I am a message body and thats all ...B.m.M
جمع من المصادر
بهاء المومني
ليست هناك تعليقات:
إرسال تعليق