Blog

What is an MTA and what role do they play in email delivery?

Amy Elliott Amy Elliott
· 14 min read · Tips and resources · August 30th, 2024
MTAs (Mail Transfer Agents or Message Transfer Agents) are responsible for transferring every single email message from the sender to the receiver, making them a crucial part of a mail server.

They handle the routing, queueing, and relaying of email messages, which means they play a large part in overall email deliverability. Understanding exactly what they are and how they work can be useful in troubleshooting potential delivery issues. So even if your service provider takes care of everything, knowledge of MTAs is crucial for successfully running and maintaining your email-sending system. 

If it’s time to brush up on your email infrastructure knowledge and learn more about MTAs, don’t worry—you’re in the right place. In this guide, we’ll explain what Mail Transfer Agents (and other mail agents) are, how they work, how they affect your ability to seamlessly deliver emails, and more. Let’s get into it.

What is a Mail Transfer Agent?

A mail transfer agent is a piece of software that transfers emails from one server to another. Imagine a network of couriers, each transferring a parcel from one to the next until it reaches its final destination. MTAs work in a very similar way. 

Mail transfer agents are kind of like the middlemen, transferring messages from one location to another. They work alongside Mail User Agents (MUAs), Mail Submission Agents (MSAs), and Mail Delivery Agents (MDAs) to cover every step of the process and ensure messages are delivered. 

Mail user agents enable you to create, send, receive, read, and manage emails—in other words, they are the email clients we use, such as Gmail, Outlook, and Yahoo. 

Mail submission agents receive the message from the MUA and forward it to the MTA. 

Mail delivery agents are software applications that deal with the delivery of email messages to their final recipients—usually a mailbox on a mail server. As well as delivering emails, they also handle sorting emails into various folders or applying filters, such as spam filters, email forwarding, and notifications.

How MTAs work

Graphic demonstration of an MTA transferring an email.

Let’s break down the process. 

1. An email is sent and received by the MTA

The sender composes and sends their email using an MUA like Gmail which is then received by the MSA. The MSA transfers the message to the MTA on Gmail’s server via SMTP (Simple Mail Transfer Protocol). 

2. The MTA routes and, if necessary, relays the email

The MTA checks the recipient’s email address and uses the domain to carry out a DNS (Domain Name System) lookup to fetch the MX (Mail Exchange) records for the recipient’s domain. This allows the MTA to see which mail server is accepting emails for the domain. 

If the receiving mail server is local, i.e. for internal company emails, the same MTA will be responsible for delivering the email. In this case, it will transfer the message directly to the MDA. 

If not, the MTA will identify the next MTA to transmit the message to until it reaches the MTA responsible for delivering the message for the domain. Sometimes, this may involve transferring or relaying the email through multiple MTAs until it reaches the one responsible for delivering messages to the recipient’s domain. 

3. The email is transferred to the recipient server’s MTA

The sending or relaying MTA establishes an SMTP connection with the recipient server’s MTA and transfers the email. If the transfer fails due to an error, such as network issues, the sending MTA will queue the email and retry sending until the email times out. This will result in the email bouncing. 

4. The email is delivered

The recipient server’s MTA receives the email and forwards it to the MDA. The MDA then delivers the email to the recipient’s mailbox, or MUA. MUAs use POP3 (Post Office Protocol 3) or IMAP (Internet Message Access Protocol) to retrieve emails from the mail server.  

POP3 downloads the email from the server to the client’s device and then usually deletes the email from the server. (It can be configured to keep a copy.)

IMAP offers more advanced features. Instead of simply downloading emails from the server, it synchronizes them between the server and client. This allows for messages to be accessed from multiple devices. 

Once the message has been synced or downloaded using one of these protocols, the recipient can open and interact with the email in their MUA (Gmail).

Security features and protocols

There are several ways email systems prevent breaches during message transmission, many of which tie in with mail transfer agents. 

  • TLS (Transport Layer Security) encrypts SMTP, POP3, and IMAP connections between MTAs and MUAs to ensure email credentials and data are protected against tampering and interception 

  • STARTTLS enables unencrypted SMTP, POP3, and IMAP connections to be encrypted with TLS using the STARTTLS command 

  • S/MIME (Secure/Multipurpose Internet Mail Extensions) encrypts email messages and uses a digital signature to verify the sender’s identity and ensure only the intended recipient can read the message. It also helps to prevent the message from being tampered with during transmission

  • Spam and virus filters are used by MTAs and MDAs to scan for and block incoming and outgoing spam, phishing, and virus attacks 

  • SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting, and Conformance) are email authentication protocols used to verify the sender’s identity and ensure message integrity by confirming that the email contents haven’t been tampered with

Types of mail transfer agents

MTAs come in a few different forms: Firstly, there’s open-source or commercial, and secondly, there’s on-premise or cloud-based. There are differing pros, cons, and features between the different types and if you’re setting up an email system from scratch, you’ll want to familiarize yourself with them and see which meets the needs of your organization.

Open-source MTAs

As the name suggests, open-source MTAs are freely available for users to access their source code and modify and deploy it. Some popular open-source MTAs include Postfix, Exim, Sendmail, and Open SMTPD.

The pros are:

  • They are generally free to use

  • With the right skill set, you can modify the source code to customize the MTA for your organization’s specific needs

  • Since the source code is open, users can easily identify and flag vulnerabilities and issues

  • There is usually a large community that contributes to the development, documentation, and support of the MTA

Meanwhile, the cons include:

  • Open-source software is usually not very beginner-friendly and requires technical knowledge to configure, deploy, and manage it

  • Official support might not be available or you might need to pay for third-party assistance if you run into any issues that haven’t been addressed in community support channels

  • The quality of available documentation isn’t guaranteed

Commercial MTAs

On the other hand, commercial MTAs are proprietary solutions that can be purchased. They are mostly bundled with other features, such as in an email delivery service. Some examples include Microsoft Exchange Server, IDM Domino, Proofpoint, and GreenArrow. 

Pros of commercial MTAs:

  • They are generally a lot more user-friendly and more suitable for those with less technical expertise

  • They include many features for managing emails and communication such as API integrations, tracking and analytics, throttling and rate limiting, and more

  • You’ll get access to professional customer support

  • There’s typically a lot more thorough and up-to-date documentation available

  • The email system and deliverability are usually managed by the service provider, saving users a lot of time and headache

  • Providers usually adhere to SLAs (Service Level Agreements) that guarantee high levels of uptime and support, making them more reliable

And the cons:

  • While some providers offer free tiers, to send high volumes of emails you’ll typically need to pay a fee that increases in price the more emails you send

  • The source code can’t be modified, which makes commercial solutions slightly less flexible. However, a service with an extensive API and integrations solves this issue

On-premise vs. cloud-based MTAs

Both open-source and commercial MTAs offer a range of on-premise and cloud-based solutions. Let’s take a look at the pros, cons, and characteristics of both.

On-premise MTAs

An on-premise MTA is run within an organization’s own infrastructure and servers. This means they are highly customizable and the organization is 100% responsible for and has control over it. On-premise solutions are typically used by organizations in regulated industries, such as government or healthcare, large enterprises with the available resources to manage them, and businesses that have very specific needs. 

The pros are:

  • All data remains on-premise which means, if the appropriate security measures are correctly implemented, it can be more secure and help comply with specific regulations

  • They allow for extensive customization and integration with various systems

  • For internal communication, the email doesn’t need to leave the local network, making it more secure and potentially offering lower latency

While the cons include:

  • Extensive input is needed for implementation and maintenance as the organization is totally responsible for everything. This includes software updates, backups, and security

  • There is usually a higher cost to cover hardware, software, security, and maintenance

  • Scaling the solution can be expensive, time-consuming, and tricky and will usually require additional resources and hardware

  • The organization must be prepared for system failures to ensure services can be quickly restored 

Examples of on-premise MTAs include Microsoft Exchange Server, IBM Domino, and Zimbra.

Cloud-based MTAs

If you’d rather do without the hassle of maintaining an on-premise MTA, or simply don’t have the resources for it, a third-party hosted cloud-based MTA is the way to go. It will usually require a subscription to the provider’s service, and you won’t need to worry about a lot of the maintenance or email deliverability. 

Cloud-based pros:

  • They are usually a lot more cost-effective as there is no need to invest in hardware or pay for pricey maintenance

  • They are generally much easier to manage—the provider will take care of updates, security, disaster recovery, etc.

  • Less technical expertise is needed

  • They are very easy to scale as email volume increases

  • They are easy to access for multi-location team members

And the cons:

  • They give less control which may be an issue for large enterprises that need specific customization

  • They require a lot of dependency on the provider for compliance, uptime, and security

  • Latency can be an issue depending on the provider and the location of its cloud servers

  • Emails are processed on the provider’s server which could be an issue for organizations that must adhere to strict data privacy regulations

Some examples of cloud MTAs include Mailerq, KumoMTA (both), and Green Arrow (both).

How MTAs affect email deliverability

Since mail transfer agents play such an important role in getting emails delivered, it comes as no surprise that they also have a significant role in email deliverability. Here are the various deliverability aspects MTAs play a part in. 

Reputation management

IP reputation refers to how mail servers perceive a sending IP address, while domain reputation is linked to the domain name. For good deliverability, both IP and domain reputation must be in good standing. 

The role of MTAs in IP/domain reputation

  • Type of IP used: MTAs will either use a shared or dedicated IP address. Dedicated IPs allow full control over IP reputation, as they are used by a single sender. This also requires increased monitoring and management, as well as IP warm-up. On the other hand, shared IPs are used by multiple senders, meaning the overall reputation is affected by the behavior of all of them. Shared IPs used by service providers do monitor and manage reputation for you, however.

  • Bounce rate: MTAs track and manage bounce rates so that the appropriate action can be taken (such as removing invalid emails from your list) to prevent your IP reputation from being negatively impacted.

  • Sending configuration: MTAs can be configured to send emails consistently, avoiding the large sending spikes that raise red flags for ISPs (Internet Service Providers). They can also be configured to throttle the sending rate to pace email delivery and avoid triggering spam filters by sending too many emails too quickly. 

  • Email authentication: Authentication protocols such as SPF, DKIM and DMARC are supported by MTAs (if configured correctly). When these protocols are properly configured, they have a positive impact on domain reputation and also help to prevent phishing and spoofing attacks. 

Spam filtering

As well as using authentication protocols and maintaining a good reputation, MTAs can also perform a number of other functions to ensure emails won’t be flagged as spam. 

They can be configured to analyze the content of outgoing emails to check for spam red flags such as spammy words, suspicious links, and more. What’s more, they can even be integrated with well-known spam filters such as SpamAssassin to get a spam score. If the spam score surpasses the set threshold, the outgoing message can be filtered, preventing the message from causing damage to the sender reputation. 

Compliance

Compliance with the relevant email regulations requires significant input from the organization itself, but MTAs can also help to ensure that they are adhered to. 

For example, the CAN-SPAM Act requires emails to include a physical address, a way to opt out of receiving emails, and accurate email header information. The GDPR in the EU requires explicit consent from recipients to receive marketing emails, as well as data-handling specifications that comply with the regulations. 

MTAs can ensure that emails contain these elements, manage consent, and encrypt and handle personal data in a compliant way. This helps senders to maintain trust with ISPs, avoid blocklists, and ultimately, makes managing compliance less of a burden. 

Monitoring & reporting

MTAs help to facilitate performance monitoring and tracking by providing insights into delivery status, bounces, engagement rates, spam complaints, email authentication failures, sending sources, and more.

This data is crucial in identifying and troubleshooting deliverability issues, and in many cases, can help prevent damage to sender reputation and blocklisting. It can also help senders to identify trends in bounce rates and engagement, so they can adjust email-sending strategies for better performance and increased deliverability.

Who needs an MTA?

If you’re an enterprise sending very large volumes of emails and need a custom solution, you’ll need your own on-premise or cloud-based MTA. For the majority of senders, however, this approach would be far too costly, time-consuming, and simply not relevant to their needs.

This is where SMTP relay services, such as MailerSend, come in. It’s a third-party service that sends and relays emails from your system, without the need to build your own infrastructure from scratch or seek out an MTA. It also includes tons of useful features for sending and managing email delivery, such as email builders, analytics and reporting, security features, integrations, email API, and more. 

With an SMTP relay service, you can get started sending emails in minutes, and deliverability, blocklist monitoring, reputation management, and security are largely taken care of for you.

Try MailerSend's SMTP server for free

Start sending in minutes—no credit card needed. Use the free trial domain to test it out and subscribe to a free plan to get up to 3,000 emails/month.

What to consider when choosing an MTA

Whether you go open-source or commercial will largely depend on your resources and the type of setup you’re looking for: Do you prefer something fully customizable or are you looking for something that performs well but is easier to manage? When you’ve settled one way or the other, here’s what you should look for in a good MTA:

  • Scalability: The MTA should be easy to scale as your email volumes change over time 

  • Deliverability: Look for a solution that has a solid reputation for providing high deliverability rates. Test it out before you commit 

  • Easy to configure and manage: Maintaining a high-performing email infrastructure is no easy task. Choose a solution that makes implementation and management simple and hassle-free without compromising on deliverability or features 

  • Security features: Ensure the MTA is using properly configured authentication protocols, encryption, and other security features to protect your sending account

  • Support: Check which support channels are available and when they are available. Also, read reviews on other users’ support experience to see if the provider prioritizes assisting customers

  • Pricing: Inexpensive doesn’t equal good value, and expensive doesn’t equal the perfect fit for your business. Take into consideration your budget and whether the solution provides value for your organization based on its specific requirements

That’s a wrap on mail transfer agents

Unless you’re sending vast amounts of emails and need a custom solution, you’ll most likely be opting for a full-on SMTP relay service with infrastructure, deliverability, and security taken care of (with some extra bells and whistles thrown in, too!). But understanding what MTAs are, how they work, and how they play a role in email deliverability is an excellent step towards efficiently managing your email delivery system.

Do you have any tips and tricks for managing an MTA or SMTP relay? Share them with us in the comments!

Amy Elliott
I’m Amy, Content Writer at MailerSend. As a child, I dreamt about writing a book and practiced by tearing pages from an A4 notepad and binding them with sugar paper. The book is pending but in the meantime, I love taking a deep dive into technical topics and sharing insights on email metrics and deliverability.