How Email is Sent

This is an interview question that came up for me with a helpdesk role. There is technically no wrong answer to the question, but you can get very technical very quickly. The easiest answer is of course you type words onto your screen, hit the send button, and a lot of magic occurs. You could get a little more technical and include the OSI model. However, you can still get even more technical. The reason why is that there are three sets of software packages or applications that make email work. They are the Mail User Agent (MUA), Mail Delivery Agent (MDA), and Mail Transfer Agent (MTA). The MUA sits on the client’s device, and the MDA and MTA sit on the server.

The MUA or User Agent is really just any graphical application you use to check your email: Outlook, Gmail, Apple Mail, etc. Once you compose your email and hit send, your email moves down the OSI stack, where it will be sent to the server. Once all of your email packets hit the server the Mail Transfer Agent (MTA) has to determine where your email is being sent to a remote network. If your email is going to a remote network it will need to locate another MTA on that network. Otherwise, it can direct the email to the relevant device on the local network. Once the email has gotten back on it is eventually received by the MDA or Mail Delivery Agent. The MDA then determines how the email should be processed (inbox, spam, important) based on your configuration settings.

While this explanation focuses on Linux software packages, the process is very similar on Windows servers. Ultimately, that’s the magic that’s going down when you hit the send button after turning in your two week notice. There can be router hopping and stuff in between just like any sort of packet transfer. The only real difference is the software packages involved and the ports they use. In this case SMTP uses port 25 for unencrypted email and 587 for SMTPS or encrypted email. Dedicating ports to services makes it easier to create efficient daemons or processes.

If you buy anything from Amazon using the link below I may receive a commission from your purchase at Amazon.
Tech Best Sellers at Amazon

Leave a comment

Your email address will not be published. Required fields are marked *