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

I am new to mail and do not exactly know how it works.

I have seen administrators use sendmail to send out email. Is sendmail an smtp server or is it a client that relies on smtp server to relay email? I googled and read that it is a mail transfer agent.

Is there any difference between a mail transfer agent and a mail server?

Assuming there are no security checks (reverse dns etc) in place when I use sendmail to send out an email to [email protected]: Do I still need to go through another smtp server (google.com?) or can I send mails from my server using sendmail?

It will also be good if some kind soul can point me to a beginner guide on how mail servers work.

Thanks


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.