* 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.
Now, the print the `swaks` output (transaction) (required for the next
commit) and they share a common helper which greatly eases parsing
arguments & Co.
* 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.
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.
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...
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.
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.
* 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`
* 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.
* 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.
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.
* 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.