docker-mailserver/test/config
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
..
dovecot-lmtp tests(refactor): mail_lmtp_ip.bats (#3004) 2023-01-15 18:33:31 +13:00
dovecot-sieve tests: Extract some test cases out from tests.bats (#2980) 2023-01-07 11:36:20 +13:00
duplicate_config_test Fix linter issue 2020-10-20 15:02:31 +02:00
opendkim formatting files according to standard (#1619) 2020-09-24 14:54:21 +02:00
override-configs tests: Extract some test cases out from tests.bats (#2980) 2023-01-07 11:36:20 +13:00
relay-hosts Update relayhost_map with virtual accounts too 2020-08-28 15:03:51 +02:00
smtp-delivery tests: Extract some test cases out from tests.bats (#2980) 2023-01-07 11:36:20 +13:00
templates build: cleaned up Makefile (#2833) 2022-10-17 08:08:04 +13:00
user-patches Remove unusual space from shebang line (#2834) 2022-10-17 10:40:09 +02:00
without-accounts Reinstane required (empty) folder 2020-10-18 02:25:03 +02:00
amavis.cf Allow user to provide Amavis configuration (#299) 2016-09-02 09:08:41 +02:00
fail2ban-fail2ban.cf Add ability to override fail2ban.conf with fail2ban.local values. (#769) 2017-12-07 19:27:31 +01:00
fail2ban-jail.cf firewall: replace iptables with nftables (#2505) 2022-04-05 15:13:59 +02:00
fetchmail.cf Solve Fetchmail imap idle issue (#10) 2021-01-17 10:39:09 +01:00
ldap-aliases.cf Added support for Dovecot and Postfix LDAP TLS (#800) 2018-01-25 22:38:41 +01:00
ldap-groups.cf Added support for Dovecot and Postfix LDAP TLS (#800) 2018-01-25 22:38:41 +01:00
ldap-users.cf Added support for Dovecot and Postfix LDAP TLS (#800) 2018-01-25 22:38:41 +01:00
postfix-regexp.cf support comments in .cf files 2020-05-06 22:59:55 +02:00
postfix-virtual.cf support comments in .cf files 2020-05-06 22:59:55 +02:00
whitelist_clients.local Include whitelist_clients.local in postgrey setup from config folder (#564) 2017-04-12 17:59:04 +02:00
whitelist_recipients Support for additional postgrey options (Close: #998, #999, #1046) 2018-11-01 19:32:36 +01:00