* installed supervisor. Still need to set tasks to run in foreground.
* setting programs to run in foreground
* seems to work now
* cleanup
* final fixes
* tests
* show startup output on stdout
* set Dovecot config files before starting it
* make all processes log to console
* Use the supervisor as the main process. The start-mailserver is started
from the supervisord and then this process triggers others.
Defined some default variable in the Dockerfile. In order for
supervisored to build the command lines the ENV variable need to be set.
Therefore the defaults are defined.
Some processes are not single processes like postfix and fail2ban and
they have a wrapper. The wrapper takes care of proper shutdown and checking
if the process is running or not. Supervisored will restart the wrapping
script if the process is gone.
Increased some delays between tests because sometimes they where to short
for all containers to be running.
* Remove obsolete comments, reset timeout value to old one, added new lines
* Add more time for analyzing the emails.
Sometimes it fails the tests and gives a wrong state about
the test. During testing 40 seconds was the safe value.
* Fix Dovecot Ldap Problems
* Fix typo within DEFAULT_VARS Definitions
* Fix wrong ldap hosts value within the bats test
* Fix override_config for strings containing &
* Fix erroneous removal of an conditional within the postfix override function
* Renamed Test 129, to be clear that this belongs to ldap
* Fix mail_with_ldap setting dn pass explicit
* Add 3 env variables for ldap: LDAP_QUERY_FILTER_{USER,GROUP,ALIAS}
* Update README.md
* Environment variable for spam subject tag
* Add SA_SPAM_SUBJECT to readme
* Add integration tests for spam subject tag
* Fix overwrite environment variable in config file
* First pass at adding support for pipe and filter in Sieve, excluding unit tests.
* Reduce insight into copied scripts
* Added test
* Adjustments related to switch to 16.04
* Fix#526: fatal: no SASL authentication mechanisms
When using the container with SMTP_ONLY = 1, then the container fails
on ehlo because there is no valid sasl authentication mechanism
available. This happens because sasl has been enabled within
postfix/main.cf per default but sasl is not configured.
To fix this _setup_postfix_sasl does not depend anymore on
ENABLE_SASLAUTHD and will check in it's logic, whether to enable sasl
or not within postfix/main.cf.
* Fix#526: fatal: no SASL authentication mechanisms
When using the container with SMTP_ONLY = 1, then the container fails
on ehlo because there is no valid sasl authentication mechanism
available. This happens because sasl has been enabled within
postfix/main.cf per default but sasl is not configured.
To fix this _setup_postfix_sasl does not depend anymore on
ENABLE_SASLAUTHD and will check in it's logic, whether to enable sasl
or not within postfix/main.cf.
* Fix test
* Add method overwrite_config()
This method takes 2 arguments:
1.) Environment Variable Prefix
2.) String of files separated by whitespace
e.g.
export LDAP_SEARCH_BASE=dc=domain,dc=loc
export LDAP_BIND_PW=test
overwrite_config "LDAP_" "/etc/postfix/ldap-users.cf
/etc/postfix/ldap-groups.cf"
Logic:
+ all env vars will be search for vars with the prefix LDAP_
+ afterwards they will be dissembled in key value pairs
LDAP_BIND_PW=test --> bind_pw test
+ the key and value will be substituted within the provided files
via sed
* Fix#503 added logic for custom configs provided at container
provisioning within /tmp/docker-mailserver
* Add additional unit tests for postfix ldap integration
* check custom configs copied
* check environment variables substituted
* Fix quoting problems in tests.bats
* Fix missing brackets in function _fix_var_amavis_permissions()
* Fix typo in _setup_ldap
* Fix notify in overwrite_config
* Fix typo
* Fix added dovecot ldap config provisioning again and Add notify for tasks
* Fixed wrong mail headers when using OVERRIDE_HOSTNAME by setting the the hostname explicitly
* Added tests and fixed hostname in dovecot conf
* Added missing tests
* Improved function naming and task notification message
* Added `bats-assert` for more detailed error, very useful locally and on Travis
* Moved `bats` to git submodule
Example:
```
not ok 52 checking opendkim: generator creates keys, tables and TrustedHosts
# (from function `assert_output' in file test/test_helper/bats-assert/src/assert.bash, line 239,
# in test file test/tests.bats, line 368)
# `assert_output 2' failed
#
# -- output differs --
# expected : 2
# actual : 4
# --
#
```
* Add #394: Postfix Virtual Transport
This makes it possible to specify a lmtp config file, by providing
POSTFIX_DAGENT.
Update - Readme with informations about #394
* Add Variable ENABLE_POSTFIX_VIRTUAL_TRANSPORT (task)
* Add Variable POSTFIX_DAGENT (section)
Added Unit tests for virtual transport
* Fix syntax error in test/tests.bats
* Fix Unit Test
* Add some checks for user name matching in mail user scripts
* Fix user matching problems in mail user scripts
** fix matching problems at several places:
"delmailuser a@example.com" deletes also user "aa@example.com"
"delmailuser a@sub.example.com" deletes also user "a@sub-example.com"
** similar problems when inserting
** refactor and clean up
* Removed DISABLE_AMAVIS
* Renamed DISABLE_* to ENABLE_* with 0 as default value. (this must be explicit)
* Added missing tests for ENABLE_*
* Improved readme and docker-compose example
Should fix#256 and #386
* Move ldap files to target dir
* Move ldap files to target dir
* Update start-mailser.sh to use copied files
* Add the domainname from container to vhost
* Fix unary operator error
* List dovecot users only when LDAP disabled
* Minor
* Improve and extend setup.sh
Add subcommands 'debug show-mail-logs', 'inspect', 'login'. Add option
'-c' to specify the name of the running container. Add option '-i' to
specify the image name.
* Add tests for setup.sh
The letsencrypt-auto client creates cert.pem, chain.pem, fullchain.pem, and
privkey.pem in its default settings. The simp_le client creates cert.pem,
fullchain.pem, and key.pem in its default settings.
A check for either privkey.pem or key.pem was added.
The chain.pem file was only used by the letsencrypt code for the creation of
combined.pem, which is not used by either postfix or dovecot.
The code to create a combined.pem file for letsencrypt was removed, as was the
corresponding test.
This commit adds a script nammed 'listmailuser'. './setup.sh' uses this
this script for its subcommand './setup.sh email list'. A test have
been added too.
* Wrote functional tests for desired behavior.
Redoing the pull request, starting from current master.
The tests now fail where expected.
* Updated commands to handle missing files better.
The functional tests now pass.
* Adding the PERMIT_DOCKER option
See README.md for more informations
* Adding some test for PERMIT_DOCKER option
* Fix test cases
* Opendkim and Openmarc configuration
Fix docker network range
Adding opendkim and openmarc configuration
* Adding some options for tests
* Update log message
* Update tests
* Allow disabling amavis service
Setting the `DISABLE_AMAVIS=1` env var will skip the starting of the
amavis process.
* Enable option to not run spamassassin
Setting the `DISABLE_SPAMASSASSIN=1` env var will start this container
without spamassain.
* Allow starting of the container without clamav
Setting the `DISABLE_CLAMAV=1` env var will start this container without
starting clamav.
The dovecot-sieve plugin is installed and configured to apply sieve
as soon as a .dovecot.sieve file is encountered in the virtual user's
home directory (that is /var/mail/${domain}/${username}/.dovecot.sieve).
Transport has been changed in the postfix configuration to use
Dovecot LDA (see http://wiki.dovecot.org/LDA/Postfix) to actually
enable sieve filtering.
Tests have been added.
(encrypted passwords).
Modified integration tests to adapt to dovecot.
Need to be worked out:
- user accounts checks: dir layout under dovecot probably include dynamic filenames.
How can we handle that ?
- fail2ban container cannot ban via iptables if we do not run it with special
privileges.
/var/log/mail directory.
Fail2ban jails and logrotate config files have been updated accordingly.
Integration tests have been extended to include a check of the new path.