Commit Graph

448 Commits

Author SHA1 Message Date
Nathan Pierce 543bd8b16b
MacOS linting & testing support + docs (#2001) 2021-06-07 14:58:34 +02:00
Georg Lauterbach abdf681d02
chore(ci): Linting Improved (#2000) 2021-06-01 18:12:17 +02:00
Moritz Marquardt 66bc157c1d
fix!: Allow protocol in SASLAUTHD_LDAP_SERVER & adjust SASLAUTHD_LDAP_ default values (#1989)
* fix: make sure the SASLAUTHD_LDAP_HOST/PROTO logic makes sense and use LDAP_SERVER_HOST as a fallback (#1983)

* chore(docs): document changes to LDAP/SASLAUTHD as of #1983

* fix!: apply default value modifications suggested in #1983

https://github.com/docker-mailserver/docker-mailserver/issues/1983#issuecomment-844848224

* chore(test): Test SASLAUTHD_LDAP_SERVER with protocol and ..._SSL=0, as well as with default bind credentials

Note that there are currently no regression tests for this as there's only one setup_file, so that would require big changes to the testing methodology.

* refactor!: completely remove SASLAUTHD_LDAP_SSL and SASLAUTHD_LDAP_PROTO

Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
2021-05-22 22:52:56 +02:00
Georg Lauterbach 75e74e4a19
introduce F2B v0.11 (#1965) 2021-05-15 11:11:10 +02:00
Georg Lauterbach 04e98dc49f
introduce variable to control Amavis' loglevel (#1947) 2021-05-06 23:51:45 +02:00
Moritz Marquardt 94b5ac49c1
fix!: use dovecot's LDAP uris option instead of hosts (#1901)
* Use dovecot's LDAP uris option instead of hosts (fixes #1510)

* Clean up variables & environment documentation for #1901

Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-04-19 09:02:03 +02:00
Casper f7836c8b1a
Fail2Ban block behaviour (#1914)
* new default: block IP on all ports

* introduce FAIL2BAN_BLOCKTYPE

* fix test

* tests added

* test added

* test blocktype drop

* merged two tests
2021-04-18 12:55:43 +02:00
Moritz Marquardt 271d94a37e
Add LDAP_QUERY_FILTER_SENDERS setting for spoof protection with LDAP (#1902) 2021-04-17 22:40:19 +02:00
Casper dea9bca900
Enhance setup.sh email list (#1898)
* add quota and aliases to output

* shellcheck fixes

* fix test

Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-04-12 15:18:15 +02:00
Casper ba0f9199b7
fail2ban cleanup (#1895) 2021-04-11 15:33:39 +00:00
Georg Lauterbach 0fa5c1ef9d
revamping the notify function (#1836) 2021-02-24 17:28:59 +01:00
Georg Lauterbach c881facbd2
start-mailserver.sh split (#1820)
* splitting start-mailserver.sh

* refactoring part 2

* refactored setup-stack.sh
* stzarted adjusting target/bin/*.sh to use new usage format

* corrected lowercase-uppercase test error

* better handling of .bashrc variable export

* linting tests and fix for default assignements

* last stylistic changes and rebase
2021-02-23 20:03:01 +01:00
Andreas Perhab 9df60f62ce linting: use local scripts to remove sudo need
install linting tools locally to remove the need for
sudo curling scripts and installing them for all users
2021-02-23 14:45:06 +01:00
Brennan Kinney d02ebc922c
Dual certificate support (eg ECDSA with RSA fallback) (#1801)
* feat: Change Postfix smtpd_tls key and cert files to chain_files

Since Postfix 3.4, `smtpd_tls_cert_file` and `smtpd_tls_key_file` have been deprecated in favor of `smtpd_tls_chain_files` which supports a list of values where a single or sequence of file paths provide a private key followed by it's certificate chain.

* feat: Dual certificate support

`smtpd_tls_chain_files` allows for multiple key+cert bundles so that you can provide different key types, such as ECDSA and RSA.

To maintain compatibility with the current CERT/KEY ENV vars only a 2nd certificate is supported.

Since Dovecot 2.2.31 a related feature is also available, but it is limited to only providing one alternative certificate via separate cert and key settings.

---

This feature enables support for multiple certificates, eg for serving modern ECDSA certs with RSA as fallback.

* chore: Refactor variable names to meet style guide

Improved some comments too.

* chore: Have function definitions respect style guide

* chore: Minor edits to comments

* chore: Expand on comments for maintenance, alert of insecure config

When `SSL_TYPE` isn't properly setup, we're still offering SSL connections but not warning in logs about the insecurity of such, or why a misconfiguration may have occurred.

This commit more clearly communicates to the user that they should look into the issue before considering deploying to production.

The `TODO` comments communicate to any future maintainer to consider treating these improper configs as disabling TLS instead.

* fix: Use `snakeoil` cert

I mistakenly thought this was placeholder text, which broke some tests. This adds the two files in the correct order (private key followed by cert/chain), to fix that issue.

* fix: Disable alt cert for Dovecot if necessary

Certain scenarios may persist state of previously configured alt cert via ENV vars that are removed from a future run. If the config is not reset to original immutable state, this will correctly disable the config from using alt cert unintentionally.

* fix: Satisfy ShellCheck lint

By switching from string var to array / list expansion, this better stores the extracted result and applies it in a manner that ShellCheck linting approves, removing the need to disable the rule.

* feat: Support dual cert test

Few tweaks to the test script allows re-purposing it for covering dual cert support as well.

* chore: Rearranged cert and key lines

A little reorganization, mostly placing private key ahead of related cert lines.

* chore: Refactor `_set_certificate`

This should make the parameters a little less confusing.

Previously was 3 parameters, but the Postfix parameter (1st) may look like two variables if you don't pay attention to the surrounding quotes; while the Dovecot parameters (2nd + 3rd) would have an opposing order. There was also a variant where the `FULLKEYCHAIN` var was passed in three times.

Now it's two params, with the 2nd param as an optional one. If the 2nd param is provided, then the two params are in the order of private key then certificate, otherwise if only a single parameter it's a single PEM file with the full cert chain and private key bundled.

This avoids implying that Postfix and Dovecot might use different files.

* chore: Document current state of `SSL_TYPE` logic better

Inlined for the benefit of anyone else maintaining this section if I'm unable to address the concerns within my own time.

* docs: ENV vars

`TLS_LEVEL=old` isn't in the codebase anymore, not likely to be relevant to retain.

No point in documenting what is considered invalid / unsupported config value in the first place for `SSL_TYPE`.

`SSL_TYPE=manual` was missing documentation for both related file path ENV vars, they've been added along with their alt fallback variants.

* chore: Update Dovecot LMTP SSL test config

Not sure how relevant this is, the file isn't complete sync with the main dovecot `10-ssl.conf` config, adding the support just in case.

* chore: Rename `FULLKEYCHAIN` to avoid confusion

There doesn't appear to be a standardized name for this type of file bundle, and `keychain` may be misleading (fullkeychain often provides macOS keychain  results on search engines).

Opting for a more explicit `KEY_WITH_FULLCHAIN` name instead.

* fix: Invalid var name

`_set_certificate` refactor commit accidentally changed a var name and committed that breaking the dual cert support (thanks tests!).

* test: Refactor `mail_ssl_manual.bats`

Proper test return values instead of `wc -l` based checking.

Tests with dual cert support active, tests that feature (to better detect failure case.

Third test case was unable to verify new self-signed certificate, added new certs signed with self-signed root CA.

Adjusted openssl `CApath` parameter to use `CAfile` instead as `letsencrypt` cert was replaced thus CA cert is missing from the system trust store.

* test: Properly check for files in `mail_ssl_manual.bats`

Fixes lint error.

Also realized I was accidentally asserting a file exists in the test environment, not within the container.

Resolved that and also added an additional test case to ensure the ENV var files are valid when passed in, in the event a change misconfigures them and that the issue is identified earlier.

* chore: Apply PR review feedback

Better format some strings that had mixed quotes when they weren't necessary.

Additionally DRYed up the config path for Postfix and Dovecot within the `_setup_ssl` method.

Co-authored-by: Georg Lauterbach <infrastructure@itbsd.com>
2021-02-21 23:43:41 +01:00
Astro a7ecb0ea8b
feat/enable custom dkim selector (#1811)
* let dkim generator accept selector as parameter

* test dkim-generator with selector parameter

* fix: correct name of domain argument in usage

* fix: adapt command to new syntax

* tests: use different quotes

* tests: use different quotes

* tests: remove domains that were never added

* style: change test name

* refactor: dkim setup

* style: remove trailing whitespace

* tests: remove test of removed dummy file

Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
2021-02-21 22:05:35 +01:00
Frederic Werner d182d65377
fix: dkim help message test (#1817) 2021-02-18 22:55:17 +01:00
Georg Lauterbach d221c585c2
inform about proper `setup.sh` usage between versions 2021-02-18 14:01:01 +01:00
Georg Lauterbach f3f38db0f9
adjust test to use new script output from openDKIM 2021-02-18 13:11:45 +01:00
Georg Lauterbach 27f6ad73cf
re-write setup.sh's help message to use the new style (#1814) 2021-02-18 11:09:29 +01:00
Georg Lauterbach 1005bb3b09
Provide complete refactoring of openDKIM script (#1812)
* provide complete refactoring of openDKIM usage and tests

* fix leftover linting errors

* correct defualt key size and README usage

* provide independent order for arguments

* added `config` and adjusted usage information

* fixing shift in setup.sh

* adjust usage information to use new style and rename script

* use updated argument keysize instead of size
2021-02-18 10:29:34 +01:00
Brennan Kinney 432f96b3a6
Use best practice cipher suites for 2021 (#1802)
Update cipherlist to sync with OWASP B and Mozilla Intermediate
2021-02-18 10:24:34 +01:00
Ask Bjørn Hansen 4a3735bced
Support extra user_attributes in accounts configuration (#1792)
This allows you to add for example

    |userdb_mail=mbox:~/mail:INBOX=~/inbox

 to the end of an account to have a different mailbox configuration.
2021-02-07 19:02:09 +01:00
Ask Bjørn Hansen 14eaaa17e1 Remove confusing and unused clear.postfix-accounts.cf test config file 2021-02-06 06:25:29 -08:00
Georg Lauterbach 931eab0541
removing bl.spamcop.net for 8.0.1 2021-01-31 16:05:05 +01:00
Casper 70267d89e5
Replace $_ in error trap (#1776) 2021-01-28 14:50:28 +01:00
Georg Lauterbach cc7138e28f
minor adjustments before release 8.0.0 2021-01-27 18:42:39 +01:00
William Desportes 4616894fbf
Allow manual domains for dkim generator (#1753)
* Allow manual domains for dkim generator

* Document the DKIM manual mode

* Remove unnecessary quotes

* updating default value usage and "" in [[ ]]

* Change parameter expansion

* Add test for manual dkim domains

* Remove obsolete script

* Add manual dkim mode to usage

* Move manual dkim guide into quickstart section

* Cover case that key for domain already exists

* Set default dkim key size to 4096

Co-authored-by: Frederic Werner <20406381+wernerfred@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-01-27 14:09:24 +01:00
Georg Lauterbach 324ee8eb85
Improve logging significantly – color is back! (#1758)
* improve logging significantly
* now defaulting to warn
* final adjustments
* correcting not-escaped $ in sed
2021-01-22 10:03:31 +01:00
Georg Lauterbach 221d4ce187
adjusting links & misc 2021-01-19 09:27:01 +01:00
Georg Lauterbach dba291dc43
Introducing the repository secret (#18)
* fixes #17
* corrections and adjustments
2021-01-18 20:51:56 +01:00
brainkiller 061fe12aa7
Solve Fetchmail imap idle issue (#10)
* Migrate PR#1730 from tomav/docker-mailserver repo to new
docker-mailserver/docker-mailserver repo
* Resolved review comments
* Moved counter increment to have consistency between fetchmail process
and fetchmail config files
* Added tests for new fetchmail option

Co-authored-by: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com>
2021-01-17 10:39:09 +01:00
Georg Lauterbach 189e5376cc
Final Migration Step (#6)
* first migration steps
  * altered issue templates
  * altered README
  * removed .travis.yml
* adjusting registry & repository, Dockerfile and compose.env
* Close stale issues automatically
* Integrated CI with Github Actions (#3)
* feat: integrated ci with github actions
* fix: use secrets for docker org and update image
* docs: clarify why we use -t if no tty exists
* fix: correct remaining references to old repo
chore: prettier automatically updated markdown as well
* fix: hardcode docker org
* change testing image to just testing
* ci: add armv7 as a supported platform
* finished migration steps
* corrected linting in build-push action
* corrected linting in build-push action (2)
* minor preps for PR
* correcting push on pull request and minor details
* adjusted workflows to adhere closer to @wernerfred's diagram
* minor patches
* adjusting Dockerfile's installation of base packages
* adjusting schedule for stale issue action
* reverting license text
* improving CONTRIBUTING.md PR text
* Update CONTRIBUTING.md
* a bigger patch at the end
  * moved all scripts into one directory under target/scripts/
  * moved the quota-warning.sh script into target/scripts/ and removed empty directory /target/dovecot/scripts
  * minor fixes here and there
  * adjusted workflows for use a fully qualified name (i.e. docker.io/...)
  * improved on the Dockerfile layer count
  * corrected local tests - now they (actually) work (fine)!
  * corrected start-mailserver.sh to make use of defaults consistently
  * removed very old, deprecated variables (actually only one)
* various smaller improvements in the end
* last commit before merging #6
* rearranging variables to use alphabetic order

Co-authored-by: casperklein <casperklein@users.noreply.github.com>
Co-authored-by: Nick Pappas <radicand@users.noreply.github.com>
Co-authored-by: William Desportes <williamdes@wdes.fr>
2021-01-16 10:16:05 +01:00
William Desportes 7765d4a6b3
Fix shebangs 2021-01-02 14:49:35 +01:00
Georg Lauterbach 59ba34cb4b
corrected lint.sh 2020-12-22 20:07:08 +01:00
Georg Lauterbach d9e4b89415
Merge pull request #1703 from BrandonSchmitt/acme-fixes
Small fixes for extracting certs from the acme.json file
2020-12-11 12:53:04 +01:00
Georg Lauterbach 31f593eee9
correcting lint.sh to properly use exit instead of return 2020-12-10 10:51:33 +01:00
Brandon Schmitt 6251f898ea
Fix error in python script extracting certs from the acme.json file if there are sections with null values as certs
Signed-off-by: Brandon Schmitt <Brandon.Schmitt@live.de>
2020-12-06 20:30:20 +01:00
Georg Lauterbach 2c65b0c260
use wait_for_smtp function instead of sleep 2020-11-06 14:11:42 +01:00
Georg Lauterbach ed7106b04d
housekeeping 2020-11-06 14:04:23 +01:00
Georg Lauterbach 9ce719213b
first refactoring fr *.bats according to shellcheck 2020-11-05 19:15:28 +01:00
Georg Lauterbach 46998dd816
preparation to include *.bats into shellcheck 2020-11-05 13:47:52 +01:00
Georg Lauterbach 5365e7f0f8
fixes #1677 2020-11-05 11:41:18 +01:00
Martin Schulze 6a9e5c0b62 Fix parallel development error: Use correct filename 2020-10-28 14:39:42 +01:00
Georg Lauterbach f0105f6d47
Merge pull request #1613 from martin-schulze-vireso/feature/extract_even_more_tests 2020-10-28 11:16:15 +01:00
Georg Lauterbach da8171388f
Complete Refactor for `target/bin` (#1654)
* documentation and script updates trying to fix #1647
* preparations for refactoring target/bin/
* complete refactor for target/bin/
* changing script output slightly
* outsourcing functions in `bin-helper.sh`
* re-wrote linting to allow for proper shellcheck -x execution
* show explanation for shellcheck ignore
* adding some more information
2020-10-21 18:16:32 +02:00
Martin Schulze 0015c62303 Fix linter issue 2020-10-20 15:02:31 +02:00
Martin Schulze 5cce70b3a9 Fix timing dependent failures 2020-10-20 14:14:04 +02:00
Martin Schulze 2de5c52b83 Fix nameclash in config names 2020-10-20 12:05:40 +02:00
Martin Schulze 0453240098 Catch errors on config duplication command 2020-10-20 09:33:47 +02:00
Martin Schulze 5884f866d3 Fix duplicate configuration name clashes 2020-10-20 09:33:14 +02:00
Martin Schulze 1ac5245f04 Add missing file 2020-10-20 01:05:01 +02:00
Martin Schulze 7bdac2a910 Add tests for remaining test_helper functions 2020-10-20 00:50:19 +02:00
Martin Schulze 9471ce7346 Fix errors due to trying to send emails too early
when clamav has not fully come up yet
2020-10-19 23:34:39 +02:00
Martin Schulze 7ae4a73d3b Fix tests failing when emails are not yet delivered 2020-10-19 23:33:54 +02:00
Georg Lauterbach b948e01d39
re-trigger
wget through exception in the last test
2020-10-19 15:23:42 +02:00
Georg Lauterbach 3720dbafc0
removed `local VAR=$(...)` assignments 2020-10-19 15:19:34 +02:00
Georg Lauterbach ab1da1e3f3
small changes in common.bash 2020-10-19 14:10:32 +02:00
Georg Lauterbach 3f5c518950
mostly `pwd` replacements and introduction of local keywords 2020-10-19 13:13:42 +02:00
Georg Lauterbach 0d219800ff
replacing all occurences of `private_config` with the uppercase variable 2020-10-19 12:15:44 +02:00
Georg Lauterbach a3acedaf19
fixing NAME 2020-10-19 12:12:13 +02:00
Georg Lauterbach 0da7ee0c1d
{} and uppercase 2020-10-18 15:44:01 +02:00
Martin Schulze 5030e8278c Add tests for test/common.bash 2020-10-18 03:11:10 +02:00
Martin Schulze 7fb13c18cd Reinstane required (empty) folder
this is needed to make test
"checking accounts: user3 should have been added to /tmp/docker-mailserver/postfix-accounts.cf even when that file does not exist"
pass
2020-10-18 02:25:03 +02:00
Martin Schulze 88fbe0dbd3 Fix shellcheck errors on tests.bats 2020-10-18 02:24:26 +02:00
Martin Schulze e2bca5f850 Always use ${} 2020-10-18 02:08:11 +02:00
Martin Schulze f47f85598d Fix trailing slash in path 2020-10-17 23:24:39 +02:00
Martin Schulze 13963747b8 Fix missing newline at the end of file 2020-10-17 23:24:23 +02:00
Martin Schulze 80bfc422a2 Reduce code duplication 2020-10-17 02:04:33 +02:00
Martin Schulze 7530aea9f5 Don't use an extra moint for subdir 2020-10-17 02:04:33 +02:00
Martin Schulze 96b3fd726a Fix wait_for_service not working/hanging 2020-10-17 02:04:33 +02:00
Martin Schulze c6c6fb708c Avoid running tests while the services restart due to changes 2020-10-17 02:04:33 +02:00
Martin Schulze 05deaa3196 Move common functions into common.bash 2020-10-17 02:03:11 +02:00
Martin Schulze 53b930448d Fix shellcheck issues 2020-10-17 02:03:11 +02:00
Martin Schulze 0d4eb08de8 Add missing accounts 2020-10-17 02:03:11 +02:00
Martin Schulze e1d0fcfe01 Improve output in failure cases 2020-10-17 02:03:11 +02:00
Martin Schulze a90e043e45 Fix failing tests due to old paths 2020-10-17 02:03:11 +02:00
Martin Schulze ca3ebc6c40 Improve error messages on problems 2020-10-17 02:03:11 +02:00
Martin Schulze 40dd3ae985 Implement and use run_until_success_or_timeout 2020-10-17 02:03:11 +02:00
Martin Schulze a477040abb Allow for seamless switching between old and new bats versions 2020-10-17 02:03:11 +02:00
Martin Schulze ef80c6b2a3 Add setup/teardown marker tests 2020-10-17 02:03:11 +02:00
Martin Schulze 0eb5bd0db9 Add --fatal-tests for early out in container waits 2020-10-17 02:02:46 +02:00
Martin Schulze 97806859b6 Fix private_config_path creating the wrong folder 2020-10-17 02:02:46 +02:00
Martin Schulze 5fef8a5b78 Give each container their own private config folder 2020-10-17 02:02:46 +02:00
Martin Schulze 190f4961c0 Move mail container creation into tests file 2020-10-17 02:02:46 +02:00
Martin Schulze 9c285db520 Extract mail_override_hostname into own test file 2020-10-17 02:02:46 +02:00
Martin Schulze 06b137e5a8 Extract container mail_smtponly_without_config into test 2020-10-17 02:02:46 +02:00
Martin Schulze ad0be553d8 Extract SRS DOMAINNAME tests/container into own file 2020-10-17 02:02:46 +02:00
Martin Schulze d38ff4c122 Extrract disabled clamav tests into own file 2020-10-17 02:02:46 +02:00
Georg Lauterbach ed6e3ebd30
Outsourced linting tests into its own file (#1636)
* outsourced linting tests into its own file
* trigger rebuild
* added SCRIPT variable to setup.sh
* trigger rebuild again
* major test rewrite
* outsourced `hadolint` too
* rewrote some parts of the linting logic due to a logic bug
* adjusted TravisCI
* corrected .bats test line
* corrected logging in linting tests
* updated `hadolint`
2020-10-04 19:34:15 +02:00
Georg Lauterbach a0791ef457
formatting files according to standard (#1619)
* added EditorConfig linting
* adding `eclint` as Travis script target
* re-adjusted .pem files to have a newline
2020-09-24 14:54:21 +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
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
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
Nicholas Pepper 1b659a5574 Modified letsencrypt support to add domain name checking in addition to
hostname checking.  Added necessary tests and renamed original manual
ssl test to a name that supports adding the other SSL tests.
2020-05-15 04:52:26 +00:00
youtous c65ffb44a1
test postfix inet 2020-05-09 22:42:56 +02:00
youtous d0f7257333
support comments in .cf files 2020-05-06 22:59:55 +02:00
youtous 30262128f4
raise a warning when SPAMASSASSIN_SPAM_TO_INBOX isn't explicitly defined 2020-05-03 10:33:50 +02:00
youtous 15dd63d566
add test case no move to Junk 2020-05-03 10:33:28 +02:00
youtous d829905cf7
init spams to junk 2020-05-03 10:33:28 +02:00
youtous 0c838706d0
Option to disable dovecot quota 2020-05-01 23:42:21 +02:00
youtous d45e6b1c22
#fix 1478 2020-04-30 12:47:12 +02:00
youtous 80bd3a8c85
Update test/mail_dhparams_manual_not_one_dir.bats
Co-Authored-By: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2020-04-27 10:42:47 +02:00
youtous 3e3f5d557b
Update test/mail_dhparams_manual_one_dir.bats
Co-Authored-By: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2020-04-27 10:42:39 +02:00
youtous 27cbdeeb6a
Update test/mail_dhparams_default.bats
Co-Authored-By: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2020-04-27 10:42:24 +02:00
youtous e680c349b1
test wait setup for // containers 2020-04-27 10:28:24 +02:00
youtous 149a10272c
improve dhe tests documentation 2020-04-27 09:57:36 +02:00
youtous dff7355fa9
fix #1459 2020-04-26 23:07:34 +02:00
youtous 4d031f73e3
test dhparams ONE_DIR both cases 2020-04-26 22:25:48 +02:00
youtous 47fac2706f
use ffdhe4096 for DHE params
use by default ffdhe4096 for DHE params 


use by default ffdhe4096 for DHE params
2020-04-26 22:23:51 +02:00
youtous f60de0c66e
init tests cases ffdhe4096 2020-04-26 22:23:51 +02:00
youtous bdcf5e0cf1
fix send mail test quota
fix quota warning test: wait for postfix to be UP


increase postfix restart delay
2020-04-24 19:03:27 +02:00
youtous 2e149b74c2
fix async quota tests 2020-04-24 17:03:09 +02:00
youtous 04de46dc41
test quota reached 2020-04-24 15:53:44 +02:00
youtous 2527ebfaf2
added dovecot quota feature
add postfix service quota check


check-for-changes on quotas


setquota command


fix checkforchanges quota


addquota verify user exists


add setquota in setup.sh


merging addquota into setquota


test quota commands


add ldap tests for dovecot quota


fix smtp only quota postfix rules


test postfix conf


add quota test integration


add quota exceeded test


add wait analyze


fix tests


fix setup typo


add test fixes


fix error output


wip


update startup rules


fix setup


fix setup tests


fix output commands


remove quota on remove user


try to fix sync limit mails


check if file exists


fix path


change used quota user


fix post size


check if quota file exists


update tests


configure virtualmailbox limit for dovecot


last fix


fix quota expr


relax dovecot tests


auto create dovecot-quotas


fix dovecot apply quota test


wip quota warning


trying to fix get dovadm quota


dovecot applies fix


fix quota warning lda path


test count mail on quota


fix quota warning permissiosn


fix test
2020-04-24 14:56:15 +02:00
Erik Wramner dde6acd1a1 Search in rotated logs and limit to RelayedInbound 2020-01-26 21:05:24 +01:00
Erik Wramner f342151b80 Fixed several amavis tests and removed commented code 2020-01-26 16:39:58 +01:00
Erik Wramner 42ccae2642 Test stop with a less central container than mail 2020-01-26 08:36:31 +01:00
Erik Wramner 27d66cf11f Restored test removed by accident 2020-01-22 19:11:59 +01:00
Erik Wramner 881ac71601 Show delivered mails with more details in test 2020-01-20 21:59:34 +01:00
Erik Wramner 1c73290ba0 Show found and expected decoders in test 2020-01-19 09:20:50 +01:00
Erik Wramner a66b2bff0c Make test result easier to evaluate 2020-01-18 21:01:24 +01:00
Erik Wramner 2ad667209c
Merge pull request #1323 from ap-wtioit/master-remove_tty_necessity
fix: dont use TTY in docker if not present, rem TTY necessity in tests
2019-11-13 09:59:01 +01:00
Andreas Perhab bbab4ef3fc fix: fix test setup.sh debug fetchmail on wildcard domains
on hosts that belong to wildcard domains pop3.example.com might
 actually resolve to pop3.example.com.[mydomain.com] and give a valid ip
 the return code of fetchmail then no longer is 11 (dns failure) but
 something else (2 for socket error in our case)

to make sure we always get return code 11 we use the domain name
pop3.example.com. that is not allowed to be resolved to a subdomain.
2019-11-12 15:35:03 +01:00
Andreas Perhab d8be2bd3cc fix: dont use TTY in docker if not present, rem TTY necessity in tests
Gitlab CI has not TTY present and TTY is not really required for
automated testing
2019-11-12 09:32:27 +01:00
Erik Wramner c882d95deb
Merge pull request #1284 from vortex852456/master
Added optional file user-patches.sh for own patches without recompiling
2019-11-09 15:13:06 +01:00
Sebastian Kaiser 37540509dc - test for user-patches.sh 2019-11-08 02:22:33 +01:00
Germain Masse d764d89ea9 Test for DOVECOT_MAILBOX_FORMAT 2019-11-04 15:49:29 +00:00
Germain Masse fa167a9e51 Test special-use folders are available in IMAP 2019-11-01 20:04:37 +00:00
Germain Masse e465e659ad Remove unnecessary maildir folders creation 2019-11-01 20:04:37 +00:00
vortex852456 34f52c6ad0
only "assert_success" for user-patches.sh check 2019-10-31 09:51:40 +01:00
Vortex def8400c17 added default "user-patches.sh" to the first container "mail" 2019-10-31 09:01:44 +01:00
Vortex 437d3b74cc added test for "checking configuration: user-patches.sh executed" - should fail with this commit 2019-10-31 02:38:45 +01:00
Felix Bartels 7ff9764285
Provide version information through labels (#1256)
* Provide version information through labels

Can be retrieved by calling e.g. `docker inspect -f {{.Config.Labels}} tvial/docker-mailserver:testing`

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add build hook so that Docker Hub can work with the build args

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* remove obsolete build-no-cache

build args invalidate build cache already

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* adapt travis file

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* shellcheck

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-23 11:22:23 +02:00
Germain Masse b34a79310a Privacy test email no more tagged as SPAM. ClamAV and SA disabled to avoid time-out on low perf system 2019-10-14 13:25:44 +00:00
Martin Schulze e2bbf12524 Tests fx: Also wait for smtp port 2019-10-08 23:39:04 +02:00
Martin Schulze 604a65024e Tests: extract mail_privacy into own .bats file 2019-10-08 23:11:27 +02:00
Martin Schulze 533ac7ed29 Tests: extract mail_pop3 into own .bats file 2019-10-08 22:24:05 +02:00
Martin Schulze 81fd83525c Tests: extract mail_smtponly into own .bats file 2019-10-08 22:15:27 +02:00
Martin Schulze 56f47db0f2 Tests: Extract mail_fail2ban into own .bats file 2019-10-08 22:03:56 +02:00
Martin Schulze d05255cb04 Tests: Extract mail_fetchmail into own .bats file 2019-10-08 21:45:05 +02:00
Martin Schulze a03c741e1b Extract mail_manual_ssl into own .bats file 2019-10-08 21:36:13 +02:00
Martin Schulze d3e2dfe3ba Move mail_with_ldap into its own .bats file 2019-10-08 21:31:56 +02:00
Martin Schulze d9a48878c9 Print last 10 log lines on container setup timeout 2019-09-12 00:43:44 +02:00
Martin Schulze 3f9dd4180a Fix setup_file marker logic 2019-09-12 00:42:04 +02:00
Martin Schulze a20f2c4199 Add pregenerated test/config dh params 2019-09-12 00:42:04 +02:00
Erik Wramner ca821fa51a
Merge pull request #1259 from martin-schulze-vireso/bugfix/no_error_printed_on_timeout
Fix missing error output from timeout
2019-09-11 14:04:04 +02:00