Commit graph

283 commits

Author SHA1 Message Date
Bojan Čekrlić 1268bb0bf7 Update: Add LICENSE and README.md to the helm chart
This commit will push the `LICENSE` and `README.md` to the helm
chart.
2020-11-18 12:02:30 +01:00
Bojan Čekrlić f2f1d34612 Fix: Fix deployment workflow for tags 2020-11-18 11:28:47 +01:00
Bojan Čekrlić 8cc2f60ca0 Update: Add Helm chart metadata 2020-11-18 11:11:01 +01:00
Bojan Čekrlić 7d2188114b Disable xoauth2 integration testst
While these tests are neccessary, they cannot be completed
immutably. They rely in access and refresh token from Google
and these expire -- we would need to devise a smart way of
getting them every time before the tests are run.
2020-11-07 08:57:58 +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ć 4ba3145635 Fix workflows 2020-11-03 12:48:44 +01:00
Bojan Čekrlić bab7880846 Rename file to align with other test scripts 2020-11-03 12:23:31 +01:00
Bojan Čekrlić 1fa1191153 Remove deprecated options 2020-11-03 12:21:08 +01:00
Bojan Čekrlić b9a9fa55d7 Execute HELM chart tests on commit 2020-11-03 12:15:16 +01:00
Bojan Čekrlić 6c6a587346 Update: Run tests on commits 2020-11-03 12:11:50 +01:00
Bojan Čekrlić ab725f5c40 Fix for #40: Add healthcheck to Dockerfile
`HEALTHCHECK` instruction has been added to `Dockerfile`. This should
allow `docker-compose` installations to monitor and restart the
container if neccessary.

Kubernetes deployment healthcheck has been tweaked a bit to better
validate that the server is actually running.
2020-11-03 11:58:10 +01:00
Bojan Čekrlić fdcab589d8 Updated documentation for Helm
Added info on how to deploy `docker-postfix` with Helm.
2020-10-25 19:11:58 +01:00
Bojan Čekrlić b8b40fdc69 Try to fix gh-pages deployment 2020-10-25 18:37:17 +01:00
Bojan Čekrlić 014c8f1dbe Add automatic release generator 2020-10-25 18:30:20 +01:00
Bojan Čekrlić cc0966c6de First comit of auto-deployment of helm charts 2020-10-25 18:22:30 +01:00
Bojan Čekrlić 7f0ab1e24f Setup for automatic deployment to gh-pages 2020-10-25 18:02:00 +01:00
Bojan Čekrlić 6bae2c20ba Rename chart and fix minor issues 2020-10-25 17:43:58 +01:00
Bojan Čekrlić cf22956bf7 Add info on using the Postfix with Amazon's SES 2020-10-24 21:44:15 +02:00
Bojan Čekrlić 411cc47c96 Updated documentation 2020-10-24 21:27:00 +02:00
Bojan Čekrlić 7fbed47e82 Initial commit of the helm chart
This is the initial commit of the helm chart.

TO-DO:

* write usage documentation
* add job which will automatically add the chart to `gh-pages` on
  creating a new release
2020-10-24 21:26:07 +02:00
Bojan Čekrlić dae0d6e3db Fix documentation
Use preferred symbol for enumerations (i.e.. `*` instead of `-`).
2020-10-24 21:26:05 +02:00
Bojan Čekrlić 7c956fd58a .gitignore to ignore .idea directory 2020-10-24 21:25:33 +02:00
Bojan Čekrlić 6b62ad360e Updated documentation 2020-10-24 21:25:29 +02: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ć bd67c9547c Additional fixes for #39 and #37 2020-10-24 21:24:18 +02:00
Bojan Čekrlić 5f441fb7a2 Fix for #39 - Make sure private keys are readable by OpenDKIM
Private keys generated with `DKIM_AUTOGENERATE` were created with
the root account and as such were not readable by OpenDKIM.

This fix will reown the created files to the `opendkim` user.
2020-10-24 21:24:18 +02:00
Bojan Čekrlić 9a33ade483 Fix for #37
While quite annoying behavour, this is the how `postconf` works.
If you tell it to comment out a command, it will add it to the config
even when the same command exists commented out in the config file.

This commit does a bit of sed and grep magic to find if the comment
already exists and if yes, then it does nothing.
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ć 5aca4e36dc Normalize whitespace
Make sure that all whitespaces are the same -- spaces have been
converted to tabs.
2020-10-24 21:24:18 +02:00
Boky 9124555f2b
Fix hostname variable change in README.md
Apparently, `README.md` still referenced the old `HOSTNAME` variable.

This should fix the issue.
2020-08-20 08:45:29 +02:00
Boky 4031e176be
Fix typo in README.md 2020-08-20 08:43:11 +02:00
Antoine GC aa6d2dcc45
Fix a wrongly named variable in README.md (#32)
Fix wrongly named postfix variable (`POSTFIX_hostname` -> `POSTFIX_myhostname`)
2020-08-20 08:21:53 +02:00
Antoine GC 2b577f3522
Update common-run.sh (#31)
To fix an issue when multiple domains in ALLOWED_SENDER_DOMAINS, DKIM signature only works for one domain
2020-08-20 08:20:41 +02:00
Bojan Čekrlić 3f6d1330bb Simplify configuration
Postfix has an option to run in foreground. Use this feature to
reduce the complexity of supervisord.conf.
2020-08-15 23:52:22 +02:00
Bojan Čekrlić 35fa2d7acf Fix for #30 - Use sleep inifinity instead of sleep <number>
Apparently using sleep with very large numbers is not a good idea
when your image can be compiled down to 32-bit platforms.

This fix uses `sleep infinity` and -- failing that -- tries to
sleep for about 68 years (which is exactly 2^15 seconds).
2020-08-15 22:47:49 +02:00
Boky 4d12408b5d
Update README.md 2020-07-29 11:36:48 +02:00
Boky bf9b001b06
Add license scan report and status (#28)
Signed off by: fossabot <badges@fossa.com>

Co-authored-by: fossabot <badges@fossa.io>
2020-07-29 11:36:03 +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
Boky ed09d86c8d
Update documentation on port 25 blocking
Expand the `README.md` a bit to better explain what's needed to get the server up and running.

It seems that a lot of users are trying to use this image and running into issues. This should help out a bit to get them started.
2020-03-16 08:34:21 +01:00
Bojan Čekrlić 8a9002566f Remove build for linux/s390x 2020-01-31 21:18:02 +01:00
Bojan Čekrlić 1caf4104ba Move from Docker Hub builds to GitHub Actions
This allows us to create do a multi-arch build, resulting in
an image which is useful even on low-end IoT devices.
2020-01-31 21:07:42 +01:00
Matthew Critchlow 0feeccbfc3
Support alpine versions (#20)
* Support multiple alpine versions in Dockerfile

Add an ARG to the Dockerfile to support passing in build-args when
running docker build to support different alpine base image versions.

* Create push.sh script for managing image updates

The push.sh script supports passing multiple alpine tags which will then
be built, tagged, and pushed to docker hub
2020-01-31 21:01:29 +01:00
Boky 0f4bd837d0
Additional documentation about ALLOW_EMPTY_SENDER_DOMAINS
Updated `README.md` to make it more clear how to use `ALLOW_EMPTY_SENDER_DOMAINS`.
2019-10-20 18:38:31 +02:00
Andrés Álvarez 8fda5d9004 Decouple commons.sh from run.sh (#18)
Use case is being able to reuse the common methods when extending the image so that the behavior is consistent (e.g: same formatting for log messages) without needing to repeat the code while extending.
2019-10-20 18:34:27 +02:00
Andrés Álvarez 074125ffe1 Allow setting empty ALLOWED_SENDER_DOMAINS (#17)
This PR allows setting an empty `ALLOWED_SENDER_DOMAINS` variable. The default behaviour remains the same (empty `ALLOWED_SENDER_DOMAINS` will throw an error), but it is posible to override this behaviour via a new variable `ALLOW_EMPTY_SENDER_DOMAINS`.
2019-10-20 18:33:08 +02:00
Bojan Čekrlić f4448d6d9e Rename HEADER_CHECKS to SMTP_HEADER_CHECKS 2019-10-03 09:32:39 +02:00
malware-watch a9a09b0085 Added HEADER_CHECKS configuration option (#15)
* Added HEADER_CHECKS  configuration option
2019-10-03 09:01:53 +02:00