Is sendmail an smtp server? Is there any difference between MTA and mail server?

IMHO this tiny tutorial, MUAs, MTAs, and MDAs, is very good at explaining the basic concepts of the Unix email system.

Yes, properly configured sendmail should be able to send email to any MTA on reachable hosts (but that MTA may refuse the mail for various reasons)

Now when you say mail server that typically refers to an alternate path on either/both of:

  • Receiving side
    Basically replacing the destination host MTA+MDA (and the user mailbox) with a mail server + various mail client(s) running on various separate machines model (like web/POP/IMAP/etc, typically applicable to most public mail services like gmail/yahoo).
  • Transmit side
    Basically replacing the sending host MUA+MTA with the mail server + various mail client(s) running on various separate machines model

I looked into this a bit once.

Maybe avoid a term like "mail server" 'cos once you start using a term like MTA you are now using a very specific terminology - nomenclature even, and "mail server" is perhaps just too general, ambiguous even, to be meaningful.

From what I can gather, it goes like this

MUA-->MSA--->MTA--->(MDA->Comp)<--MUA

and with an IMAP/POP client(MRA) and IMAP/POP server(MAA) involved

sending(A->B->C->D->X)   then  from receiving right to left (X<--B<--A)
    A      B     C          D          X      B     A 
    MUA-->MSA--->MTA--->(MDA->Comp)-->MAA<---MRA<--MUA

Emails are sent to user@domain

MUA is the email client. It'd be the SMTP client. (or maybe more accuraetly, a user interface configured to run a particular SMTP client which is of course local to that machine but of course, connects to an SMTP Server)

MSA is an MTA meaning it transfers the email, but it's the MTA that the MUA connects to. And it's on the local domain. It would run SMTP. It'd be an SMTP server. (possibly there are other protocols it could run as alternatives to SMTP).

MTA is an MTA at the destination domain.

MDA Is a computer on the domain of the recipient, that writes/"delivers" the message into the "mail store" which is on a hard drive that computer has access to. Often local to it. That mail store, stores mail for users on the domain.

MAA and MRA - These are to do with receiving email, rather than sending email out. The term MAA is less well known, and often people refer to the MRA as just the IMAP/POP client, and don't give the server an abbreviation. I've heard of the MRA being a term for both client and server, the argument being that it says agent, so just describes a function and the definition doesn't limit itself to just client or just server. But sites that use the term MAA seem to define the MAA as the server and MRA as the client, and maybe they're right. So i'll go with that, and quote from two websites on that, for a definition and an example.

There is the MAA which is a POP/IMAP server. And the MRA which is the POP/IMAP client. Two links that mention this..

https://www.ida.liu.se/~TDDI09/lectures/TDDI09-F4.pdf
MRA client Fetchmail
MAA server Courier IMAPD

http://archive.vector.org.uk/art10500970
MAA (Mail Access Agent):
manages the folders of an email account and makes the messages available to a MRA. MRA (Mail Retrieval Agent): accesses the email folders via the MAA and makes the messages available to the MUA


You ask about Sendmail.. I know very little of these email related linux programs, but Sendmail does have an SMTP client, though it's mostly an MTA(and any program that can function as an MTA can function as an MSA, an MSA is just a form of MTA).

You ask if it's possible to send directly to the destination domain's MTA, if there are no security checks. I think i've done it once MUA to MTA, just one SMTP server involved, so yes. But normally it's the MSA on your local domain that sends it to the MTA there.So normally there are two SMTP Servers involved. I think what I did to see that, was I ran an MSA SMTP server sendmail or postfix, saw it doing a DNS check on the domain and saw it finding a destination MTA(another SMTP server). Then I thought heh i'll try sending it directly. And for one domain I wanted to send to, I could connect directly to that destination MTA.


The term "email server" is vague. E-mail has a lot of moving parts to it.

  • Sendmail is a Mail Transfer/Transport Agent (MTA), a.k.a SMTP server. (There are others, e.g. exim4)

    • Something will open a session with a domain's SMTP server to send a message to another host on that domain. (The domain's SMTP server is found via DNS MX records)
  • Once an SMTP server receives a message, it can do several things:

    • If the received message is for a different domain, it can relay the message to that domain's SMTP server.
    • If the received message is for the same domain the SMTP server lives on, it can hand the message off to the local Mail Delivery Agent (MDA) (if it's not acting as an MDA itself).
    • On UNIX systems, the local MDA typically copies the message to a local user's mail spool (mbox or Maildir) or other storage mechanism.

If you have an SMTP server running on a UNIX/Linux system, you can use a Mail User Agent (MUA) such as mutt, pine, or other program to read mail from your local spool. You have to be logged on to the local system for this to work.

What if you want to read mail stored on a remote system? The remote system must be running a POP3 or IMAP server, which will fetch messages from the account on the remote system and bring them to you, optionally with management functions in the case of IMAP. POP3/IMAP cannot send messages.

Applications that let you read mail from a remote server via POP3 or IMAP will also let you send mail via SMTP and will have to implement/be a client for both protocols. POP3/IMAP and SMTP do not have to live on the same host.

Security has been bolted on to most of these protocols over the years. Each of these protocols have optional methods to require client certificates or authentication. It's particularly important to protect an SMTP server from relaying email for unauthenticated users as it will typically be abused for spam purposes. The SMTP username/password/certificate can be different than any POP3/IMAP ones, which can be different still from any local accounts on the system.