docker-mailserver/target
Brennan Kinney 133eb9bc2e
tests(refactor): `mail_lmtp_ip.bats` (#3004)
* chore: Drop ENV `ENABLE_POSTFIX_VIRTUAL_TRANSPORT`

* tests(chore): Remove redundant `dovecot-lmtp` config

None of this is needed. Only relevant change is changing the LMTP service listener for Dovecot and that can be delegated to `user-patches.sh`.

* tests(refactor): Use `user-patches.sh` instead of replacing config file

The only relevant changes in `test/config/dovecot-lmtp` regarding LMTP was:
- `/etc/dovecot/dovecot.conf` (`protocols = imap lmtp`) and `/etc/dovecot/protocols.d/` (`protocols = $protocols lmtp`).
- `conf.d/10-master.conf` only changed the LMTP service listener from a unix socket to TCP on port 24 (_this was the only change required for the test to pass_).

None of those configs are required as:
- `protocols = imap pop3 lmtp` [is the upstream default](https://doc.dovecot.org/settings/core/#core_setting-protocols), no need to add `lmtp`.
- The LMTP service listener is now configured for the test with `user-patches.sh`.

* tests(refactor): `mail_lmtp_ip.bats`

- Converted to new testing conventions and common container helpers.
- `ENABLE_POSTFIX_VIRTUAL_TRANSPORT` was not relevant, dropped.
- Revised test cases, logic remains the same.
- Large custom config used was not documented and doesn't appear to serve any purpose. Simplified by replacing with a single modification with `user-patches.sh`.
- Added some additional comments for context of test and improvements that could be made.

* tests(chore): Adjust comments

The comment from `mail_hostname` provides no valid context, it was likely copied over from `tests.bats` in Oct 2020 by accident.

The email sent is just for testing, nothing relevant to LMTP.

---

Added additional comment for test to reference extra information from.

* tests(chore): Update similar log line matching

Extracts out the match pattern and formatting commands into separate vars (reduces horizontal scrolling), and includes extra docs about what the matched line should be expected to look like.
2023-01-15 18:33:31 +13:00
..
amavis/conf.d Improve fail2ban docs and fix a typo (#2126) 2021-08-13 10:30:39 +02:00
bin fix: Workaround `postconf` write settling logic (#2998) 2023-01-13 10:10:58 +13:00
docker-configomat@4155504854 Updated submodule target/docker-configomat 2020-10-11 19:41:53 +02:00
dovecot feat: Support for Dovecot master accounts (#2535) 2022-05-08 00:28:32 +02:00
fail2ban Fix several typos (#2990) 2023-01-10 14:13:50 +01:00
fetchmail Implement fetchmail (#260) (#271) 2016-08-21 22:13:13 +02:00
logwatch Add logwatch maillog.conf file to support /var/log/mail/ (#2112) 2021-08-11 11:31:00 +02:00
opendkim Fixed KeyTable refile in opendkim.conf https://serverfault.com/a/861701/377751 (#2249) 2021-10-16 19:04:51 +02:00
opendmarc fix: Change the default OpenDMARC policy to reject (#2933) 2022-12-19 08:54:38 +13:00
postfix chore: Drop support for deprecated TLS versions (#2945) 2022-12-24 02:30:43 +13:00
postgrey housekeeping 2020-11-06 14:04:23 +01:00
postsrsd formatting files according to standard (#1619) 2020-09-24 14:54:21 +02:00
rspamd/local.d feature: provide initial Rspamd support (#2902) 2023-01-05 08:39:00 +01:00
scripts tests(refactor): `mail_lmtp_ip.bats` (#3004) 2023-01-15 18:33:31 +13:00
shared init tests cases ffdhe4096 2020-04-26 22:23:51 +02:00
supervisor feature: provide initial Rspamd support (#2902) 2023-01-05 08:39:00 +01:00