docs(chore): Normalize for consistency (#2206)

"Brief" summary/overview of changes. See the PR discussion or individual commits from the PR for more details.

---

Only applies to the `docs/content/**` content (_and `setup` command_). `target/` and `test/` can be normalized at a later date.

* Normalize to `example.com`

- Domains normalized to `example.com`: `mywebserver.com`, `myserver.tld`, `domain.com`, `domain.tld`, `mydomain.net`, `my-domain.tld`, `my-domain.com`, `example.org`, `whoami.com`.
- Alternative domains normalized to `not-example.com`: `otherdomain.com`, `otherdomain.tld`, `domain2.tld`, `mybackupmx.com`, `whoareyou.org`.
- Email addresses normalized to `admin@example.com` (in `ssl.md`): `foo@bar.com`, `yourcurrentemail@gmail.com`, `email@email.com`, `admin@domain.tld`.
- Email addresses normalized to `external-account@gmail.com`: `bill@gates321boom.com`, `external@gmail.com`, `myemail@gmail.com`, `real-email-address@external-domain.com`.
- **`faq.md`:** A FAQ entry title with `sample.domain.com` changed to `subdomain.example.com`.
- **`mail-fetchmail.md`:** Config examples with FQDNs for `imap`/`pop3` used `example.com` domain for a third-party, changed to `gmail.com` as more familiar third-party/external MTA.

* Normalize config volume path

- Normalizing local config path references to `./docker-data/dms/config/`: `./config/`, `config/`, \``config`\`, `/etc/` (_volume mount src path prefix_).
- Normalize DMS volume paths to `docker-data/dms/mail-{data,state,log}`: `./mail`, `./mail-state` `./data/mail`, `./data/state`, `./data/logs`, `./data/maildata`, `./data/mailstate`, `./data/maillogs`, (_dropped/converted data volumes: `maildata`, `mailstate`_).
- Other docker images also adopt the `docker-data/{service name}/` prefix.

* `ssl.md` - Use `dms/custom-certs` where appropriate.

* Apply normalizations to README and example `docker-compose.yml`

---

Common terms, sometimes interchangeably used or now invalid depending on context: `mail`, `mail container`, `mail server`, `mail-server`, `mailserver`,`docker-mailserver`, `Docker Mailserver`.

Rough transformations applied to most matches (_conditionally, depending on context_):

- 'Docker Mailserver' => '`docker-mailserver`'
- 'mail container' => '`docker-mailserver`' (_optionally retaining ' container'_)
- 'mail server' => 'mail-server' / '`docker-mailserver`'
- 'mail-server' => '`docker-mailserver`'
- 'mailserver' => 'mail-server' / '`docker-mailserver`'

Additionally I checked `docker run` (_plus `exec`, `logs`, etc, sub-commands_) and `docker-compose` commands. Often finding usage of `mail` instead of the expected `mailserver`

Additionally changes `mailserver` hostname in k8s to `mail` to align with other non-k8s examples.

---

* drive-by revisions

Mostly minor revisions or improvements to docs that aren't related to normalization effort.
This commit is contained in:
Brennan Kinney 2021-09-23 11:29:37 +12:00 committed by GitHub
parent 5b9d1f9120
commit a0ee472501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 544 additions and 503 deletions

View file

@ -6,7 +6,7 @@ title: 'Advanced | Full-Text Search'
Full-text search allows all messages to be indexed, so that mail clients can quickly and efficiently search messages by their full text content. Dovecot supports a variety of community supported [FTS indexing backends](https://doc.dovecot.org/configuration_manual/fts/).
Docker-mailserver comes pre-installed with two plugins that can be enabled with a dovecot config file.
`docker-mailserver` comes pre-installed with two plugins that can be enabled with a dovecot config file.
Please be aware that indexing consumes memory and takes up additional disk space.
@ -14,13 +14,13 @@ Please be aware that indexing consumes memory and takes up additional disk space
The [dovecot-fts-xapian](https://github.com/grosjo/fts-xapian) plugin makes use of [Xapian](https://xapian.org/). Xapian enables embedding an FTS engine without the need for additional backends.
The indexes will be stored as a subfolder named `xapian-indexes` inside your `mail` folder. With the default settings, 10GB of email data may generate around 4GB of indexed data.
The indexes will be stored as a subfolder named `xapian-indexes` inside your local `mail-data` folder (_`/var/mail` internally_). With the default settings, 10GB of email data may generate around 4GB of indexed data.
While indexing is memory intensive, you can configure the plugin to limit the amount of memory consumed by the index workers. With Xapian being small and fast, this plugin is a good choice for low memory environments (2GB) as compared to Solr.
#### Setup
1. To configure fts-xapian as a dovecot plugin, create a `fts-xapian-plugin.conf` file and place the following in it:
1. To configure `fts-xapian` as a dovecot plugin, create a file at `docker-data/dms/config/dovecot/fts-xapian-plugin.conf` and place the following in it:
```
mail_plugins = $mail_plugins fts fts_xapian
@ -58,14 +58,13 @@ While indexing is memory intensive, you can configure the plugin to limit the am
2. Update `docker-compose.yml` to load the previously created dovecot plugin config file:
```yaml
version: '3.8'
services:
mailserver:
image: docker.io/mailserver/docker-mailserver:latest
container_name: mailserver
hostname: mail
domainname: example.com
container_name: mailserver
env_file: mailserver.env
ports:
- "25:25" # SMTP (explicit TLS => STARTTLS)
@ -74,12 +73,12 @@ While indexing is memory intensive, you can configure the plugin to limit the am
- "587:587" # ESMTP (explicit TLS => STARTTLS)
- "993:993" # IMAP4 (implicit TLS)
volumes:
- ./data/mail:/var/mail
- ./data/state:/var/mail-state
- ./data/logs:/var/log/mail
- ./docker-data/dms/mail-data/:/var/mail/
- ./docker-data/dms/mail-state/:/var/mail-state/
- ./docker-data/dms/mail-logs/:/var/log/mail/
- ./docker-data/dms/config/:/tmp/docker-mailserver/
- ./docker-data/dms/config/dovecot/fts-xapian-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
- /etc/localtime:/etc/localtime:ro
- ./config/:/tmp/docker-mailserver/
- ./fts-xapian-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
restart: always
stop_grace_period: 1m
cap_add:
@ -87,23 +86,23 @@ While indexing is memory intensive, you can configure the plugin to limit the am
- SYS_PTRACE
```
3. Recreate containers:
3. Recreate containers:
```
docker-compose down
docker-compose up -d
docker-compose down
docker-compose up -d
```
4. Initialize indexing on all users for all mail:
4. Initialize indexing on all users for all mail:
```
docker-compose exec mailserver doveadm index -A -q \*
docker-compose exec mailserver doveadm index -A -q \*
```
5. Run the following command in a daily cron job:
5. Run the following command in a daily cron job:
```
docker-compose exec mailserver doveadm fts optimize -A
docker-compose exec mailserver doveadm fts optimize -A
```
### Solr
@ -122,7 +121,7 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
solr:
image: lmmdock/dovecot-solr:latest
volumes:
- solr-dovecot:/opt/solr/server/solr/dovecot
- ./docker-data/dms/config/dovecot/solr-dovecot:/opt/solr/server/solr/dovecot
restart: always
mailserver:
@ -132,15 +131,11 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
...
volumes:
...
- ./etc/dovecot/conf.d/10-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
- ./docker-data/dms/config/dovecot/10-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro
...
volumes:
solr-dovecot:
driver: local
```
2. `etc/dovecot/conf.d/10-plugin.conf`:
2. `./docker-data/dms/config/dovecot/10-plugin.conf`:
```conf
mail_plugins = $mail_plugins fts fts_solr