Proper shutdown on container stop, additional whitelisting options, PCRE filtering support, fixing permission issues#657
Conversation
* ADD_PERMIT_NETWORK options allows to specify additional networks to whitelist in mynetworks while retaining the benefits of automatically determining relevant networks through PERMIT_DOCKER. E.g. to add the network "10.0.1.0/24", set ADD_PERMIT_NETWORK to "10.0.1.0/24" * DISABLE_FILTERS_FOR_MYNETWORKS option to add amavisd-new configuration to disable clamav/spamassassin filters for the IPv4 hosts listed in mynetworks (amavisd-new doesn't seem to support IPv6 here). Set DISABLE_FILTERS_FOR_MYNETWORKS to enable this. * Added PCRE support to postfix, allowing efficient rejections of mail headers and body based on PCRE regexps. The regexps can be placed in config/postfix-reject_body_checks and config/reject_header_checks accordingly. See postfix main.cf documentation on header_checks and body_checks for more information. * Added support for the second postgrey whitelist (whitelist_clients.local) Improvements: * Postgrey whitelists are also accepted as config/postgrey-whitelist_clients.local and config/postgrey-whitelist_recipients.local Bug/Security fixes: * Fixing permissions problems for /var/mail-state/spool-postfix when ONE_DIR=1: - spool-postfix/maildrop and spool-postfix/public folders must be owned by group postdrop - spool-postfix/[dev/etc/lib/pid/usr] permissions were not restrictive enough. They should be owned by the root user and root group.
* Stray pid files that could hinder a proper startup of postgrey and dovecot are now removed on container start * When the container is stopped, all services are now shut down properly - previously, the services were just killed, resulting in stray pid files and - possibly - corruption of files modified by the services at the time of termination - stopping the container is now much faster (previously took 10 seconds - the standard grace period for containers from being signalled by 'docker stop' and timing out and being killed off)
…th for header_reject pcre file
|
|
||
| CMD /usr/local/bin/start-mailserver.sh | ||
|
|
||
| CMD ["/bin/bash", "/usr/local/bin/start-mailserver.sh"] |
There was a problem hiding this comment.
You test 123 is failing because this change.
You need to set the same command to the setup.sh https://github.com/tomav/docker-mailserver/blob/master/setup.sh#L10
|
Please take a look at my branch issue-631-run-services-with-supervisor. It has many overlap with a proper shutdown function that you are building because of the use of supervisor. |
|
Resolved conflicts. Building in Travis. |
|
Could you rework the PR on the current master? |
|
Sorry for the late reaction. I currently lack the time to rework it, but hope to find some in the coming weeks. |
|
Don't want to rush you but is there any progress? |
|
Seeing as I still lack the time to rework it, I close this pull request for now. If I find the time to rework a current version, I'll open a new one. |
New features:
Improvements:
Bug/Security fixes: