Commit graph

2049 commits

Author SHA1 Message Date
Georg Lauterbach ae6f41e303
Merge pull request #1601 from aendeavor/master
- outsourced badges-links in `README.md` to clean this section up
- refactored `.travis.yml` with Prettier and added **shellcheck capabilities**
- refactored Makefile to make it verbose where it should be and added a **shellcheck target**
- refactored all scripts in `target/` (except `start-mailserver.sh`)
- added **coding style guidelines** to `CONTRIBUTING.md` so everyone can and must adhere to consistent guidelines
- `start-mailserver.sh` had to be touched due to renaming of functions
- added a table of contents to Markdown documents
2020-09-09 18:31:42 +02:00
Georg Lauterbach 77520bf96f
adjusted coding style guidelines; added table of contents 2020-09-09 17:19:48 +02:00
Georg Lauterbach 523a0e25a9
fixing #1563 2020-09-09 11:19:57 +02:00
Georg Lauterbach 34e8a76300
using exact shellcheck location now for correct version (not using Travis')
using
2020-09-08 20:22:27 +02:00
Georg Lauterbach 4096c782cf
had to uninstall shellcheck with apt to get fixed version 0.7.1 2020-09-08 20:18:43 +02:00
Georg Lauterbach 286b53c9d5
corrected cp shellcheck path due to version change 2020-09-08 19:54:16 +02:00
Georg Lauterbach 323303431a
fixed shellcheck version 2020-09-08 19:49:19 +02:00
Georg Lauterbach f7ca406ec9
fixing #1602; variable-brace-policy changed; 2020-09-06 12:27:40 +02:00
Georg Lauterbach 67e1e586c7
coherent renaming of functions 2020-09-05 16:53:36 +02:00
Georg Lauterbach bf679a5504
changes from tomav#1599 without start-mailserver.sh
included all changes from the work on refactoring all scripts, but excluded one big script to make merging easier; replaced mapfile with read
2020-09-05 16:19:12 +02:00
Erik Wramner 14aa0cdcc3
Merge pull request #1596 from mwnx/relayhostmap-from-virtual
Populate relayhost_map from virtual accounts (and other fixes)
2020-09-05 14:01:11 +02:00
Georg Lauterbach 06f0b087c1
major refactoring for setup.sh (#1590) (#1595)
* major refactoring for setup.sh (#1590)

* `set -u` stopped dkim generation from defaulting

* changed to bash and implemented simple error logging

* fixed $VOLUME not being set and refactored README as well due to markdownlint showing (valid) complaints

* setup.sh more consistent with braces, return codes, un-setting of variables and error reports and (importantly) test
2020-09-04 08:42:12 +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
mwnx 2a70f33a4b Fix checksum race condition in check-for-changes.sh
If a change to one of the tracked files happened soon after (<1 second?)
a previously detected change, it could end up going undetected. In
particular, this could cause integration tests to fail (see next
commits).

Fixed by computing the new checksum file _before_ checking for changes.
2020-08-28 14:57:43 +02:00
Erik Wramner 6dce6c6cf7 Changed stable to latest for Traefik as the code has not been merged into stable yet 2020-08-07 09:54:31 +02:00
Erik Wramner f225e14a21
Merge pull request #1576 from vivacarvajalito/master
Add SASLAUTHD_LDAP_FILTER to ldap example
2020-07-24 09:13:49 +02:00
vivacarvajalito 9902baec73
Add SASLAUTHD_LDAP_FILTER to ldap example
Added as an example SASLAUTHD_LDAP_FILTER
2020-07-23 02:14:54 -03:00
Erik Wramner 26cc0c49ca
Merge pull request #1573 from casperklein/patch-2
addalias: check if two arguments are given
2020-07-22 16:13:51 +02:00
Erik Wramner cc34be2684
Merge pull request #1574 from martinwepner/fix/traefik-acme-parser
fix: extractCertsFromAcmeJson fails if "sans" not in Certificates.domain.main
2020-07-21 08:44:26 +02:00
Martin Wepner 821d88e93a add break; remove empty print 2020-07-20 11:28:23 +02:00
Martin Wepner 6bd1fb568e fix: extractCertsFromAcmeJson fails if "sans" not in Certificates.domain.main 2020-07-19 23:57:16 +02:00
Casper 398b1dd554
Merge pull request #2 from casperklein/patch-1
Small change to error message
2020-07-19 21:33:41 +02:00
Casper 2ffb0de1db
Small change to error message 2020-07-19 21:33:06 +02:00
Casper 79f6c88653
Merge pull request #1 from casperklein/patch-3
More detailed error message
2020-07-19 21:26:36 +02:00
Casper 11ab4a84a9
More detailed error message 2020-07-19 21:23:59 +02:00
Casper 7c0998f7fa
Check if second argument is given 2020-07-19 21:21:01 +02:00
Michael 6f04051ffd traefik v2 section added 2020-07-16 21:12:50 +02:00
Erik Wramner f206ad7ee1
Merge pull request #1553 from MichaelSp/letsencrypt-traefik-acme-json
Letsencrypt traefik v2 acme json
2020-07-16 07:49:04 +02:00
Erik Wramner c708e019ed
Merge pull request #1570 from guardiande/fix-sasl-password
Fix sasl_password generation to allow passwords containing hashes
2020-07-16 07:48:22 +02:00
guardiande 5c5c8eb814
Revert dummy change 2020-07-15 09:39:59 +02:00
Michael Sprauer ffac79bc8e Trigger 2020-07-15 09:23:34 +02:00
guardiande 7189d4c63f
Dummy change to trigger travis 2020-07-15 09:12:14 +02:00
Trangar c6f1af4fff Added information about stealth blocks on port 25 2020-07-15 08:32:38 +02:00
guardiande 76d3f7643a
Fix sasl_password generation to allow passwords containing hashes 2020-07-15 08:26:25 +02:00
Michael Sprauer 119dbd664c revert nonsens changes 2020-07-14 15:23:36 +02:00
Michael Sprauer d61a8cd9c0 letsencrypt & traefik wildcard support
set SSL_DOMAIN=*.example.com to extract a wildcard certificate from traefiks acme.json store
2020-07-13 22:58:17 +02:00
Erik Wramner 1a085d411a
Merge pull request #1557 from ubenmackin/master
Update dovecot-ldap.conf.ext
2020-07-13 08:01:12 +02:00
Ben 96f923b0c2
Update env-mailserver.dist
add environment variable for DOVECOT_AUTH_BIND
2020-07-12 10:37:40 -07:00
Michael Sprauer 3a3cec6a8f trigger reload if cert change
/etc/letsencrypt/live/$HOSTNAME/key.pem  and /etc/letsencrypt/live/$HOSTNAME/fullchain.pem are watched and will trigger a reload if changed
2020-07-07 21:26:53 +02:00
idaadi 68e9e5dd36 mailto was missing from the forensics receiver (ruf) 2020-07-07 00:58:25 +02:00
Ben 2ee280dcb3
Update dovecot-ldap.conf.ext
add auth_bind = no so that it can be overridden via the env-mailserver file used by docker compose. This is related to #1526
2020-07-04 11:50:25 -07:00
Michael Sprauer 32c732e276 certificates from acme.json
Will extract certificates from acme.json as written by traefik for usage in dovecot and postfix.
Also watches acme.json for changes. For this to work the file has to be mounted/present at `/etc/letsencrypt/acme.json`
2020-06-30 22:43:22 +02:00
Michael Sprauer 989f691281 fix tests with space in path 2020-06-30 22:34:26 +02:00
Erik Wramner df4e04f033
Merge pull request #1547 from MrFreezeex/master
Fix dovecot variable with whitespace
2020-06-28 11:02:58 +02:00
Erik Wramner 7c55723609
Merge pull request #1551 from GiovanH/typo
Fix typo
2020-06-28 10:53:32 +02:00
Gio d888dbcf7f Fix typo 2020-06-27 23:07:17 -05:00
Arthur Outhenin-Chalandre c7f9fbd439
Fix dovecot variable with whitespace
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
2020-06-27 11:17:25 +02:00
Amin Vakil 78af9f97a2 Change postfix-aliases.cf to postfix-virtual.cf & add setup.sh alias link 2020-06-21 10:01:01 +04:30
Erik Wramner e150307339
Merge pull request #1537 from casperklein/patch-3
Typo fixed
2020-06-14 20:11:33 +02:00