How does a SMTP server work ?
- October 20, 2014
- by
- Admin
Whenever you send an email, your mail client interacts with the SMTP server to handle shipping. The SMTP server on your computer can have conversations with other servers SMTP to deliver emails. Assume that we want to send an email. My email id is Jordan and I have my account ordenadores-y-portatiles.com. I want to send an email to yourname@domain.com and am using a client that is installed on my computer which is Outlook Express. When I set my mind in somedomain.com , told Outlook Express the name of the mail server – mail.somedomain.com. When I create a post and give it to the submit button, what happens is the following:
1 – Outlook Express connects to the SMTP server hosted in mail.somedomain.com.com using port 25.
2 – Outlook Express has a conversation with the SMTP server telling the destination address and the address of the sending mail, as well as the content of the email.
3 – The SMTP server takes the part of the address in the “to” (yourname@domain.com) and divided into two parts: the name of the recipient (yourname) and the domain name (domain.com). If the address in the “to” have been somedomain.com another user, the server simply had delivered the message to the POP3 server somedomain.com (using a program called delivery agent). Being the recipient in another domain, SMTP needs to communicate with that domain.
4 – The SMTP server has a conversation with a domain name server, or DNS. Tells about “Can you give me the IP address of the SMTP somedomain.com? Server “. The DNS server replies with one or more IP addresses associated with the SMTP server somedomain.com
5 – The SMTP server somedomain.com connects to an SMTP server domain.com using port 25. It has the same conversation in plain text that the client had with the SMTP server somedomain.com, and delivers the message to the server. The server recognizes the domain name which delivers the message to the POP3 server, which puts the message in the inbox.
If for some reason, the SMTP server somedomain.com cannot connect to the mail server of domain.com, then the message is queued. The server on many machines, using a program called sendmail for delivery. The sendmail program will try to periodically resend the messages you have in your queue. For example, you can try to resend the mail every 10 minutes. After four hours, usually sends you an email saying that there is something wrong. After five days, most sendmail configurations desist from sending email and we will resend them to us.
An SMTP server understands simple commands in plain text, and the most common are:
- HELO – Discovered
- EHLO – Discovered and request extended mode
- MAIL FROM – Specifies the sender
- TCPT TO – Specifies the recipient
- DATA – Specifies the message body
- RSET – Reset
- QUIT – Logs
- HELP – Help with Commands
- VRFY – Verify an address
- VERB – In verbal mode
In the next part of the article, we will see how the POP3 server works.
Resource:
- https://communities.sas.com/docs/DOC-8045
- http://groupspaces.com/hostcoin/
- http://esdsdatacenter.wordpress.com/2014/10/17/introduction-to-linux-os/
- http://www.indyarocks.com/blog/1747715/An-introduction-to-the-mail-server
- http://goarticles.com/article/What-Is-the-Difference-Between-an-SMTP-and-POP-Mail-Server/9564031/