Commit graph

216 commits

Author SHA1 Message Date
17Halbe 115ad555be Introduce .env for docker-compose examples (Closes #815)
Introduce .env for docker-compose examples
2018-02-07 19:37:26 +01:00
17Halbe 3b7fc5930c Introducing Postscreen (#799)
* Introduced Postscreen

cheaper, earlier and simpler blocking of zombies/spambots.
From http://postfix.cs.utah.edu/POSTSCREEN_README.html :
As a first layer, postscreen(8) blocks connections from zombies and other spambots that are responsible for about 90% of all spam. It is implemented as a single process to make this defense as cheap as possible.

Things we need to consider:

 - Do we need a whitelist/backlist file? (http://postfix.cs.utah.edu/postconf.5.html#postscreen_access_list)
   - Via introducing an optional config/postfix-access.cidr
   - The only permanent whitelisting I could imagine are monitoring services(which might (still?) behave weird/hastely) or blacklisting backup servers(since no traffic should be coming from them anyway)
 - Do we need deep inspections? They are desireable, but these tests are expensive: a good client must disconnect after it passes the test, before it can talk to a real Postfix SMTP server. Considered tests are:
   - postscreen_bare_newline_enable (http://postfix.cs.utah.edu/postconf.5.html#postscreen_bare_newline_action)
   - postscreen_non_smtp_command_enable (http://postfix.cs.utah.edu/postconf.5.html#postscreen_non_smtp_command_action)
   - postscreen_pipelining_enable (http://postfix.cs.utah.edu/postconf.5.html#postscreen_pipelining_action)
- Do we need to make the blacklisting via dnsblocking configurable? It's currently set and weighted as follows, where a score of 3 results in blocking, a score of -1 results in whitelisting:
   (*: adds the specified weight to the SMTP client's DNSBL score. Specify a negative number for whitelisting.)
   (http://postfix.cs.utah.edu/postconf.5.html#postscreen_dnsbl_sites)
   - zen.spamhaus.org*3
   - bl.mailspike.net
   - b.barracudacentral.org*2
   - bl.spameatingmonkey.net
   - bl.spamcop.net
   - dnsbl.sorbs.net
   - psbl.surriel.com
   - list.dnswl.org=127.0.[0..255].0*-2
   - list.dnswl.org=127.0.[0..255].1*-3
   - list.dnswl.org=127.0.[0..255].[2..3]*-4
- What to do when blacklisting? I currently set it to drop. We could
   - ignore: Ignore the failure of this test. Allow other tests to complete. Repeat this test the next time the client connects. This option is useful for testing and collecting statistics without blocking mail.
   - enforce: Allow other tests to complete. Reject attempts to deliver mail with a 550 SMTP reply, and log the helo/sender/recipient information. Repeat this test the next time the client connects.
   - drop: Drop the connection immediately with a 521 SMTP reply. Repeat this test the next time the client connects.

In the end I think we could drop postgrey support. Postscreen replaces postgrey in its entirety, while being more selective and not delaying mail. Especially if we consider using the deep inspection options of postscreen.

Hope that wasn't too much to read! ;)

* main.cf got misformatted..
Don't know how, should be ok now.

* fixed malformatted main.cf & repaired master.cf

* reenabled rbl stuff.. It's cached, therefore doesn't hurt

* fixed tests

* added tests, repaired tests, added info, introduced new Variable POSTSCREEN_ACTION, fixes
2018-02-04 21:31:08 +01:00
Mathieu Brunot d270fcdd40 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
2018-01-25 22:38:41 +01:00
Sylvain Benner 0748734b19 Add requirements to README (#789) 2018-01-09 08:31:15 +01:00
kamuri 420e7741a1 Check for account changes and reload (Closes: #552)
Restart the daemons when changes are made to 'postfix-account.cf' and/or 'postfix-virtual.cf'
2017-10-10 08:15:18 +02:00
Johan Smits fe9361524c Update readme according to pr #731 2017-10-05 08:25:29 +02:00
Hannu Shemeikka 984537526a New command: generate-dkim-domain
This command can be used for generating DKIM key for a domain,
which is not included in any configuration files. For example,
when using SQL database for transport maps.
2017-09-09 23:35:26 +03:00
Johan Smits c9e5a92db3 Add docker size label of the latest version to the README (#675)
* Add docker size label of the latest version to the README

* Update the alt text

* Changed the label as suggested by @tomav
2017-07-30 20:07:32 +02:00
alinmear 21fb3f3c86 Fix ldap related critical Problems (#644)
* 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
2017-07-03 13:16:15 +02:00
Alexander Elbracht 5a86193dbf Environment variable for amavis subject tag (#596)
* 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
2017-06-23 21:50:01 +02:00
Thomas VIAL feff849d62 Changed README to :latest tag 2017-04-27 18:01:26 +02:00
Thomas VIAL c03aa58ff6 Fixes #527
Added comment suggested by @JonasT
2017-03-20 22:48:25 +01:00
strarsis 393f47d085 Add restart: always (#550)
* Update docker-compose.yml.dist
* Update docker-compose.elk.yml.dist
* Update README.md
2017-03-16 16:45:47 +01:00
Thomas VIAL 3d553961d3 Added Gitter badge 2017-02-23 11:48:52 +01:00
Sven Kauber c7e4206466 Added greylisting using postgrey (#495)
* Added greylisting using postgrey
* Updated the documentation
2017-02-06 10:21:18 +01:00
Thomas VIAL fed48e646d Fixes #488 - Typo in README 2017-01-21 17:27:21 +01:00
Kevin Crawley 16c90fc52a kubernetes fix (#484)
* Allow OVERRIDE_HOSTNAME
* Document the new environment variable
2017-01-20 23:30:29 +01:00
alinmear a7670ac5c1 Add #394: Postfix Virtual Transport (#461)
* 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
2017-01-09 23:52:36 +01:00
Thomas VIAL d4cee677ce ONE_DIR documentation (#460)
* Fixes #457 adding information regarding `ONE_DIR` env variable
2017-01-09 17:11:10 +01:00
Bogdan 9cebc50307 #445: mention the setup.sh convenience script (#453) 2017-01-04 10:09:03 +01:00
Thomas VIAL cfd7fde1ea Added config information
Added information regarding were config files must be mounted.
2017-01-04 10:05:02 +01:00
Thomas VIAL 03a0c92e6f Fixed docker version from "v2.1" to "2.1" 2016-12-25 23:10:06 +01:00
Thomas VIAL df752280e0 BREAKING CHANGES: (#432)
* 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
2016-12-25 22:54:37 +01:00
Thomas VIAL ccad91c23d Improved start-mailserver output (#420)
* Improved start-mailserver output
* Fixed rework to make tests work again
* Improved output and updated SSL certs for LE
2016-12-23 23:56:39 +01:00
Dennis Stumm 3ec1fb202d Add ldap auth for postfix and dovecot (#352)
* Add ldap support for postfix and dovecot

* Add SASLAUTHD

* Update README.md

* Add necessary packages to dockerfile

* Add config files for ldap

* Add tests for ldap auth
2016-10-30 14:11:36 +01:00
Thomas VIAL 08dc28e304 Fixes #346 and added a virusmail wiper triggered by a CRON (#347)
* Fixes #346 and added a virusmail wiper triggered by a CRON

* Renamed env to something more explicit VIRUSMAILS_DELETE_DELAY
2016-10-08 19:02:47 +02:00
Josef Friedrich cc2043ba88 Add syntax highlighting for YAML code snippets. (#314)
Fenced code blocks support YAML syntax highlighting.
2016-09-07 19:39:27 +02:00
Morgan Kesler ee0c4244cc Add the option of manually specifying paths to SSL certificates (#296)
* Add the option of manually specifying paths to SSL certificates

* Adding tests for manual SSL changes
2016-08-31 15:15:39 +02:00
Josef Friedrich f707a11c98 Add notice to docker-compose version in README (#268 #276) (#277) 2016-08-23 11:51:05 +02:00
Josef Friedrich e7de8b9245 Implement fetchmail (#260) (#271)
To retrieve emails from external mail accounts.
2016-08-21 22:13:13 +02:00
Zehir 8b289f6717 Adding the PERMIT_DOCKER option (#270)
* 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
2016-08-21 22:10:13 +02:00
Jack Twilley 0e8934c151 Minor corrections to README.md (#264)
One example was missing a useful line, which was present in the wiki's example and without which the example does not run.

A typographical error was found in a file.
2016-08-18 09:54:17 +02:00
Thomas VIAL 4964e4dce6
Added shields 2016-08-02 14:24:02 +02:00
Thomas VIAL 4c5e757fec
Added Docker Pull image 2016-06-25 10:57:46 +02:00
shim_ 63fd58a7cb switch to SHA512 2016-06-14 13:00:51 +02:00
Josef Friedrich 9dc6ef9733 Fix link to start-mailserver.sh 2016-05-10 07:32:45 +02:00
Thomas VIAL 05f63f54be
Fixed badged URL to master 2016-05-09 09:28:56 +02:00
Thomas VIAL 975d4fa78f
Release V2 as MASTER (and LATEST image) 2016-05-08 20:10:38 +02:00
Thomas VIAL 98b5717f5c
Release V2 as MASTER 2016-05-08 20:08:24 +02:00
Chris54721 d746c9254e Update README.md 2016-05-08 19:02:32 +02:00
Tobias Rittig 43643b5cea #Fix docker-compose.yml proposal
./opendkim/ local folder shadows ./config/opendkim
on generation of the keyfiles all files get written to ./config/opendkim leaving ./opendkim empty
thus on startup no config for opendkim is loaded
2016-05-01 15:23:34 +02:00
André Stein 94a97ac150 Update README.md with new link to "Configure Sieve filter" wiki page 2016-04-29 17:52:22 +02:00
André Stein 9f63fa2ef4 Rename environment variable ENABLE_MANAGE_SIEVE to ENABLE_MANAGESIEVE. 2016-04-29 17:09:48 +02:00
André Stein 69b66d55bc Configure dovecot's managesieve plugin when the environment variable
ENABLE_MANAGE_SIEVE has been set.

Adapted README and updated tests.

The functionality has successfully been tested using the Sieve
Thunderbird plugin.
2016-04-29 15:24:10 +02:00
André Stein 2cfb3c9977 Update README.md with link to sieve configuration in Wiki 2016-04-28 10:26:05 +02:00
André Stein 2f9f6b1002 Implement basic sieve support using Dovecot.
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.
2016-04-28 08:57:50 +02:00
Thomas VIAL f8268f641a
Fixed link to script 2016-04-24 18:12:36 +02:00
Thomas VIAL 9e1c4783a8
Refactored documentation and Wiki
Moved docker-compose.yml.dist to version 2 with data volume container
Renamed DMS_SSL to SSL_TYPE
Refactored start-mailserver to avoid DKIM errors
2016-04-24 17:37:10 +02:00
Thomas VIAL b9e1903083
- Fixed #152
- Moved Fail2ban to 0.9.x because OS version was buggy
- Improved documentation
- Reduce image size
2016-04-23 12:09:28 +02:00
Thomas VIAL 2f1be46c91
Fixed typo 2016-04-23 09:27:47 +02:00
Thomas VIAL 81bd1f5212
Fixed formatting 2016-04-23 00:35:40 +02:00
Thomas VIAL b78ae12cf0
Fixed typo 2016-04-23 00:34:03 +02:00
Thomas VIAL 4414976e32
Added information regarding default value 2016-04-23 00:32:43 +02:00
Thomas VIAL 43d2c0c4a5
Improved documentation 2016-04-23 00:31:15 +02:00
Thomas VIAL 0322d890cd
Fixed i#152 Fail2ban config and tests 2016-04-22 17:51:14 +02:00
Kyle Ondy ef2759c6c6
Convert tab to spaces in the readme
Call me petty, but things like this bother me more than they should.
2016-04-21 09:29:57 -04:00
Kyle Ondy d9295ccc13
Remove trailing whitespace in the readme 2016-04-21 09:28:23 -04:00
Thomas VIAL 4f611eec1d Fixed #143 adding a OpenDKIM keys generator and its integration tests 2016-04-20 23:01:32 +02:00
Thomas VIAL c311ef0b5a Fixed typos 2016-04-20 11:40:31 +02:00
Thomas VIAL 2b8bf1b80d Changed documentation for #109 2016-04-20 10:15:51 +02:00
angus ee0d0853dd Dovecot based version of the mailserver.
Courier and Cyrus Sasl have been removed and substituted with Dovecot which now
handle authentication for Postfix, Imap and Pop3, with support for SSL.
This allow the use of several encryption schemes for the password as well as a
single user db.
OpenDKIM keys can now be provided at the startup and will be used instead of
generating new ones (so that you don't have to change your DNS configuration).

This version builds correctly on Docker but no integration tests have been
reworked to accommodate Dovecot instead of Courier and Cyrus Sasl. As such
at present no automatic tests can be executed.
2016-04-07 14:42:07 +02:00
angus 5219aab9e8 Add ENABLE_FAIL2BAN environment variable to enable fail2ban service (it's not enabled by default, now).
* Changed/updated Makefile and integration tests
* Changed some grep expressions in the fail2ban tests
2016-03-31 12:33:47 +02:00
Chris54721 19fed39dc4 Merge remote-tracking branch 'upstream/master' into relay 2016-03-18 20:00:48 +01:00
Marko J cbf72bdb53 Better documentation for SMTP_ONLY environment variable 2016-03-01 01:04:31 +00:00
Marko Jung ca35e0e313 on special request also some documentation 2016-03-01 00:21:23 +01:00
Thomas VIAL ab9fd69052 Fixed test file now moved to "bats" 2016-02-25 12:15:33 +01:00
Robert Dolca d36ecaa2c0 Add SASL_PASSWD environment variable to configure relay authentication 2016-02-20 02:21:25 +00:00
Thomas VIAL 59a6649f0e Fixes #79 and add spamassassin configuration variables (see README.md) 2016-02-18 22:11:24 +01:00
Thomas VIAL f77e2e9ffa Added fail2ban to features list 2016-02-13 12:20:15 +01:00
Thomas VIAL dfd3a486d1 Moved SSL doc to the Wiki 2016-02-10 09:53:51 +01:00
Thomas VIAL a13cbcb9aa Improved documentation 2016-02-04 08:51:07 +01:00
Thomas VIAL 97a495ae1d Added tests and simplified some of them 2016-02-03 22:45:11 +01:00
Thomas VIAL 1c3b86dc41 Fixed FAQ url 2016-02-01 15:06:39 +01:00
Thomas VIAL 5c4a5fee92 Simplified README and linked to FAQ. 2016-02-01 15:05:29 +01:00
bilak 07ec823f45 - added DMARC (opendmarc) support with basic setup 2016-01-26 18:26:50 +01:00
Thomas VIAL 713fd8dc30 Merge branch 'pop3-support' of https://github.com/crash7/docker-mailserver into crash7-pop3-support 2016-01-26 12:56:26 +01:00
Thomas VIAL 06281f7823 Merge pull request #56 from bilak/master
#55 - added DKIM support -i 55
2016-01-26 12:27:54 +01:00
bilak 426f87d916 - reworked dkim (configuring for all domains based on postfix/vhost) 2016-01-23 18:38:21 +01:00
Thomas VIAL 796699f0f1 Fixes #39 with a basic backup script 2016-01-22 15:02:25 +01:00
bilak 5176ac03b5 - added DKIM support 2016-01-20 16:41:34 +01:00
Thomas VIAL 0e4058d70f Improved documentation and added link to SSL.md 2015-12-06 21:12:32 +01:00
Thomas VIAL fe55350645 Cleaned code after live testing and improved documentation 2015-12-05 17:32:33 +01:00
Thomas VIAL e5719ceacb Begening configuration for Letsencrypt support 2015-12-05 16:44:13 +01:00
Thomas VIAL 4f1da4e8f2 Improved documentation requested in #33 2015-11-22 01:39:09 +01:00
Thomas VIAL 2402455267 Improved documentation to fix #31 2015-10-22 16:38:27 +02:00
Thomas VIAL c6ed9f16a4 Fixed Travis CI image for master branch only 2015-10-19 12:55:53 +02:00
Thomas VIAL 201dd22092 Added information about Travis, Docker Hub and tests. 2015-10-18 22:29:32 +02:00
Thomas VIAL c6ad590457 Use TRAVIS env and updated README with Travis build status 2015-10-18 21:38:22 +02:00
Thomas VIAL d0e540d404 Fixed typo 2015-09-12 10:53:59 +02:00
Thomas VIAL a59eec646a Added link to blog post. 2015-08-26 10:05:40 +02:00
Thomas VIAL 514fe97303 Improved documentation 2015-08-19 16:13:56 +02:00
Thomas VIAL 7a28bb0f3a Fixed typo. 2015-08-19 15:59:04 +02:00
Thomas VIAL c95dea76f6 Added better check on self-signed certs. for #14 2015-08-19 15:47:20 +02:00
Thomas VIAL 920ac36bad Improved documentation about SSL certs. which are self-signed 2015-08-19 10:08:43 +02:00
Thomas VIAL 9be61a477c Improved documentation for #14 2015-08-18 20:49:49 +02:00
Thomas VIAL db8391e4f4 Fixes #14 documentation. 2015-08-18 13:24:12 +02:00
Thomas VIAL a848a55177 Added a way to generate and configure a specific SSL certificate for postfix #14 2015-08-18 13:13:56 +02:00
Thomas VIAL 63a7be0e97 Removed "docker_mail_domain" env. variable to use docker hostname and improved documentation for #13 2015-08-17 22:16:08 +02:00
Thomas VIAL 09c8166a24 Fixed documentation when using docker to help on #13 2015-08-17 20:45:49 +02:00
Thomas VIAL dd4f90e66e Improved documentation related to #11 2015-08-10 12:20:50 +02:00
GAVARD Ewann 15835a0ead Update README.md 2015-08-05 13:35:22 +02:00
Thomas VIAL 51775c8020 Improved documentation to fix #9 2015-07-27 10:00:53 +02:00
Thomas VIAL 320156439f Fixes #8 - BC BREAK - User configuration is no longer in docker-compose.yml to make it easier to maintain 2015-07-16 19:35:11 +02:00
Thomas VIAL f0ad3151a9 Text formating 2015-07-01 14:10:52 +02:00
Thomas VIAL 31b9dbf05a Improved markdown style. 2015-06-29 14:57:08 +02:00
Thomas VIAL 1e19ca515e Improved documentation (added client configuration) 2015-06-29 14:55:54 +02:00
Thomas VIAL 3fbe48fad5 Fixes #5 => added how to run without docker-compose 2015-05-06 00:12:36 +02:00
Thomas VIAL 806519e6cf Added comment in README.md 2015-05-02 19:07:51 +02:00
Thomas VIAL 81c08b82d5 Added virtual aliases management using dedicated env variable. 2015-05-02 19:05:34 +02:00
Thomas VIAL 41c0285e01 Added information about issues. 2015-03-31 22:21:44 +02:00
Thomas VIAL ccca157920 Added SSL for courier-imap using courier-imap-ssl.
Fixed /etc/postfix/vhost issue.
2015-03-31 19:31:18 +02:00
Thomas VIAL 188356237a Now postfix configuration is generic. 2015-03-31 17:28:13 +02:00
Thomas VIAL 9cd746ef33 Simplified configurations 2015-03-29 14:07:56 +02:00
Thomas VIAL 45b1d1e583 Users parsing from env and not from static file anymore. 2015-03-28 19:30:09 +01:00
Thomas VIAL 22a54827ff Working image. 2015-03-28 16:44:40 +01:00
Thomas VIAL f97eaee38c Added basic README. 2015-03-28 16:04:09 +01:00