You press Send, and a second later the message is in the other person’s inbox, in another city or on another continent. It looks like one step, but behind it are several programs and servers that hand the message from one to the next, and a lookup in the Domain Name System that decides where it goes. Knowing this path is the first step to running your domain’s email well: it explains why a message is delayed, why one bounces back, and why a single wrong record can stop all your mail. We covered why a business needs email on its own domain in why your business needs professional email hosting; this article starts the series that explains how it works, from the basics to the professional level, in plain words.
01The journey of one message
Let us follow one message. Hiba runs a bakery in Beirut, and her address is hiba@furn-alashrafieh.com. She writes to the administration of a school in Tripoli, admin@madrasat-alarz.com, to confirm an order of bread for Thursday. This is what happens between pressing Send and the message being read:
- 01Writing in the mail app: Hiba writes the message in the mail app on her phone. This app is the : it writes, sends and displays messages, but it does not deliver them itself.
- 02Handing it to the outgoing server: The app connects to her provider’s outgoing server, signs in with her address and password, and hands it the message. This step is called submission.
- 03Looking up the recipient’s domain: The outgoing server, a , reads the domain after the @ sign, madrasat-alarz.com, and asks DNS for its : which server receives mail for this domain?
- 04Server to server: It connects to the server the MX record names and delivers the message over SMTP. If that server does not answer, it keeps the message in a queue and tries again later.
- 05Checking and storing: The receiving server checks the message: is the recipient real, does the sender look genuine, does it look like spam? Then it puts it in the admin mailbox, or in the spam folder.
- 06Reading: When someone at the school opens the mail app or webmail, it fetches the message from the mailbox over IMAP or POP3.
Two servers carry the message: the sender’s provider’s server and the recipient’s. They do not need to be at the same company, or even know each other in advance. What connects them is a public standard, SMTP, and a public directory, DNS.
02Who does what along the way
Every stage has its own program, and the names are worth knowing because they come up in settings and error messages:
| Part | Its job | Example |
|---|---|---|
| Mail user agent (MUA) | Writes, sends and displays messages for you | Outlook, Apple Mail, Thunderbird, the Gmail app, webmail |
| Submission server | Receives your message after you sign in, then sends it on | Your provider’s outgoing server |
| Mail transfer agent (MTA) | Carries the message from server to server | Exim, Postfix, Microsoft Exchange |
| Delivery agent (MDA) | Puts the received message in the right mailbox and folder | Dovecot, the server’s filters |
| Access server | Gives you your mailbox to read | An IMAP or POP3 server, webmail |
On a typical hosting service, all of these run on one server or a few, so you do not see them separately. But when a message is late, the question is always: at which of these stages did it stop?
03SMTP: the protocol that carries mail
SMTP, the Simple Mail Transfer Protocol, is the language mail servers speak when they hand a message to one another. Its current standard is RFC 5321, and it works like a short conversation in plain text: the sending server greets the receiver, says who the message is from and who it is for, sends it, and waits for a reply code after every step. A code starting with 2 means it was accepted, 4 means a temporary problem worth retrying, and 5 means permanent rejection.
# The sending server (C) talks to the receiving server (S), simplifiedS: 220 mx1.madrasat-alarz.com ESMTPC: EHLO mail.furn-alashrafieh.comS: 250-mx1.madrasat-alarz.comS: 250 STARTTLSC: STARTTLSS: 220 Ready to start TLS# From here on the conversation is encryptedC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 End data with <CR><LF>.<CR><LF>C: From: Hiba <[email protected]>C: To: [email protected]C: Subject: Bread order for ThursdayC:C: 300 loaves for the school, as agreed.C: .S: 250 OK: queuedC: QUITS: 221 Bye
Notice that the address appears twice: once in the MAIL FROM and RCPT TO commands, and again in the From and To lines inside the message. The first pair is the , which servers use for delivery and for returning failures, like the address on a paper envelope. The second pair is what the recipient sees on screen, like the letterhead on the paper inside. The two usually match, but not always: a newsletter can show your address in From while its envelope carries the sending service’s address. This difference matters a great deal later in the series, because it is what SPF, DKIM and DMARC deal with.
When the other server does not answer
Email was designed to tolerate interruptions. If the receiving server is down or returns a temporary 4xx code, the sending server keeps the message in its queue and tries again: the standard recommends waiting at least 30 minutes between attempts, and trying for at least four to five days before giving up. Only then does it return a failure message to the sender, which is a bounce. So a message that arrives hours late has usually not been lost; it was waiting in a queue.
04MX records: where a domain receives its mail
How does the sending server know where madrasat-alarz.com receives its mail? It asks DNS for the domain’s MX records, short for Mail Exchanger. Each record names a server and gives it a preference number:
# The school’s MX records in its DNS zone# name TTL type preference servermadrasat-alarz.com. 3600 IN MX 10 mx1.madrasat-alarz.com.madrasat-alarz.com. 3600 IN MX 20 mx2.madrasat-alarz.com.# Each server named in MX needs its own address recordmx1.madrasat-alarz.com. 3600 IN A 192.0.2.25mx2.madrasat-alarz.com. 3600 IN A 198.51.100.25mx1.madrasat-alarz.com. 3600 IN AAAA 2001:db8::25
The number is a preference, not a ranking of quality: the lower number is tried first. Here the sending server tries mx1 with preference 10, and goes to mx2 with 20 only if the first does not answer. If two records share the same number, the sender picks between them at random, which spreads the load across them. The numbers themselves do not matter, only their order: 10 and 20 work exactly like 1 and 2.
| Setup | Records | What happens |
|---|---|---|
| One server | MX 10 mail.example.com | All mail goes to it, and senders queue messages if it is down |
| Main and backup | MX 10 mx1 and MX 20 mx2 | mx2 receives only when mx1 does not answer |
| Load sharing | MX 10 mx1 and MX 10 mx2 | Senders split the mail between them at random |
| A domain that receives no mail | MX 0 . | Senders know at once that the domain accepts no mail |
Three rules people often get wrong:
- MX points to a name, not an address: The value of an MX record is a host name, such as mx1.madrasat-alarz.com, and that name needs its own A or AAAA record. An IP address written directly in MX is not valid.
- Not to a CNAME: The name in MX should not be an alias (CNAME) for another name; the standards forbid it, and some servers will refuse to deliver.
- No MX does not mean no mail: If a domain has no MX record at all, senders try its A or AAAA address as if it were the mail server. A domain that should never receive mail is better served by a “null MX” record, as in the last row of the table.
05Why your domain’s email lives in DNS
MX records sit in the domain’s zone, alongside the records for its website. This is what lets you put your email and your website with different providers: the A record sends visitors to the server hosting the site, while MX sends mail to the server hosting the mailboxes, and the two may be completely separate.
It also means that whoever controls the domain’s DNS controls where its mail goes. Change the MX records and new mail starts arriving at the new server, which is how you move your email from one provider to another. Delete them by mistake, or point them at a server that does not know your domain, and mail stops arriving or bounces back to senders. And because DNS answers are cached for the time set in the record’s TTL, a change takes effect gradually: some senders reach the new server within minutes, and others reach the old one for a few hours, so keep the old mailboxes for a while after the move.
MX is not the only email record in DNS. The zone also holds TXT records that tell the world which servers may send in your domain’s name, and that let recipients verify your messages were not forged: SPF, DKIM and DMARC. They decide whether your mail reaches the inbox or the spam folder, as you will see in why emails go to spam, and each has its own article later in the series, starting with the SPF record explained.
06Reading mail: IMAP, POP3 or webmail
Once a message is in the mailbox, there are three ways to read it:
| IMAP | POP3 | Webmail | |
|---|---|---|---|
| Where mail stays | On the server, with copies on your devices | Usually downloaded to one device and deleted from the server | On the server |
| Several devices | Same folders and read status everywhere | Each device sees something different | Any browser |
| Needs an app setup | Yes | Yes | No |
| Without internet | What was synced is available | Everything downloaded is available | Not available |
| Secure port | 993 | 995 | HTTPS |
, whose current standard is RFC 9051, keeps messages and folders on the server and syncs them with every device: read a message on your phone and it shows as read on your computer, move it to a folder and it moves everywhere. POP3 is older and simpler: it downloads messages to one device, and in its usual setup deletes them from the server, so they disappear from your other devices, and if that device is lost, the mail is lost with it. POP3 is now kept for special cases, such as an archive on one computer. Webmail needs no setup at all: you open the mailbox in a browser, which is useful on a borrowed computer or when you are checking whether a problem is in your app or in the mailbox itself.
Sending works differently from reading: whichever reading method you choose, your app sends over SMTP to the outgoing server, on a secure submission port and with a sign-in. We go through these settings, port by port and app by app, in the next article: setting up your domain email on your phone and computer.
07Common problems and what is behind them
Knowing the path makes most common problems easy to place:
- ProblemNobody receives mail at my domain since I moved my website
- FixThe new provider’s zone may not have your MX records, or they point at the old server. Check the MX records in the zone that is actually live, and copy the mail records along with the website records when you move.
- ProblemA message arrived hours late
- FixThe receiving server was down or asked the sender to wait with a temporary code, so the message stayed in a queue until it was accepted. This is normal behaviour; if it happens often, ask the recipient’s provider.
- ProblemMy messages disappeared from my phone after I opened them on the computer
- FixThe computer is set up with POP3 and deletes messages from the server after downloading them. Set it up again with IMAP.
- ProblemThe MX record exists, but mail still does not arrive
- FixThe name in MX may have no A record, or it may be a CNAME, or an IP address was written in place of the name. Fix the record so it points to a host name with an address.
- ProblemSome mail reaches the old server and some the new one
- FixThe change is still spreading while DNS caches expire. Wait for the time set in the old TTL, and keep the old mailboxes until it passes.
08Your domain’s email at Illevante
If your site is on Illevante’s cPanel hosting, email on your own domain is included in every plan: unlimited email accounts, mailboxes of 2 GB on cPanel Start and unlimited on Power and Infinity, attachments up to 60 MB, forwarding, aliases, catch-all and autoresponders, with webmail and IMAP, POP3 and SMTP, Imunify Email Protection and spam filtering, and SPF and DKIM. The plans start at $2 a month for cPanel Start, $4 for Power and $6 for Infinity, or $20, $40 and $60 a year.
Your domain’s MX, TXT and other records are managed in DNS Console, where you add or edit records as described in this article. After any change, check them with the DNS check tool: it checks that every MX record has an address, that you have exactly one SPF record, and what your DMARC policy does, and explains how to fix each problem it finds, with a button that takes you straight to DNS Console.
If you need business email separate from your hosting, Acrux Mail is coming soon; you can read about it in professional email on your domain with Acrux Mail. And if you want to run your own mail server, see VPS hosting as a mail server before you start. In the next article we create the first mailbox and add it to your phone and computer.




