Commit Graph

9 Commits

Author SHA1 Message Date
Nathan Pierce 543bd8b16b
MacOS linting & testing support + docs (#2001) 2021-06-07 14:58:34 +02:00
Georg Lauterbach 9ce719213b
first refactoring fr *.bats according to shellcheck 2020-11-05 19:15:28 +01:00
Georg Lauterbach 3f5c518950
mostly `pwd` replacements and introduction of local keywords 2020-10-19 13:13:42 +02:00
Martin Schulze 40dd3ae985 Implement and use run_until_success_or_timeout 2020-10-17 02:03:11 +02:00
mwnx 42352a3259 Update relayhost_map with virtual accounts too
Previously, only postfix-relaymap.cf and postfix-accounts.cf would be
used to populate the relayhost_map file.

Now, also use postfix-virtual.cf when present. To me, there is nothing
absurd about sending mail "From:" a virtual account (or more
specifically its domain) so it makes sense that when a $RELAY_HOST is
defined it should be used for virtual accounts as well.
2020-08-28 15:03:51 +02:00
mwnx 1286a1266b Fix/refactor relayhost_map update when dynamically adding account
check-for-changes.sh did not have a special case to handle lines in
postfix-relaymap.cf consisting of only a domain (indicating that said
domain should never be relayed). This case is handled by
start-mailserver.sh so when such a line existed, things would work well
until a config file update was detected by check-for-changes.sh. After
that, the generated relayhost_map file would be corrupted.

Fixed by factoring a 'populate_relayhost_map' function out of
start-mailserver.sh and into helper_functions.sh and reusing it in
check-for-changes.sh.

Note: There are certainly quite a few more pieces of code that could be
refactored in a similar fashion.

Note2: check-for-changes.sh would previously never update the
relayhost_map file when $ENABLE_LDAP was set to 1. I don't think this
was intended —there is after all no such condition in
start-mailserver.sh— and so this condition no longer applies.
2020-08-28 15:03:51 +02:00
Martin Schulze 85fa5d242f Fix setup/teardown_file to work in full suite run
The previous mechanism would only run them once for the whole suite
2019-08-17 20:58:33 +02:00
Martin Schulze d8956d3b29 Extract mail_with_postgrey into own test files 2019-08-17 20:58:33 +02:00
Martin Schulze fcddf578d2 Extract mail with relay tests into own file 2019-08-17 20:58:33 +02:00