Commit Graph

2591 Commits

Author SHA1 Message Date
georglauterbach 730f5249bd
Merge branch 'master' into tests/normalizations 2024-01-09 16:02:18 +01:00
georglauterbach 3c55b42f47
rename: `--unchecked` -> `--expect-rejection`
ref: https://github.com/docker-mailserver/docker-mailserver/pull/3747#discussion_r1446059805

I also added a bit more context to the function description and I added
comments inside the function to help better understand what's going on.
2024-01-09 14:20:31 +01:00
georglauterbach 97ff44c533
remove `swaks` from Debian package install list 2024-01-09 14:06:55 +01:00
georglauterbach fb0b8dc1f2
simplify Rspamd tests 2024-01-09 14:06:23 +01:00
georglauterbach 05a9fbc506
remove superflous Rspamd email "templates" 2024-01-09 14:03:32 +01:00
Georg Lauterbach 46702bf98a
Apply suggestions from code review
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-09 14:03:15 +01:00
dependabot[bot] 8d8936dfac
chore(deps): Bump anchore/scan-action from 3.3.8 to 3.4.0 (#3761)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 17:40:50 +00:00
dependabot[bot] ac25fb495b
chore(deps): Bump docker/metadata-action from 5.4.0 to 5.5.0 (#3762)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 18:39:28 +01: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
github-actions[bot] 8e20173200
docs: updated `CONTRIBUTORS.md` (#3757)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-08 09:40:01 +13:00
Brennan Kinney 6d666512c1
ci: `.gitattributes` - Ensure `eol=lf` for shell scripts (#3755)
* ci: `.gitattributes` - Ensure `eol=lf` for shell scripts

- These files should always use LF for line endings during a checkout.
- `Dockerfile` does not like building with HereDoc `RUN` scripts that expect LF.
2024-01-08 09:34:24 +13:00
georglauterbach f67362ed74
improve handling of mail IDs
We now use the swaks transaction to grep for the QUEUE id (if possible)
and apply more robust matching this way.
2024-01-07 00:40:28 +01:00
georglauterbach 424f6d3af8
improve helper for sending
Now, the print the `swaks` output (transaction) (required for the next
commit) and they share a common helper which greatly eases parsing
arguments & Co.
2024-01-07 00:35:04 +01:00
georglauterbach ab1c72a458
apply PR feedback 2024-01-06 22:15:26 +01:00
georglauterbach d7dd8405d3
install `swaks` from GitHub 2024-01-06 22:14:40 +01:00
georglauterbach e469fbb19d
Merge branch 'master' into tests/normalizations 2024-01-06 21:42:44 +01:00
georglauterbach 198a5e7bca
Revert "Rspamd: add custom symbol scores for SPF, DKIM & DMARC (#3726)"
This reverts commit 71a5a2af28.
2024-01-06 21:42:07 +01:00
Casper 0eb4ac7714
tests: Replace `wc -l` with `grep -c` (#3752) 2024-01-06 17:07:00 +01:00
Brennan Kinney 6082d5f8d0
chore: Disable `smtputf8` support in config directly (#3750)
* chore: Disable `smtputf8` support in config

This was always configured disabled at runtime, better to just set explicitly in `main.cf` unless config diverges when Dovecot is enabled to opt-out of this feature.
2024-01-05 23:18:30 +01:00
georglauterbach 6284b2099a
add entry to `CHANGELOG.md` 2024-01-05 16:56:15 +01:00
Georg Lauterbach 71a5a2af28
Rspamd: add custom symbol scores for SPF, DKIM & DMARC (#3726) 2024-01-05 16:56:15 +01:00
georglauterbach 1ae235d7a1
correct hostname.bats
Thanks to @polarathene for helping me here!

I also noticed the logic of `_send_email_unchecked` was not 100% sound
when supplying the `--data` argument - this has also been fixed.
2024-01-05 16:56:11 +01:00
Georg Lauterbach 04f4ae4569
Rspamd: add custom symbol scores for SPF, DKIM & DMARC (#3726) 2024-01-05 09:07:31 +01:00
georglauterbach 2125e41a60
remove `existing/*`
These e-mails are mostly trivial in `swaks`, and we do not need extra
files here.
2024-01-04 23:03:24 +01:00
georglauterbach 0b93d61e10
make `.txt` mandatory again for `_nc_wrapper` as well 2024-01-04 23:03:24 +01:00
georglauterbach 31491bc3d1
make `.txt` suffix mandatory again 2024-01-04 23:03:23 +01:00
georglauterbach dd7010b44e
move to `--auth PLAIN` from `--auth LOGIN`
because LOGIN is deprecated (according to swaks documentation).
2024-01-04 23:03:23 +01:00
georglauterbach b91529ae5f
improvements to `_send_email_unchecked`
With `--data`, we do not need to handle STDIN. We do need additional
quoting though, because we expand the array later as a simple string in
`_run_in_container_bash`.

Moreover, the `@` was added because, according to the documentation of
`swaks`, it should be prepended when using file names...
2024-01-04 23:03:11 +01:00
georglauterbach 6e1550b2be
Improve ID handling in tests
The comments in `_send_email_and_get_id` are pretty self-explanatory.
The whole thing has become more robust while it is now capable of
capturing more log lines.
2024-01-04 22:34:59 +01:00
georglauterbach 33b9ab2581
assert success in `_send_email`
I added `_send_email_unchecked` which performs no check so we can still
use the helper for situations where we check for failure, and
`_send_email` is a wrapper for `_send_mail_unchecked` with an additional
`assert_success`.

I also went through the tests and adjusted them where necessary.
2024-01-04 22:28:22 +01:00
Georg Lauterbach 8f391e4d5a
release: v13.2.0 (#3746)
* bump `VERSION` & adjust `CHANGELOG.md`

* chore: Bump the unreleased base compare tag in `CHANGELOG.md`

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-04 22:14:51 +01:00
Georg Lauterbach bf69ef248e
Postfix: add `smtpd_data_restrictions = reject_unauth_pipelining` (#3744)
* add `smtpd_data_restrictions = reject_unauth_pipelining`

* fix: Skip restriction if trusted

* add changelog entry

* revert change to `postfix-amavis.cf`

* Update CHANGELOG.md

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-04 22:13:13 +01:00
Georg Lauterbach 25c7024cc4
security(Postfix): Protect against "SMTP Smuggling" attack (#3727)
View `CHANGELOG.md` entry and PR for details.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-03 14:02:59 +13:00
Georg Lauterbach 9e81517fe3
tests: Use `swaks` instead of `nc` for sending mail (#3732)
See associated `CHANGELOG.md` entry for details.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-03 13:17:54 +13:00
Brennan Kinney 0889b0ff06
fix: `supervisor-app.conf` - Correct the log location for `postgrey` (#3724)
* fix: `supervisor-app.conf` - Correct `postgrey` log location

Looks like this should have been like every other service and reference a log file(s) based on program name in the supervisor log directory.

* tests: Adjust log location for `postgrey_enabled.bats`
2023-12-30 09:59:09 +13:00
Georg Lauterbach 8392e3c1a8
release: v13.1.0 (#3720)
Co-authored-by: Casper <casperklein@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-12-29 13:58:54 +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
Casper 3adb53eb12
Remove sed statement (#3715) 2023-12-20 13:43:32 +13:00
Brennan Kinney 226ec847a4
ci: Remove `VERSION` from `Dockerfile` (#3711)
* ci: Remove `VERSION` from `Dockerfile`

This line was meant to be dropped with the switch to using the `DMS_RELEASE` ENV.
2023-12-19 08:35:16 +00:00
github-actions[bot] 6a56c7e749
docs: update `CONTRIBUTORS.md` (#3704)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-19 06:01:25 +00:00
Brennan Kinney 03052a65b8
ci: Allow lint workflow to be manually triggered (#3714)
* ci: Allow lint workflow to be manually triggered

Without this a different event must occur to trigger the workflow, which is inconvenient for automated PRs.
2023-12-19 18:59:59 +13:00
Brennan Kinney ca2c53dde7
ci: Avoiding linting `CONTRIBUTORS.yml` (#3705)
The file is managed by the `contributors.yml` workflow, no need for linting to be triggered on PRs for that change.

This should ideally skip the required check status for the lint workflow which cannot trigger implicitly for automated PRs. If this doesn't work the change should be reverted.
2023-12-19 14:41:07 +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
dependabot[bot] ee87291225
chore(deps): Bump dawidd6/action-download-artifact from 2 to 3 (#3707) 2023-12-19 01:29:15 +01:00
dependabot[bot] 5015dc80b1
chore(deps): Bump actions/upload-artifact from 3 to 4 (#3708) 2023-12-19 00:16:38 +01:00
dependabot[bot] b9f7ff86de
chore(deps): Bump docker/metadata-action from 5.3.0 to 5.4.0 (#3710)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5.3.0...v5.4.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 15:50:56 +01:00
dependabot[bot] 083e464084
chore(deps): Bump github/codeql-action from 2 to 3 (#3709) 2023-12-18 14:05:37 +01:00
Casper 98a4c13ca9
Add ENV `ENABLE_IMAP` (#3703) 2023-12-18 12:26:28 +01:00
dependabot[bot] bbed3f6608
chore(deps): Bump actions/stale from 8 to 9 (#3696) 2023-12-11 21:36:30 +01:00
René Plötz 2f5dfed726
fix: Only set `virtual_mailbox_maps` to `texthash` when using the `FILE` account provisioner (#3693)
Signed-off-by: René Plötz <reneploetz@users.noreply.github.com>
2023-12-11 10:22:31 +13:00