|Subject:||What is SMTP relay|
|Creation date:||12/14/15 4:35 PM|
|Last modified on:||12/14/15 4:35 PM|
What is SMTP relay?
Many administrators misunderstand the concept of SMTP relay. Some over-cautious administrators block SMTP relay completely and others leave it open for any Internet user to misuse their servers. Problems exist in both extremes. Therefore, it is important to understand exactly what SMTP relay is and how to configure your SMTP server so that is does not leave you vulnerable to outside attacks and allows legitimate users to send and receive emails. This article should clear up some of the confusion on this topic and show how to effectively turn off an open relay.
What is SMTP
Before we dive into SMTP Relay, it is important to know how the SMTP protocol works. SMTP is an acronym for Simple Mail Transfer Protocol. Most of Internet service providers nowadays use this protocol to send email. Email clients, also known as Mail User Agents (MUA), utilize this protocol and act as an SMTP client to distribute email messages to the recipients. When a MUA sends an email messages, it connects to the configured SMTP server and communicates to it using the SMTP protocol.
Internet mail works pretty much like our postal mail. When you wish to send a letter or a package via snail mail, you put the letter inside an envelope, write the recipient's as well as your return address and drop it off at your local post office. The local post office figures out the final destination of the package and sends it to the appropriate post office in the recipient's town. One important factor to notice here is that if both sender and recipient are in the same town no other post office gets involved.
Electronic mail works pretty much the same. SMTP servers act as local post offices. When a user wishes to send an email, he or she sends it to the SMTP server, which then forwards it to the recipient's SMTP server. Rather than street address and apartment numbers, electronic mail recipients are identified by unique email addresses. Every SMTP server is configured to handle one or more domain names. Analogous to snail mail, if both sender and recipient are in the same domain no other SMTP server gets involved.
Following characteristics are common between snail mail and electronic mail.
Every mail package is wrapped within an envelope that contains:
Sender's name and address.
Recipient's name and address.
Post office's stamp.
A timestamp when package was received.
Every electronic mail is wrapped within an envelope as well and contains:
Sender's name and email address.
List of recipients and their email address.
SMTP server's signature. There can be more than one SMTP server involved.
The date and time the email was received.
Electronic mail can have more elements than mentioned above.
There is no guarantee that the sender's name and address will always be correct. It is very easy to forge the sender's identity.
Similarly, it is very easy to hide the sender's true identity in an electronic mail.
If the sender and receiver are in the same town, your local post office will not send the package to any other post office.
If the sender and receiver are handled by the same SMTP server, no other server will get involved.
Although the sender's identity cannot be trusted, you can still find a few things about the package by looking at the envelope such as the town letter was mailed from and time. ||
Similarly, the SMTP envelope (also known as header) contains information such as sender's IP Address and date/time stamp the mail was sent.|
Every post office is assigned a postal code or zip code, which is used to identify it location. It is possible that in one post office may handle multiple zip codes.||These postal/zip codes are known as domain names in SMTP speak. Every SMTP server is configured to handle one or more domains. Domain name is the text that appears after the @ sign in an email address.|
What is mail relay
In case of snail mail, the local post office is a government agency and there are no restrictions on who can send a package. Consider a scenario where you live in town A and you want to send a package to town B. When one town's post office accepts packages from another town it is said to "Relay" your message.
Similarly, if you work for company A and want to send an email to someone in company B, you connect to your SMTP server which then relays your message to the SMTP server owned by company B. The notion that an SMTP server accepts an email that is destined for a different SMTP server is called relaying.
It would be impossible to send email if every SMTP server in the world stopped relaying
The electronic world is a bit different than the real world: you can do things faster, cheaper and distances do not matter. Imagine every time you wanted to send a snail mail you were asked to show your passport or any other document that proved your identity. This would add extra security at a cost of frustration and time. However, the frustration level associated with asking for a user's id and password in an electronic transaction is much lower than the burden of having to carry your passport.
Most SMTP servers ask for the user's credentials in terms of their id and password. The SMTP server will allow users to relay their message to a different server only if these credentials are correct. This authentication mechanism ensures that no one outside the organization can use the company's SMTP server to send message to a third party recipient.
What is an open relay
Your server is said to be an open relay if it accepts messages on behalf of other domains and does NOT require user authentication. In the case of an open relay, a person sitting in Singapore can send an email to California through your server, which could be in London.
Open relay servers are frequently misused by spammers sending unsolicited emails. Once a malicious user finds out about an open relay server on the Internet, he/she can send millions of messages all over the world, potentially bringing your network to its knees.
Several organizations have setup databases of IP Addresses that list and track open relay servers. If you have an open relay server you run the risk of having your IP listed in one of these databases. As a result many SMTP servers may not accept emails from you.
How to check for open relay
The easiest way to test for an open relay is using QuickTest at AboutMyX.com
Alternatively, you can send an email specifying the test server as your SMTP server and without inserting a user id/password. This can be done via any User Agent, such as MS Outlook, Netscape Messenger or Eudora. In the configuration, specify the SMTP server that you want to test and remove any user id/password that you may have specified. Try sending emails to multiple domains and if the email is accepted your server might be an open relay.
Posted by Moziz on 5/28/13 4:32 PM
Wow. Finally a clear explanation. Thanks!
Posted by Petarian on 4/29/12 12:05 AM
Fantastic article. Just wanted to thank Xeams team for this.
Posted by Lyo on 8/8/12 10:52 AM
Great article, but I have a question. If open relay servers can be so easily misused to attack other servers, why are there open relay servers in the first place?
Posted by Diane on 7/7/13 2:03 PM
Very useful. Finally a simple yet detailed explanation... thanks
Posted by Padma K on 6/15/14 1:16 PM
Well written and simple
Posted by seo on 3/19/14 5:43 PM
Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword....wait there's even more Now what if i told you there was a simple Wordpress plugin that does all the On-Page SEO, and automatically for you? That's right AUTOMATICALLY, just watch this 4minute video for more information at. <a href="http://www.2014PandaSeo.com">Seo Plugin</a>
Posted by jawahar on 12/25/13 1:13 AM
Thank you .Very clear and simple.But i want to know onething. What is the benefit with using SMTP server if we have exchange server in office?
Posted by Micehelle Melee on 5/3/17 6:43 AM
Most of the information being provided via this post is correct and valuable, however to those in the KNOW, there are still ways around it. When it comes to Exchange EMail, a Microsoft propriety entity your information is incorrect.
Posted by Naresh on 10/17/13 5:44 AM
Good article. Helped alot to understand SMTP relay
Posted by Lavanya on 9/19/14 3:35 PM
cool :) :) :)
Posted by Kader on 4/3/14 9:48 AM
complex issue explained with simple words in simple way
Posted by Heet on 4/24/14 4:44 AM
Thank you for such a simple yet truthful explanation with simpler example :) Really useful article.. Thumbs up for xeams team (y)
Posted by Md Kabir Hossain on 2/11/14 1:51 AM
is it possible to setup smtp relay with your software?
Posted by Mueed on 11/21/17 11:35 PM
Great explanations are given in this article along with well know example to understand thing clearly. Thanks.
Posted by Carol on 9/9/15 12:40 PM
Very helpful - simple, concise explanation. Perfect level of information I needed. Thank you!
Posted by Ian Hinson on 10/17/13 9:01 AM
This article fell short of what it promised to explain.
Starts out by telling us that some over-cautious admins block SMTP relay completely. but then goes on to explain that SMTP relay is just the benign process by which different SMTP servers communicate with each other, such that it would be impossible to send any emails with SMTP relay.
But then, if SMTP relay is essential to the process, how is that some over-cautious admins can "block SMTP relay completely" and then not notice straight away that no one is able to send emails to other email domains!?
Nope. There must be another explanation of what an SMTP relay is.
Posted by zechariah kassa on 6/8/11 6:46 AM
good explanation of how smtp works.mostly the analogy , it is very clear thanks
Posted by krish on 5/16/14 1:14 AM
use full info thanks!!!!!!!!!
Posted by pravin on 4/4/13 8:24 AM
Very Good explanation with proper examples, which will help to understand......Thank you so much.
Posted by Kruti on 8/5/16 2:31 AM
Great Article. Thanks
Posted by megatr0n on 9/3/09 3:01 PM
I tried the quick test and my server passed but how do I try it in outlook when I don't know what port the server is listening on?
Posted by Khaled on 4/2/12 5:14 AM
Actually we need to send for maybe 10000 email address once every week, what service do your recommend us to use? We want to use the smtp settings in outook.
Posted by naamila on 10/24/15 4:11 AM
Wow. Finally a clear explanation. Thanks! Surperb Thanks...!
Posted by Vignesh Lakshmanan on 4/22/15 7:55 PM
This was really helpful to understand what is SMTP.
Thanks a lot!
Posted by Faizi on 1/19/16 5:40 AM
Yes it is great article,can you please add article how to configure secure relay server and what is its dependency.
Posted by G umapathi on 7/9/13 5:41 AM
Thanks!, that a great comparision.
Posted by Drew Conroy on 1/14/13 10:13 PM
Great article. It really gives you a great example and makes understanding very easy.
Posted by CyberVerme on 2/1/15 7:02 PM
exactly what I needed.
Fantastic as explained a complicated thing with the example of the real mail.
Posted by Alfonso on 5/17/13 7:32 AM
Nice article. A complex topic made easy. Thanks!
Posted by Chintamani on 9/20/13 2:23 AM
Nice explanation with proper analogy. Thanks.
Posted by satyanarayan on 8/24/14 10:07 AM
Nicely explained. Now the interesting part of 'how can someone misuse my mail server header' and make it become like an open relay or something like that' is forgotten. Have you mentioned it another article or something?
I have bookmarked this as favourite for it concisely explains the basic concepts well.
Add a comment to this document
Do you have a helpful tip related to this document that you'd like to share
with other users? Please add it below. Your name and tip will appear at the
end of the document text.