docs(chore): Normalize for consistency#2206
docs(chore): Normalize for consistency#2206polarathene merged 12 commits intodocker-mailserver:masterfrom
Conversation
Only applies to the `docs/content/**` content (_and `setup` command_). `target/` and `test/` can be normalized at a later date. Normalizations: - 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 `[email protected]` (in `ssl.md`): `[email protected]`, `[email protected]`, `[email protected]`, `[email protected]`. - Email addresses normalized to `[email protected]`: `[email protected]`, `[email protected]`, `[email protected]`, `[email protected]`. - **`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. Observations: - User accounts & aliases noticed in docs (`<user>@<domain>`): `user1`, `user2`, `qa`, `alias1`, `alias2`, `user+tag`, `admin`, `info`, `admin.gmail`, `info.gmail`, `baduser`, `address`, `address+tag`, `ceo`, `hr`, `qa`, `test`. - Amavis config example escapes `@`: `amavis\@example.com`. - If modifying account names, make sure to check for any related references in the doc page (_eg: part of filesystem paths_). - In docs like the FAQ, there is `.$mydomain` as part of config, this is possibly where some domain name examples derived from. - **`coding-style.md`:** `[email protected]` changed to `[email protected]`. Not sure if `other` is an alias, if it is, should it be changed to `alias`? Unaltered (_No benefit in changing?_): - **`ssl.md`:** `example.test`. - **`faq.md`:** `[email protected]`. - **`relay-hosts.md`:** `domain1.com`, `domain2.com`, `domain3.com` and `relay1.org`, `relay2.org`. - **`auth-ldap.md`, `forward-only-mailserver-with-ldap-authentication.md`, `environment.md`:** LDAP specific usage of `example.org`, `mydomain.net` seem to be used (_note: the TLD is sometimes separate_). I'm not familiar with LDAP config to alter this atm. - **`understanding-the-ports.md`:** `[email protected]`, `[email protected]` (_just noting the `friend` account for `example.com`_). - **`introduction.md`:** `smtp.dms.io` (FQDN), `[email protected]`, `[email protected]`, `[email protected]` (_similar to `[email protected]` but intended as separate user_). - **`setup-stack.sh`, `check-for-changes.sh`:** `[email protected]` (_unaltered due to active PRs_). ... Some occurrences noticed outside of docs (_for future reference_): - **`target/bin/addalias`:** `[email protected]`, `[email protected]`, `[email protected]`. - **`target/bin/delquota`:** `<username@domain>`. - **`test/config/letsencrypt/{acme.json,acme-changed.json}`:** `[email protected]`. - **`test/config/dovecot-lmtp/conf.d/15-lda.conf`:** `hostname@domain` (comment line). - **`test/tests.bats`:** `username@fulldomain` (`docker exec` for `setquota`).
+ misc improvements. Normalizing local config path references to `./docker-data/dms/config/`: `./config/`, `config/`, \``config`\`, `/etc/` (_volume mount src path prefix_). Overview: - **`full-text-search.md`:** `fts-xapian-plugin.conf`, `solr-dovecot` prefixed with `docker-data/dms/config/dovecot/`, local file mount `/etc/dovecot/conf.d/10-plugin.conf` replaced with `docker-data/dms/config/dovecot/10-plugin.conf`. Might not be appropriate for the `solr` example, as that is a separate image? (_I added it into `dms/config/dovecot` since it appears Dovecot specific_) - **`faq.md`:** `cron` & `cron/sa-learn` prefixed with `docker-data/dms/` as it looks to be intended as part of the `docker-mailserver` data, although based on other volume mounts, perhaps it should be `docker-data/dms/config/` prefix?. Revised the `user-patches` FAQ content. - **`coding-style.md`, `setup-stack.sh`:** `config/` in shell notifications/warnings changed to `/tmp/docker-mailserver/` which seemed more appropriate. - **`user-patches.md`:** Rephrased some content, retained the `config/` mention (_that was regarding the repo `config/` dir, not the commonly mentioned config volume local directory_). - **`dkim.md`:** Split a single-line into multiple & rephrasing it a little while retaining and clarifying the `setup.sh` default volume mounts local path: `./config/`. - **`spf.md`:** Removed `/<your docker-mailserver dir>/` to be consistent with the rest of config dir `docker-data/dms/config/` usage throughout the docs. - **`environment.md`:** Fixed two docs links were directly referencing the `edge` version docs, instead of properly linking to docs for that version at the bottom of the page.. Concerns: - `faq.md` backup instructions need confirmation that changes are appropriate. - `full-text-search.md` shows two examples mounting different local files to the same internal file, and the entire `config/` dir volume mount with a file within that dir mounted via a separate volume (_as a result of these normalization changes_). I am not 100% sure, but I think unlike with data volumes, it can be an issue if volumes have overlapping internal mapped paths (_at least when bind mounting a directory_). Just mentioning due to potential for volume/config conflicts. - I need confirmation regarding if docs referencing `config/` are equivalent to referencing the internal container path `/tmp/docker-mailserver/` (_even if that `config/` is often referring to the local folder mapping for a volume mount_), and never an internal container `config/` dir? - Some of the Dovecot config examples mount files directly to `/tmp/docker-mailserver` (_or mention the hosts local `config/` folder_), while other examples volume mount files to `/etc/dovecot/conf.d`. I haven't yet scanned through to ensure this is consistent _and_ correct usage here, but it was something I noticed being a bit inconsistent for Dovecot examples (_notably `full-text-search.md` and `imap-folders.md` where I deviated a little to normalize to a consistent pattern_). - One issue I have with the current changes proposed is that it's not clear what files can be considered read-only, as I don't think there's a clear separation of what files are intended to be writeable within the config volume mount? This perhaps can be looked into at a later date.
- 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.
Common terms, sometimes interchangeably used or now invalid depending on context: `mail`, `mail container`, `mail server`, `mail-server`, `mailserver`,`docker-mailserver`, `Docker Mailserver`. These two regex were used to search docs content (_I did not want to risk accidentally missing matches by being too aggressive with broader exclusion sets_): - ``[^/begGhqs]mail[^s\-=./`AbdEgHMqt]`` - `[^\-/v]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`, these changes are handled in 2 separate follow-up commits.
Follow up commit to the previous normalization effort. Kept separate for better separation during review.
2nd follow-up commit. As two changes here revise the areas of text in addition to the normalization, I wanted to minimize diff noise and make it clearer that the surrounding lines are related to the change as a group improvement. Additionally changes `mailserver` hostname in k8s to `mail` to align with other non-k8s examples.
This was mostly flipped in the earlier normalization PR, but I think it should be consistent with other images in examples where the `container_name:` follows the `image:`
Mostly minor revisions or improvements to docs that aren't related to normalization effort. `setup.sh` + `setup` and `setup.sh.md` help output content not fully synced to parity, only for related lines changed in this commit were sync'd.
- `/tmp/ssl` is fine for `SSL_TYPE=manual`, but I wanted to make it more distinct from other usage of `/tmp/ssl`, `*config/ssl`, `/tmp/docker-mailserver/ssl`.. - A renewal script upon review of it's github link resource, shows hard-coded paths, no longer compatible with upcoming v10.2 release. It never supported dual-certificates, and was hard-coded to `/tmp/ssl`. That path may have been useful for `SSL_TYPE=manual` in the past.. Added disclaimer warning. - Clarification added that `SSL_TYPE=manual` supports flexible volume mount paths (source and destination). - `optional-config.md`: Clarify `ssl` folder is only for `SSL_TYPE` values `self-signed` and `custom`. These are legacy hard-coded config dir base paths (filenames are effectively hard-coded too). Both use `TMP_DMS_TLS_PATH` in `setup-stack.sh` for their `ssl` base dir path.
Reference `environment.md` early on the page as it better details the different types in a more terse overview. Likewise, have the `environment.md` entry better link to relevant `SSL_TYPE` config. Clarify that `custom` isn't officially supported and further discourage `self-signed` certificates while encouraging `letsencrypt` and `manual` as preferable choices. Brief addition to `ssl.md` about the dual cert support which was only touched on in `environment.md` (with insufficient indentation to render as a sub-list to `manual`.
`mkdocs.yml` normalizes 'Mailserver' to 'Mail-Server', and 'mail server' to 'mail-server'. Left the 'Docker Mailserver' title alone like the README.
Values chosen for normalizing toSome of the changes might seem a little disagreeable to normalize on. I chose to be a bit more verbose (eg the
Commit OverviewIn addition to the three normalizations below:
Concerns:
Observations:
Normalize
|
wernerfred
left a comment
There was a problem hiding this comment.
LGTM 👍🏻
As always i really appreciate the effort you put into your comments and descriptions. Keep up the good work! 🚀
|
Will review today in the evening (CEST+2). |
|
Documentation preview for this PR is ready! 🎉 Built with commit: 1c3da68 |
georglauterbach
left a comment
There was a problem hiding this comment.
L very GTM 👍🏼
We should from now on keep this level of quality in the docs, especially when reviewing new doc PRs :D
Yeah, while chugging away through this I thought it might be handy to have some common guidelines on jargon, placeholders and such in the contributor docs. I also thought it might be good to test for URLs to the docs (within the docs) as a lint, that seems to be a recurring mistake that even I've been guilty of sometimes :) |
|
As I didn't get any feedback on raised concerns, I realize the verbose wall of text above might have missed these:
@georglauterbach and @wernerfred both reviewed and have K8S experience. If one of you could answer those k8s concerns that'd be appreciated 😀 |
@moqmar can you jump in here? Or tag further contributors/users
My k8s experience is limited regarding running dms so i would rely on @georglauterbach who actually runs dms in k3s |
|
|
@georglauterbach thanks for that. Does the config examples use any filesystem paths for local persistence? If so I'd like to keep it consistent with |
|
@polarathene There is no path in our docs, as volume provisioning is done differently, so no worries. |
Description
Follow up to @williamdes PR: #2159
This PR only applies to the
docs/content/directory (with a few minor exceptions).target/andtest/can be normalized at a later date.To try make review easier on maintainers, I have tried to scope specific normalizations across files to individual commits per normalization applied. It's not perfectly organized but may be preferable than the noise of the full PR diff, since it should be quicker to scan through the changes per commit intent.
I have also covered the most relevant changes in each commits message as an overview. The larger normalization commits have had their messages included below in a comment for convenience/reference.
I have tried to be thorough, cautious and review the changeset multiple times, but I may have made some errors accidentally (this PR took a fair amount of time to prepare, I have probably been looking at it too long!). Some docs where I especially lack configuration knowledge, such as LDAP or K8S may need closer review of changes, see the "Commit Overview" section below for more details.
Follow-up PRs (queued up, dependent upon this PR merging):
ssl.md: letsencrypt section only has partial modifications here. That section has been revised as it seems rather outdated with current upstream projects it references.basic-installation.md: This is an old community contributed guide from the wiki prior to docs migration. Also heavily revised enough to warrant a separate PR, instead of adding unnecessary noise to the focus of this PR.TODO:
mail_crypt.mdchanges from the active encryption PR. File avoided for now to reduce chance of merge conflicts affecting it.Type of change
Checklist:
docs/)