Based on the Linux Master 2 exam syllabusReport an error
| Item | Description |
|---|---|
| WWW | World Wide Web. Devised in 1989 by Tim Berners-Lee (CERN) |
| HTTP | HyperText Transfer Protocol. Port 80 |
| HTTPS | HTTP + encryption (SSL/TLS). Port 443 |
| HTML | A language for describing documents |
| URL | An address that indicates the location of a resource |
https :// www.example.com : 443 /docs/index.html
│ │ │ │
│ │ │ └── Path
│ │ └─────────── Port (default if omitted)
│ └───────────────────────── Host name
└────────────────────────────────────── Protocol (scheme)http:// means 80 and https:// means 443. So https://www.example.com:443/ and https://www.example.com/ are the same address.http://192.168.0.10:8080/.http. It is where you state how to access the resource, as in ftp:// or mailto:.HTTP has a simple structure: the browser makes a request and the server sends a response. One request gets one response.
[Request] GET /docs/index.html HTTP/1.1
Host: www.example.com
[Response] HTTP/1.1 200 OK
Content-Type: text/html
<html> … </html>| Request method | What it does |
|---|---|
| GET | Fetches a resource. Typing a URL into the address bar is this |
| POST | Sends data. Submitting a login or post-writing form |
| HEAD | Receives only the headers, without the body |
| PUT / DELETE | Uploads a resource / deletes it |
| Status code | Meaning | Typical |
|---|---|---|
| 2xx | Success | 200 OK |
| 3xx | Redirect to another address | 301, 302 |
| 4xx | The requester's (client's) fault | 403 Forbidden, 404 Not Found |
| 5xx | An error on the server side | 500 Internal Server Error, 503 Service Unavailable |
| Category | Names |
|---|---|
| Web server | Apache (the oldest standard), Nginx (light and fast), lighttpd |
| Graphical browser | Firefox, Chrome, Konqueror (KDE) |
| Text browser | Lynx, w3m, links |
wget or curl.wget http://www.example.com/file.tar.gz # Saves as file.tar.gz in the current directory
wget -c http://www.example.com/file.tar.gz # Resumes an interrupted download
curl http://www.example.com/ # Prints the received content to the screen (standard output)
curl -O http://www.example.com/file.tar.gz # Saves under the original file namewget defaults to "save to a file", while curl defaults to "print to the screen". To save with curl, give it -O (uppercase) or -o filename.httpd (on Debian-family systems it is apache2). The product name and the process name differ, which causes confusion when searching with ps.A question asking you to pick "what is not a web browser" tests how program names are classified. It is mixed with the application programs we saw last week under X Window.
| Name | What it is |
|---|---|
| Firefox · Chrome · Chromium · Opera | Graphical web browsers |
| Konqueror | KDE's web browser and file manager |
| Epiphany | GNOME's web browser |
| Lynx · w3m · links | Text web browsers |
| Thunderbird · Evolution | Not web browsers but mail programs |
| Apache · Nginx | Not browsers but web servers |
[Sender] [Recipient]
Mail program Mail program
│ ▲
│ SMTP POP3 / IMAP
▼ │
Outgoing mail server ──── SMTP ────► Incoming mail server ──┘
(server-to-server delivery is also SMTP)| Protocol | Port | What it does |
|---|---|---|
| SMTP | 25 | Sends mail. Also handles server-to-server delivery |
| POP3 | 110 | Downloads mail |
| IMAP | 143 | Views mail while keeping it on the server |
"Which protocol exchanges mail between mail servers?" → SMTP. Receiving is POP3 and IMAP, but the key point is that what servers exchange with each other is SMTP.
This is the process of alice@example.com sending mail to bob@example.org.
1 alice's mail program hands it to the example.com mail server SMTP
2 The example.com server asks DNS "where is example.org's mail server?"
3 It delivers to the example.org mail server it found SMTP
4 The example.org server puts it in bob's mailbox
5 bob opens his mail program and fetches the mail from the mailbox POP3 or IMAPuser@domain. The domain after @ determines which server to send to, and the name before it determines whose mailbox on that server.| If the sentence says | Answer |
|---|---|
| Send mail, outgoing, transfer or exchange between servers | SMTP |
| Fetch mail, delete from the server after downloading | POP3 |
| Read while keeping it on the server, multiple devices, folder sync | IMAP |
| Attachments, non-English text, putting images in mail | MIME |
| Item | POP3 | IMAP |
|---|---|---|
| Where it is stored | Downloaded to my computer | Stays on the server |
| Original on the server | Usually deleted | Kept |
| Multiple devices | Not synchronized | Same state on every device |
| Offline | Good for reading | Needs a connection |
| Port | 110 | 143 |
| Protocol | Plaintext port | Encrypted port |
|---|---|---|
| HTTP | 80 | 443 (HTTPS) |
| SMTP | 25 | 465 (SMTPS) |
| POP3 | 110 | 995 (POP3S) |
| IMAP | 143 | 993 (IMAPS) |
| Abbreviation | Full name | What it does | Examples |
|---|---|---|---|
| MUA | Mail User Agent | The program the user works with | Thunderbird, Outlook, mutt |
| MTA | Mail Transfer Agent | Server-to-server delivery | Sendmail, Postfix, qmail, exim |
| MDA | Mail Delivery Agent | Delivers to the mailbox | procmail, Dovecot |
MUA ──► MTA ──── SMTP ────► MTA ──► MDA ──► Mailbox ──► MUA
(Compose) (Send) (Receive) (Deliver) (Read)| Role | Programs |
|---|---|
| MUA — programs the user reads and writes with | Thunderbird · Evolution · KMail · mutt · the mail command |
| MTA — server-to-server transfer (SMTP) | Sendmail · Postfix · qmail · Exim |
| MDA — mailbox delivery | procmail |
| POP3·IMAP server — lets the user fetch mail | Dovecot |
/var/spool/mail/username, and depending on the distribution the path may also appear as /var/mail.| Symptom | Where to look |
|---|---|
| Sending works but only receiving fails | POP3·IMAP settings (incoming server, 110·143) |
| Receiving works but only sending fails | SMTP settings (outgoing server, 25) |
| Mail checked on the PC disappeared from the phone | The PC downloaded it via POP3 and deleted it from the server |
The web works but only https:// does not | Port 443 is blocked |
Tomorrow we cover DNS, which converts domain names to IPs.
Click a choice to reveal the answer and explanation.
Question 1
Which protocol is used to exchange mail between mail servers?
Question 2
Which protocol lets you keep mail on the server and check it in the same state from multiple devices?
Question 3
What is the default port number used by HTTPS?
Question 4
Which component of a mail system is responsible for server-to-server mail transfer?
Question 5
Which of the following is a text-based web browser?