* fail2ban handling integrated in setup.sh
- calling \"./setup debug fail2ban\" lists all iptable chains whith blocked IPs (like: Banned in dovecot: 91.200.12.164
Banned in postfix-sasl: 91.200.12.164)
- calling \"./setup debug fail2ban unban xxx.xxx.xxx.xxx [yyy.yyy.yyy.yyy ...]\" unbans/removes those IPs from all jails.
- calling \"./setup debug fail2ban unban\" (without an IP) gives an descriptive error: (You need to specify an IP address. Run "./setup.sh debug fail2ban" to get a list of banned IP addresses.)
* disable_vrfy_command: (#798)
Prevents Spammers from collecting existing mail-addresses by probing the mailserver for them.
* Added support for Dovecot and Postfix LDAP TLS (#800)
* Allow setup of LDAP STARTTLS for Dovecot and Postfix
* Added tests for TLS config override
* Add missing Postfix TLS options
* Added missing new line at the end of the file
* Added STARTTLS tests for Postfix config
* tests added
and made the script output look more shiny.
* setup.sh enhancements
* 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.
* 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
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.
To setup the mailserver large snippets of shell code had to past in a
console. Instead of:
mkdir -p config
touch config/postfix-accounts.cf
docker run --rm \
-e MAIL_USER=user1@domain.tld \
-e MAIL_PASS=mypassword \
-ti tvial/docker-mailserver:latest \
/bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u
$MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf
you can specify:
./setup.sh email add user1@domain.tld mypassword
This wrapper script can be easily extended. It uses the scripts already
builtin.