1
0
mirror of https://github.com/tomav/docker-mailserver.git synced 2024-06-26 09:09:23 +02:00
Commit Graph

715 Commits

Author SHA1 Message Date
Jesse Portnoy
95dfc71b54
Fix typo and broken README link (#3906) 2024-02-25 00:06:58 +01:00
Brennan Kinney
22555347ed
docs: Complete rewrite of PROXY protocol guide (#3882) 2024-02-13 19:42:17 +13:00
Rahil Bhimjiani
51a3915257
docs: fix 404 in mailserver.env and default to RSA 2048 for TLS certs (#3875)
* fix 404: broken MTA-STS link in comment of mailserver.env

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>

* docs: recommend and default to RSA 2048 for ssl certs

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>

---------

Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
2024-02-06 11:56:47 +13:00
Jackson Zheng
2c02671587
Minor spelling correction (#3870) 2024-02-04 11:04:07 +01:00
Georg Lauterbach
db661bf3ac
docs: misc improvements (but mostly related to Rspamd) (#3858)
* remove leftover statement on `/etc/os-release`
* update wording on the PR template
* add section about other services to Rspamd docs
* remove more outdated information from Rspamd docs
* moved links and minor rewording in Rspamd docs

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-02-02 18:38:22 +01:00
Hans-Cees Speel
45935f5fb8
rspamd: add neural module config (#3833)
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-02-01 17:34:33 +01:00
Brennan Kinney
d426f724cd
docs: Complete rewrite of Relay Host pages (#3861)
* docs: Complete rewrite on relay host docs

- Both relay docs pages have had heavy refactor / rewrite.
- ENV docs page relay host section revised.

* docs: Revise relay host page with technical details section

* docs: Add LDAP compatibility caveat for `RELAY_HOST`
2024-01-31 23:11:19 +13:00
Brennan Kinney
5b54d1d32e
refactor: relay.sh (#3845)
* chore: `relay.sh` helper - Reference user config paths via variables

* chore: Better document postfix helper `_vhost_collect_postfix_domains()`

The functionality is effectively the same for the two configs for the most part when it comes to parsing out a domain from the target value.

Virtual aliases is more flexible in value, which may not have a domain-part present (manual user edit).

* chore: `check-for-change.sh` - Support VHOST change visibility

- Moves the "handle changes" logic into it's own scoped function, out of the main change detection loop logic.
- This will be benefit a future commit change that will rely on `VHOST_UPDATED=1`.

* chore: `relay.sh` - Minor revisions to minimize diff noise

- Better phrasing of the current logic comments.
- Regex patterns assigned to variables (easier to grok intention)
- Bulk of the logic for generating `/etc/postfix/relayhost_map` wrapped into a separate function with Postfix config setting handled separately.

* refactor: `relay.sh` opt-out logic

- Split the two distinct features that configure `/etc/postfix/relayhost_map` into separate functions (_`MATCH_VALID` var no longer needed for legacy support_).
- Instead of extracting domains from `postfix-accounts.cf` + `postfix-virtual.cf`, this has already been handled at `/etc/postfix/vhost`, sourcing from there is far less complicated.
- Rename loop var `DOMAIN_PART`to `SENDER_DOMAIN` for better context of what it represents when appended to the config file.
- Revised maintenance notes + guidance towards a future refactor of this relayhost feature support.

* docs: `relay.sh` - Additional comment revisions

* feat: `DEFAULT_RELAY_HOST` can now also use relay credentials ENV

- Remove comment regarding `smtp_sasl_password_maps = static:${RELAY_USER}:${RELAY_PASSWORD}`, it could be used but `main.cf` presently has `644` permissions vs the `sasl_passwd` file permissions of `600`, less secure at preventing leaking of secrets (ignoring the ENV exposure itself).
- Move the `main.cf` settings specific to relayhost credentials support / security into to the relevant function scope instead. This also allows for the configuration to be applied by a change detection event without container restart requirement.
- Outer functions for setup and change detection to call have a clearer config dependency guard, as does the `_legacy_support()`.
- These changes now support `DEFAULT_RELAY_HOST` to leverage the relay credentials ENV as well.
- `DATABASE_RELAYHOSTS` is available in scope to the functions called here that reference it.

* docs: Revised ENV docs on relay host config

Better quality guidance on configuring relay hosts.

* chore: Add entry to `CHANGELOG.md`

* fix: `relay.sh` - `grep` regex compatibility with `+` requires `-E`

* chore: `postfix.sh` - `FIRST_FIELD` => More descriptive field name
2024-01-31 10:24:43 +13:00
Andreas Perhab
dfd5edc000
docs: Add new local dependency (file) for running tests (#3856) 2024-01-30 23:17:58 +13:00
Georg Lauterbach
afb0093939
spam: use Sieve for rewriting subject with Rspamd & SA/Amavis (#3820) 2024-01-29 13:38:01 +01:00
Brennan Kinney
3b11a8305e
docs: Remove ENV ONE_DIR (#3840)
* docs: Better document DMS volumes

* docs: Remove any mention of `ONE_DIR` ENV

* chore: Remove `ONE_DIR` ENV from scripts

Only `ONE_DIR=0` has any effect. As the actual feature is now dependent upon the `/var/mail-state` location existing.

It is advised not mounting anything there instead if wanting to avoid runtime state consolidation.

* docs: Adjust link ref convention

This is more search friendly / organized to find references to all DMS volumes.

* lint: Ensure final newline is present

VSCode by default excludes this if the last line rendered is removed (rendered as a separate blank line).

A separate setting can enforce adding the final newline upon save regardless.
2024-01-29 10:35:19 +13:00
Brennan Kinney
487867285b
docs: UX Improvement - Better distinguish side nav page categories (#3835) 2024-01-26 11:32:18 +01:00
Brennan Kinney
303ca82fb9
docs(fix): New external link icon workaround for mkdocs-material 9.5.5 (#3823)
This is the easiest to maintain workaround now available. Upstream continues to reject the value such a feature for accessibility.
2024-01-26 01:02:19 +13:00
Brennan Kinney
9a53fb0463
docs: Minor revisions to Dovecot Sieve page (#3811)
- The old Dovecot wiki link needed to be updated to the new location.
- The new docs are not entirely compatible AFAIK, thus making the existing examples/docs a bit outdated / incompatible. A warning admonition has been added early on to raise awareness to the reader.
- Minor formatting revisions to the content.
2024-01-24 11:47:32 +13:00
Roy Sindre Norangshol
deb0d2d09a
docs: Guidance for binding outbound SMTP with multiple interfaces available (#3465)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-19 14:58:20 +13:00
Georg Lauterbach
068ceb1d1a
docs: misc improvements (#3773)
* correct misc typos

We also seem to be favoring `behavior` over `behaviour`.

* bump MkDocs version

* resolve errors shown when buildg docs

* improve the Rspamd page

* behaviour -> behavior

Streamline the usage of this word. The majority used behavior, so I
opted to go with this way of spelling it.

* Apply suggestions from code review

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-16 08:38:08 +00:00
Den
ce6ebcc021
docs: Rspamd DKIM config simplify via path setting (#3702)
docs: Rspamd DKIM config (`dkim_signing.conf`) example has been simplified via `path` + `selector` settings.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-15 13:10:03 +13:00
Joerg Sonnenberger
e3331b0f44
feat: Add MTA-STS support for outbound mail (#3592)
* feat: add support for MTA-STS for outgoing mails

* Hook-up mta-sts-daemon into basic process handling test

* fix: Call python script directly

The python3 shebang will run it, which will now meet the expectations of the process testing via pgrep. fail2ban has the same approach.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-13 21:37:20 +13:00
Keval Kapdee
52c4582f7b
feat: Auth - OAuth2 (Dovecot PassDB) (#3480)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-13 09:45:14 +13:00
Brennan Kinney
5e28c17cf4
docs: SpamAssassin ENV docs refactor (#3756)
* chore: Log `SPAMASSASSIN_SPAM_TO_INBOX=1` ENV correctly

ENV name logged was incomplete.

* docs: Update SA related ENV docs

* fix: Log level `warning` should be `warn`

* docs: FAQ - Revise outdated SA entry

* chore: Antispam / Antivirus => Anti-spam / Anti-virus

* docs: ENV - Additional revisions to SA ENV

* docs: ENV - Move `ENABLE_SPAMASSASSIN_KAM`
2024-01-08 03:07:38 +01:00
Brennan Kinney
72517d3f82
docs: Debugging - Delivery failure from service downtime (#3718)
* docs: Debugging - Delivery failure from service downtime

Services may be temporarily down, such as when restarted when certificates are updated due to the `check-for-changes.sh` service. This is another known source of intermittent delivery failures.
2023-12-26 09:53:32 +13:00
Brennan Kinney
5908d9f060
tests(refactor): Dovecot quotas (#3068)
* chore: Extract out Dovecot Quota test cases into new test file

Test cases are just cut + paste, no logic changed there yet.

* chore: Rename test case descriptions

* chore: Use `setup ...` methods instead of direct calls

* chore: Adjust `_run_in_container_bash` to `_run_in_container`

Plus some additional bug fixes in the disabled test case

* tests(refactor): Revise ENV test cases for max mailbox and message sizes

* tests(refactor): Revise ENV test cases for mailbox and message limits v2

Removes the extra variables and filtering in favour of explicit values instead of matching for comparison.

- Easier at a glance to know what is actually expected.
- Additionally reworks the quota limit checks in other test cases. Using a different formatter for `doveadm` is easier to match the desired value (`Limit`).

* chore: Sync improvement from `tests.bats` master

---

NOTE: This PR has been merged to avoid additional maintenance burden without losing the improvements. It was not considered complete, but remaining tasks were not documented in the PR.
2023-12-19 14:33:38 +13:00
Casper
98a4c13ca9
Add ENV ENABLE_IMAP (#3703) 2023-12-18 12:26:28 +01:00
Peter Adam
77917f5cc6
scripts: Install arm64 rspamd from official repository (#3686)
* scripts: Install rspamd from official repository instead of debian backports on arm64 architecture

* Remove unnecessary deb-src repository for rspamd

* Remove note about ARM64 rspamd version, update CHANGELOG.md

---------

Co-authored-by: Peter Adam <p.adam@cygnusnetworks.de>
2023-12-07 23:45:02 +01:00
Brennan Kinney
01689ab788
docs: Troubleshooting - Bare domain misconfiguration (#3680) 2023-12-03 23:22:43 +01:00
Georg Lauterbach
472174b744
ci: add run-local-instance target to Makefile (#3663) 2023-12-04 10:28:40 +13:00
Brennan Kinney
19e96b5131
fix: update-check.sh should query GH Releases (#3666)
* fix: Source `VERSION` from image ENV

Now CI builds triggered from tagged releases will always have the correct version. No need for manually updating a separate file.

* fix: Query latest GH release tag

Compare to the remote GH release tag published, rather than contents of a `VERSION` file.

`VERSION` file remains in source for now as prior releases still rely on it for an update notification.

* chore: Switch from `yq` to `jaq`

- Can more easily express a string subslice.
- Lighter weight: 9.3M vs 1.7M.
- Drawback, no YAML input/output support.

If `yq` is preferred, the `v` prefix could be removed via BASH easily enough.

* chore: Add entry to `CHANGELOG.md`

* ci: `VERSION` has no relevance to `:edge`

* docs: Update build guide + simplify `make build`

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2023-11-30 10:21:26 +13:00
Georg Lauterbach
a11951e398
hotfix: solve #3665 (#3669)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-28 10:33:29 +01:00
Jean-Kevin KPADEY
cedd360ebd
docs: add a new example explaining how to integrate crowdsec with (#3651) 2023-11-25 11:02:42 +01:00
Brennan Kinney
7d1fcb75d7
docs: Debugging - Correctly starting DMS (#3654) 2023-11-25 10:57:34 +01:00
Brennan Kinney
2a716cf4a4
docs: Dovecot Sieve - Adjust to new path for user home folder (#3650) 2023-11-23 10:47:11 +01:00
Brennan Kinney
020542a66c
docs: Debugging - Add macOS suggestion to use gRPC FUSE file sharing implementation (#3652) 2023-11-23 14:05:51 +13:00
Georg Lauterbach
d8ebf591f9
docs: correct path for logs (#3640) 2023-11-15 10:34:56 +13:00
Georg Lauterbach
26214491ef
fix: Drop special bits from Postfix maildrop/ and public/ directory permissions (#3625)
* update K8s deployment

Because `allowPrivilegeEscalation` controls SUID/SGID, we require it
when postdrop is invoked.

* correct permissions for maildrop/public

The reason our permissions previously worked out as that in setups where
SUID/SGID worked, the binaries used to place files in these directories
already have SGID set; the current set of permissions makes less sense
(as explained in this comment:
https://github.com/docker-mailserver/docker-mailserver/issues/3619#issuecomment-1793816412)

Since the binaries used to place files inside these directories alredy
have SUID/SGID set, we do not require these bits (or the sticky bit) to
be set on the directories.

* Apply suggestions from code review

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-10 19:57:17 +01:00
Joerg Sonnenberger
0703e01492
docs: Clarify default for ENV FETCHMAIL_PARALLEL (#3603)
- Make this easier to find when browsing the example environment file.
- Adjust ENV documentation to properly mark the actual default value.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-10 13:03:21 +13:00
Zepmann
290355cf5a
docs: Add Dovecot Lua auth guide + required package (#3579)
* Dovecot: add deb package dovecot-lua to support Lua scripting
* Adding documentation for Lua authentication
* Updated documentation and made a better distinction between Dovecot packages for officially supported features and for community supported features.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-09 10:18:17 +13:00
Joerg Sonnenberger
460f2d5be5
docs: correct Rspamd directory name (#3629) 2023-11-08 17:57:16 +01:00
Georg Lauterbach
8c0777b669
docs: improve docs about how to work with logs (#3626)
* improvide docs about how to work with logs

Most importantly,

1. I added information on the recently adopted `less` / `nano`
2. I added information about `/var/log/mail/`

* fix typos

* Apply suggestions from code review

* Update docs/content/config/debugging.md

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-08 10:49:36 +01:00
Georg Lauterbach
f674232f71
misc: final Rspamd adjustments for v13 (#3599)
* outsource Rspamd ENVs into explicit helper

This will allow us to uniformly source the helper and get the values
from everywhere consistently. This is more than desirable since we will
be using these values not only for the Rspamd setup, but also for DKIM
management and during change-detection.

* integrate Rspamd into changedetection

We outsource one more function to reside in the helper script for Rspamd
so that we can call this function from the Rspamd setup and from the
changedetection functionality too.

* realize deprecation of old commands file for Rspamd

THIS IS A BREAKING CHANGE!

This change realizes the log message: "Using old file location now
(deprecated) - this will prevent startup in v13.0.0" Startup will now
fail.

* added '--force' option to Rspamd DKIM script

* use new helper to get ENVs for Rspamd in DKIM script

* remove the need for linking directories

This was unnecessary, as explained in
https://github.com/docker-mailserver/docker-mailserver/pull/3597#discussion_r1369413599

* Apply suggestions from code review

review by @polarathene

* apply more review feedback from @polarathene

- <https://github.com/docker-mailserver/docker-mailserver/pull/3599#discussion_r1370885519>
- <https://github.com/docker-mailserver/docker-mailserver/pull/3599#discussion_r1370904201>

* update documentation

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-10-30 10:20:37 +01:00
Andreas Perhab
f6e556e33f
docs: fix path to rspamd.log (#3585) 2023-10-17 10:24:01 +02:00
Brennan Kinney
4a58e2eb83
docs: Revise watchtower page (#3583)
- Better clarify images are only updated to newer image updates to the same tag of the running container(s).
- Slight revisions to existing content.
2023-10-16 15:20:50 +02:00
Georg Lauterbach
894978ddd7
refactor: logrotate setup + rspamd log path + tests log helper fallback path (#3576)
* simplify `_setup_logrotate`

* adjust Rspamd's log file and improve it's management

* add information to docs about Rspamd log

* update log query helper to allow another file location

* bail in case `LOGROTATE_INTERVAL` is invalid

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-10-14 17:14:10 +02:00
Vincent Ducamps
82c38f2426
docs: TLS - Include passthrough=true on implicit ports for Traefik example (#3568) 2023-10-08 11:25:57 +13:00
Brennan Kinney
aae42fae9b
ci(fix): Normalize for .gitattributes + improve eclint coverage (#3566) 2023-10-04 12:53:32 +02:00
Vincent Ducamps
bd96c1161e
feat: Allow changing the Dovecot vmail UID/GID via ENV (#3550)
Some deployment scenarios are not compatible with `5000:5000` static vmail user with `/var/mail`. This feature allows adjusting the defaults to a UID / GID that is compatible.

Signed-off-by: vincent <vincent@ducamps.win>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-10-01 00:20:03 +13:00
jpduyx
8c0cfa0836
docs: Revise update-and-cleanup.md (#3539)
* Update update-and-cleanup.md

spotify dockergc is UNMAINTAINED, they advice to consider using the `docker system prune` command instead.

"This repository has been archived by the owner on Feb 2, 2021. It is now read-only."

https://github.com/spotify/docker-gc

* Revise `update-and-cleanup.md`

Merges the image update + cleanup sections.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-09-19 16:21:33 +12:00
Milas Bowman
20241691b8
docs: Fix IPv6 example for Compose (#3531)
The subnet must be specified as part of `ipam.configs`.

This was unfortunately slightly incorrect due to a mistake in the official Docker docs being propagated, which has since been fixed upstream.

Refer to the official Compose Spec for more details:
 * https://docs.docker.com/compose/compose-file/06-networks/#ipam
2023-09-08 10:35:08 +12:00
Brennan Kinney
ed84dca147
chore: LDAP config improvements (#3522)
* chore: Drop management of `SASLAUTHD_*` ENV

- `variables-stack.sh` does not need to manage all these extra ENV or store them. They're not used anywhere else.
- `saslauthd.sh` is the only consumer of these ENV which are effectively direct key/value mappings, with some defaults provided / inherited.

Instead of trying to conditionally support key/value pairs when ENV is set, we could instead use `sed` to delete lines with empty values.

* chore: Drop fallbacks + update configs to match docs

- Drop deprecated support:
  - `DOVECOT_HOSTS` is an ENV deprecated since v10.
  - Fallback for missing URI scheme introduced for Dovecot and SASLAuthd in v10.
  - Adding error log message when no LDAP URI scheme is detected for the supported ENV (when set).
- Docs updated for ENV to reflect the mandatory requirement. `mailserver.env` partially synced equivalent sections.
- Provided base LDAP configs (for overriding) likewise updated from `domain.com` to `example.com`.
- LDAP test updated for required `ldap://` URI scheme. Common ENV shared across LDAP configs hoisted out of the Postfix group.

* chore: Remove unset lines in generated `saslauthd.conf`
2023-09-02 22:07:02 +12:00
René Plötz
3d5f6aeec4
docs: Add documentation for iOS mail push support (#3513)
* Add documentation for iOS mail push support

---------

Signed-off-by: René Plötz <reneploetz@users.noreply.github.com>
2023-08-30 09:40:54 +12:00
Brennan Kinney
9446fa9b9a
chore: Adapt ENABLE_LDAP=1 to ACCOUNT_PROVISIONER=LDAP (#3507)
- Deprecation startup script check is kept for `ENABLE_LDAP=1` but adjusted to emit an error instead. It can be dropped in a future release. Just a precaution for those who mistakenly update (_possibly via automation_) without checking the release notes, an error log is somewhat helpful, although it could alternatively panic?
- Docs updated to remove the `ENABLE_LDAP=1` usage
- ENV docs updated to reference a maintained LDAP image.
- Changelog includes the breaking change, and slight revision to prior release mention of deprecation.
2023-08-29 10:19:03 +12:00