Anna writes to ben@schule.example in her mail program and sends via SMTP (port 25) to her mail server.
If Ben is on another server, Anna’s server asks DNS for the MX record of schule.example and delivers the mail there via SMTP.
The mail lies in Ben’s mailbox.
Ben fetches it: via POP3 (port 110, the mail is downloaded and deleted) or via IMAP (port 143, the mail stays on the server, several devices see the same state).
The SMTP dialogue
S: 220 mail.schule.example
C: HELO pc1
S: 250 OK
C: MAIL FROM:<anna@schule.example>
C: RCPT TO:<ben@schule.example>
C: DATA
C: Subject: Hello
C: …
C: .
S: 250 OK
C: QUIT
Every reply starts with a three-digit code: 2xx means success, 5xx a permanent error.
In leyoNET
A server becomes a mail server with domain and mailboxes under Advanced → Services. The mail program on the desktop shows the whole protocol dialogue; in the packet list “Follow TCP stream” reads it line by line.
How to do it in leyoNET
The same text as in the app’s help (F1 key).
E-mail
A mail server accepts messages via SMTP (port 25). They are fetched via POP3 (110, download) or IMAP (143, keep on server). The sender finds the mail server through the MX record in DNS.
See an example
Email: SMTP, POP3, IMAP
Anna and Ben share a mail server.
Anna sends via SMTP, Ben fetches the message via IMAP.