Commit graph

15 commits

Author SHA1 Message Date
Bojan Čekrlić 7ad03edccf Fix: Quote "no" so that it doesn't get interpreted as something else 2023-10-27 18:08:45 +02:00
Bojan Čekrlić e8c6cd5332 Fix: Make sure to use the proper name for pluginviewer based on distro
Debian/Ubuntu use 'saslpluginviewer`, so we should check for that.
2023-10-27 18:04:36 +02:00
Bojan Čekrlić 0ff0e80707 Fix: Fix for #146. 2023-10-27 17:44:20 +02:00
Bojan Čekrlić 3385de7fca Upd: Fix integration tests with the latest refactor 2022-04-13 10:16:42 +02:00
Bojan Čekrlić c7c56d3ff1 Upd: Add new integration and unit tests
Test a few more functionalities in the image. Change how postfix
message IDs are detected. Message ID can be set by the client and
hence detecting them via regex is not the best way to go around it.

This fix will actually look at the log line and try to determine
if we're looking at the message ID or not.
2022-04-10 17:52:12 +02:00
Bojan Čekrlić 571b794794 Fix integration tests after refactoring of scripts 2021-12-07 13:53:43 +01:00
Bojan Čekrlić a695d05a7b Fix: Depricate RELAYHOST_TLS_LEVEL with Postfix equivivalent 2021-05-31 09:01:53 +02:00
Bojan Čekrlić 9f66388199 Temporary disable XOAuth integration tests (again). 2020-11-30 11:13:37 +01:00
Ivan Martinez-Ortiz 16771d45eb
Add XOAuth2 support for GMail (#42)
* Add XOAuth2 support for GMail

* Attempt to support integration tests
2020-11-06 10:52:17 +01:00
Bojan Čekrlić 51173d36e0 Fix for #38
The postfix configuration was a bit too permissive with `mynetworks`.

This commit:
- adds `reject` at the end of `*restrictions` list
- adds tests for this feature
2020-10-24 21:24:18 +02:00
Bojan Čekrlić 1569848df0 Updated tester tool to use the tool-downloader 2020-10-24 21:24:18 +02:00
Bojan Čekrlić cfd1a13676 Deprecate some common properties and add auto-generation of DKIM keys 2020-07-03 07:08:27 +02:00
Bojan Čekrlić c460941b90 Fix for #24 + some new integration tests 2020-07-01 14:12:04 +02:00
Bojan Čekrlić ff2d080279 Add the option to log to rsyslog as plain or JSON and restructure tests
- It's now possible to choose the logging type - either 'plain' or
  'json'
- The code is ready to support multiple integration tests (with
  different configurations)
- `OPENDKIM_` and `POSTFIX_` variables are handled properly and recorded
  in the corresponding files. (This had a downfall that `bash` now needs
  to be installed, so we can probably simplify some of the shell
  scripts.)
2020-07-01 13:50:08 +02:00
Bojan Čekrlić 9b1902c047 Larger refactoring of the codebase + DKIM_SELECTOR
Summary
^^^^^^^

This commit refactors the code base to be more manageble and
prepares the groundwork for tests.

Refactoring
^^^^^^^^^^^

Files are now moved to subdirectories, all for the sole purpose of
easier management. Tests live in their own folders, as well as configs
and other files.

Test framework
^^^^^^^^^^^^^^

Two new important scripts/directories are available:
- `unit-tests.sh` / `/unit-test` which executes unit tests across shell
  scripts, and
- `integration-test.sh` / `integration-tests`, which spins up the
  container and tries to send the email.

Both tests use the [BATS](https://github.com/sstephenson/bats) framework
for testing. To create a new test, simply drop a `.bats` file into a
corresponding directory.

Functions have been extracted into `common-run.sh`, to be able to test
them independently.

DKIM_SELECTOR
^^^^^^^^^^^^^

It is now possible to specify a DKIM selector to use (instead of
the default "mail"). See `README.md` for more details.

JSON logging
^^^^^^^^^^^^

WIP: rsyslog will now output JSON logs. This is especially important
if you plan on deploying the image into Kubernetes, as [Prometheus](https://prometheus.io/)
can handle logs in JSON much easier.

TODO: Make this an optional feature, to not confuse existing users.
2020-06-29 19:03:24 +02:00