Commit Graph

262 Commits

Author SHA1 Message Date
Michael Schmoock d21a185be0 doc: fix service name now mailserver 2021-01-31 17:50:02 +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
Frederic Werner bbd1b36a63
Change tag convention and allow multiple registries (#1763)
* Change tag convention and allow multiple registries

* Add ghcr username secret

* Introduce repository secrets

Again, use-case being forks not having to change these values in the YAML.

* Update image tag according to convention

* Add available sources and tag convention
2021-01-24 23:18:37 +01:00
Georg Lauterbach 221d4ce187
adjusting links & misc 2021-01-19 09:27:01 +01:00
Georg Lauterbach c31a62d2f6
fixes the PR testing problems 2021-01-16 15:34:31 +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
Georg Lauterbach 2020df88fe
corrected CONTRIBUTING & README 2020-12-22 11:08:50 +01:00
Georg Lauterbach 7517315b85
added description for user-patches & reworked SELinux settings 2020-12-19 13:17:48 +01:00
Jarrod Smith bc95107b54 Get rid of syslogd warning about kernel logging. 2020-12-09 20:02:27 +00:00
William Desportes e58020029e
Add more sasl LDAP config options
- SASLAUTHD_LDAP_PASSWORD_ATTR => ldap_password_attr
- SASLAUTHD_LDAP_AUTH_METHOD => ldap_auth_method
- SASLAUTHD_LDAP_MECH => ldap_mech
2020-12-08 15:30:55 +01:00
William Desportes 17962c243a
Implement more sasl config options
Follow up of: https://github.com/tomav/docker-mailserver/pull/980
Ref: https://github.com/tomav/docker-mailserver/issues/1704
2020-12-08 15:07:22 +01:00
Georg Lauterbach ec290acd1f
added OS support and multiple domain setup to the README 2020-11-25 13:31:21 +01:00
Georg Lauterbach d4e0a571e0
Merge pull request #1683 from simonsystem/issue-1681_create-docs-for-all-dovecot-vars
Create docs for missing DOVECOT vars in README.md
2020-11-07 23:50:36 +01:00
Simon Schröter a66a75113c Create docs for missing DOVECOT vars in README.md 2020-11-07 15:16:02 +01:00
Georg Lauterbach ed7106b04d
housekeeping 2020-11-06 14:04:23 +01:00
Georg Lauterbach 46998dd816
preparation to include *.bats into shellcheck 2020-11-05 13:47:52 +01:00
omarc1492 da8677afc2
Update README.md 2020-10-30 12:29:12 -05:00
omarc1492 af8da35322
Update README.md 2020-10-30 12:26:45 -05:00
omarc1492 1bf7929f87
Update README.md 2020-10-30 12:25:42 -05:00
omarc1492 96da96b513
Update README.md 2020-10-30 12:22:53 -05:00
omarc1492 50c40c4ba6
Update README.md
Add example of using script when SELinux is enabled.
2020-10-30 10:51:27 -05:00
Georg Lauterbach f16e7f274e
updating env files further 2020-10-21 17:02:39 +02:00
Georg Lauterbach 0ada57d87c
Documentation and Script Updates trying to fix #1647 (#1653)
* documentation and script updates trying to fix #1647
* re-trigger tests
* removing unnecessary rm statements
* re-trigger tests
2020-10-21 16:00:35 +02:00
Georg Lauterbach 75384e4d92
fixing .env 2020-10-19 12:20:23 +02:00
Georg Lauterbach 34ad0500db
exchanging `.dist` files 2020-10-18 14:54:23 +02:00
Georg Lauterbach 916ef571b9
Miscellaneous cleanup / housekeeping (#1641) 2020-10-06 14:45:55 +02:00
Georg Lauterbach 8e8671bb42
added option to use non-default network-interface, resolves #1227 (#1621)
* added option to use non-default network-interface (#1227)
* minor (stylistic) changes
* properly working with Bash arrays for CONTAINER_NETWORKS
* cleanup to trigger rebuild
* added CODE_OF_CONDUCT to trigger rebuild
2020-09-26 15:11:52 +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
Georg Lauterbach 9b5d4d307c
getting rid of ELK & updating Compose (#1614)
* removed elk diretory
* removed filebeat / elk compose.yml.dist; adjusted other compose files
* final README update for env variables
* updated compose files
2020-09-21 13:54:31 +02:00
Georg Lauterbach 77520bf96f
adjusted coding style guidelines; added table of contents 2020-09-09 17:19:48 +02:00
Georg Lauterbach f7ca406ec9
fixing #1602; variable-brace-policy changed; 2020-09-06 12:27:40 +02:00
Georg Lauterbach 67e1e586c7
coherent renaming of functions 2020-09-05 16:53:36 +02:00
Georg Lauterbach bf679a5504
changes from tomav#1599 without `start-mailserver.sh`
included all changes from the work on refactoring all scripts, but excluded one big script to make merging easier; replaced mapfile with read
2020-09-05 16:19:12 +02:00
Georg Lauterbach 06f0b087c1
major refactoring for setup.sh (#1590) (#1595)
* major refactoring for setup.sh (#1590)

* `set -u` stopped dkim generation from defaulting

* changed to bash and implemented simple error logging

* fixed $VOLUME not being set and refactored README as well due to markdownlint showing (valid) complaints

* setup.sh more consistent with braces, return codes, un-setting of variables and error reports and (importantly) test
2020-09-04 08:42:12 +02:00
vivacarvajalito 9902baec73
Add SASLAUTHD_LDAP_FILTER to ldap example
Added as an example SASLAUTHD_LDAP_FILTER
2020-07-23 02:14:54 -03:00
Sascha Scandella 858facb790
hint: keyword _SCORE_ for SA_SPAM_SUBJECT 2020-05-31 22:06:31 +02:00
youtous 578d6c528f
Update SPAMASSASSIN_SPAM_TO_INBOX doc 2020-05-03 10:33:28 +02:00
youtous a2104d0802
update README.md / dovecot introduction 2020-05-02 00:47:32 +02:00
youtous 0c838706d0
Option to disable dovecot quota 2020-05-01 23:42:21 +02:00
Brennan Kinney 9882fc54f7
chore: Clarify exposed ports section on README 2020-04-27 18:23:32 +12:00
Erik Wramner 73b8d65dd3 Merge next into master 2020-04-05 09:28:22 +02:00
Jairo Llopis a00dced8bc Allow to set comfortably inet_protocols
Setting `inet_protocols = ipv4` is almost a requirement when running behind Docker. Provide a way to make it easy.

@Tecnativa TT22925
2020-03-25 21:43:29 +01:00
Erik Wramner 142b98a209
Merge pull request #1427 from Tecnativa/inet-protocols
Allow to set comfortably inet_protocols
2020-03-22 08:56:55 +01:00
Germain Masse ce41f60888 Move filebeat to its own container 2020-03-20 17:56:18 +01:00
Jairo Llopis ab22450364
Allow to set comfortably inet_protocols
Setting `inet_protocols = ipv4` is almost a requirement when running behind Docker. Provide a way to make it easy.

@Tecnativa TT22925
2020-03-19 08:35:25 +00:00
Rainer Rillke bcb7f40260 README, env file: Warn about open relay configuration
Addresses: #1405
2020-03-16 18:46:57 +01:00
Erik Wramner 33d0f0f64d Updated readme with announcement 2020-03-16 18:38:28 +01:00
Rainer Rillke 43df48cb06 README, env file: Warn about open relay configuration
Addresses: #1405
2020-03-01 19:51:16 +01:00
Erik Wramner e4f8bac6d1 Added FAQ for bare domains #968 2020-01-18 11:42:23 +01:00
Christian P. Glahn 739043d501 fixed a typo in the bayes shortcircuit docu 2020-01-14 22:08:17 +01:00
Christian Glahn b8726b80a4 activate SA shortcircuit features via env, fixes #1118 2020-01-13 14:22:14 +01:00
Erik Wramner d847be2d5a
Merge pull request #1331 from Tecnativa/srs-sender-classes
Allow to configure SRS sender classes easily
2019-12-06 07:22:46 +01:00
Jairo Llopis ce8c1734e6
Document plus addressing and DEFAULT_RELAY_HOST format
These are a couple of things that work but got me losing lots of hours. Let me add them to README:

1. Fix #1330 explaining that plus addressing works out of the box.
2. Explain that DEFAULT_RELAY_HOST will fail to authenticate with RELAY_USER and RELAY_PASSWORD if you forgot the brackets.

@Tecnativa TT20505
2019-12-03 13:52:26 +00:00
Jairo Llopis 42348ff353
Allow to configure SRS sender classes easily
This will allow to forward safely any email from any host, no matter how strict their SPF policy is, by setting `SRS_SENDER_CLASSES=envelope_sender,header_sender`.

@Tecnativa TT20505
2019-12-03 13:33:51 +00:00
Germain Masse 36afac7726 New option DOVECOT_MAILBOX_FORMAT 2019-11-04 15:49:29 +00:00
Daniel Karski 0b9bbc79b8
Update README.md
link FAQ
2019-11-02 06:46:35 +01:00
Erik Wramner c6b19bd80a Updated system requirements, see #1224 2019-10-28 13:55:18 +01:00
Artur Mustafin f50cf3ecb4
Update README.md
added command for required file to run docker-compose  up -d mail
2019-10-17 18:53:32 +03:00
Arash Fatahzade 96268bb45b
Removed a dot from .env-mailserver 2019-09-29 21:47:09 +03:30
Lukas Elsner 1fce099ade Separate environments and simplify docker-compose.yml 2019-09-20 13:38:13 -06:00
Lukas Elsner e60e2d180e Separate environments and simplify docker-compose.yml 2019-09-20 10:40:37 -06:00
Erik Wramner 2584124ccd Updated readme after code review 2019-09-16 08:05:18 +02:00
Erik Wramner 008b8e6bce Fix #1093, pflogsumm and logwatch 2019-09-16 08:00:35 +02:00
Felix Bartels 043e184630 Update readme
reorg dockerfile and add comments
2019-09-02 11:16:21 +02:00
Erik Wramner 0a9bd1c09d Corrected docs for dovecot attrs #1234 2019-08-21 12:53:53 +02:00
James Fryer f6ad68d5c9 Improved documentation for SA_KILL 2019-08-21 11:25:10 +01:00
James Fryer 29db9a8f2b Improved documentation for SA_KILL 2019-08-20 13:01:51 +01:00
Martin Schulze 234632913e Add PERMIT_DOCKER=connected-networks 2019-08-02 15:05:00 +02:00
Michael Schmoock ba06cf5bf4 Adds docker image update to restart section in README (#1178) 2019-07-24 14:06:31 +02:00
0xflotus adf3d8e1b3 fixed privileges (#1166) 2019-05-14 21:40:02 +02:00
Michael G c4b2f6b7e6 Update indentation in README (#1162) 2019-05-05 20:22:51 +02:00
Johan Smits 7dbc96e908
Improve ldap queries to support email forwarding to a other mailserver 2019-02-02 11:02:31 +01:00
jose nazario 265d770e47 Spelling fixes (Closes: #1113) 2019-01-22 14:00:53 +01:00
Scott Weldon 7f7dd9b746 Set minimum docker-compose version to 1.7 (Closes: #1106)
Bump docker compose version to 1.7
2019-01-20 11:16:19 +01:00
Christian Glahn 8517a4d025 Document missing DOVECOT_* environment variables (Closes: #1099, #1112)
* Document missing DOVECOT_* environment variables, fixes #1099
* remove misleading quotes
2019-01-20 11:15:26 +01:00
jjtt a3724fa91d Support for setting relayhost in main.cf (#1104)
* Added DEFAULT_RELAY_HOST setting
* If set this value will be used as the relayhost in /etc/postfix/maincf causing all mail to be delivered using this relay host
* Test for default relay host setting
2019-01-19 11:10:31 +01:00
Andrey Likhodievskiy a989d77a87 Disable ssl when no certificate is set (Closes: #1083, #1085)
* Modified start-mailserver.sh with two new options for SSL certificate Configuration ():
+ ‘’ (empty string) modifies dovecot configs to allow plain text access
+ * (default) does nothing but warn with message ‘SSL configured by default’

* Updated README.md:
SSL_TYPE environment variable with unknown value will set SSL by default
2018-12-02 12:59:16 +01:00
Daniel Panteleit 0fb4a6d082 Clear up env format and hostname value (#1076)
* Describe format for .env in README
* Display used domain and hostname even when they are not acceptable
This should be clearer for the user when the hostname was set incorrectly.
2018-11-11 20:46:53 +01:00
mpanneck 216def8490 add LDAP_QUERY_FILTER_DOMAIN env to documentation (#1070)
* added LDAP_QUERY_FILTER_DOMAIN env
* updated docs for LDAP_QUERY_FILTER_DOMAIN env

additionally removed unnecessary quotation marks in example ldap.yml
2018-11-03 21:52:17 +01:00
millerjason 53a344a056 Support for additional postgrey options (Close: #998, #999, #1046)
* addnl postgrey whitelist support. closes #998, closes #999.

	modified:   Dockerfile
	modified:   Makefile
	modified:   README.md
	modified:   docker-compose.elk.yml.dist
	modified:   docker-compose.yml.dist
	modified:   target/start-mailserver.sh
	modified:   target/supervisor/conf.d/supervisor-app.conf
	new file:   test/config/whitelist_recipients
	new file:   test/nc_templates/postgrey_whitelist_local.txt
	new file:   test/nc_templates/postgrey_whitelist_recipients.txt
	modified:   test/tests.bats

* match existing indent convention

	modified:   target/start-mailserver.sh

* ISSUE-999: add support for header_checks

	modified:   Dockerfile
	modified:   target/postfix/main.cf

* ISSUE-999: add empty header_check file

	new file:   target/postfix/header_checks.pcre
2018-11-01 19:32:36 +01:00
olaf-mandel 8c8426ef4a postfix: fix message size limits (#1061)
The message size limit was reduced in c8728eab from the postfix
default [1] of 10,240,000B = 10,000kiB = ~10MiB to only
1,048,576B = 1MiB. And the documentation claims that this would be 10MiB
instead of 1MiB.

Restore the old behaviour as default and fix the documentation as well.

[1]: http://www.postfix.org/postconf.5.html
2018-10-20 20:10:30 +02:00
Jiří Kozlovský c8728eab8a feat: added postfix message & mailbox size limits to ENV settings (Closes: #629, #1056) 2018-10-15 21:17:45 +02:00
Birkenstab 8f48d0536f Fix Readme usage: Start container before running setup.sh (#1054) 2018-10-14 21:41:52 +02:00
James d518a9fc1d DOMAINNAME can fail to be set in postsrsd-wrapper.sh (#989)
* DOMAINNAME can fail to be set in postsrsd-wrapper.sh

if the container doesn’t have a proper hostname, postsrsd will fail to start
because SRS_DOMAIN is empty. Make a best effort to figure out the domain name
and provide a way to set one if needed.
2018-06-19 08:17:32 +02:00
ixeft 60656aec49 Report sender (#965)
* added REPORT_SENDER env variable to the container.
* integration test for REPORT_SENDER
* added tests for default REPORT_SENDER
2018-05-01 19:57:31 +02:00
Pierre-Yves Rofes 137d623171 Ensure that the account contains a @ (#923, #924)
* Ensure that the provided username actually contains a domain
* Update README.md to be consistent with addmailuser script
* Add a test to check if the username includes the domain
2018-04-04 18:59:28 +02:00
Paul Adams f28e9843ce Implementation of multi-domain relay hosts (#922, #926)
* Add new configuration for multi-domain relay hosts (#922)
 * Creates new environment variables (replacing existing AWS_SES variables)
 * Optionally allows more advanced setups using config files
* Update relay hosts during change detection (#922)
* Add helper scripts for adding relay hosts and per-domain auth
* Allow the possibility to deliver some mail directly
* adding a domain with no destination will exclude it from the
  relayhost_map and so Postfix will attempt to deliver the mail directly
* tests for setup.sh script
* tests for relay host configuration
* these tests cover the code in `start-mailserver.sh` dealing with both
  the env vars and the configuration files
2018-04-02 10:45:58 +02:00
17Halbe 2167108ec0 introducing ENABLE_SRS env variable (Closes: #906, #852)
* making postsrsd optional
* added tests, added documentation
2018-03-18 20:15:06 +01:00
akmet a420b15370 Adding daily mail review from Issue 839 (#881)
* Added dependencies, binary, startup configuration
* Added env variable to dist files/readme
* send summary after each logrotate, added env variable for mail/logrotate interval
* remove mail.log from rsyslogs logrotate
* rotate mail.log when no email is set
* Added documentation for POSTFIX_LOGROTATE_INTERVAL
* Removed interval option, since its not being tested for.
* changed test to force logrotate to rotate fixed logrotate config
* readded setup_environment, made logrotate_setup being called everytime
* changed documentation for new variable names - again
* Did Documentation, added a default recipient, added test for default config.
* layout fix
* changed variable names apposite the documentation
2018-03-18 19:52:28 +01:00
James ef79e9a65d Generate SRS secret on first run and store it (#891) 2018-03-10 13:41:20 +01:00
James 2e8bb4ae34 Allow configuring SRS secrets using the environment (#885) 2018-03-08 22:51:10 +01:00
Cédric Laubacher d691b8df6f Fix typo in README (#883) 2018-03-07 22:14:52 +01:00
17Halbe a73692cc9f Added reject_authenticated_sender_login_mismatch (#872)
* added reject_authenticated_sender_login_mismatch handling including tests
* removed obsolete reject_sender_login_mismatch
* introduced SPOOF_PROTECTION env variable, tests, documentation and missing documentation for TLS_LEVEL
* added missing email template
2018-03-07 19:33:43 +01:00
Marek Walczak c36e878d76 Nist tls (#831)
* remove two ciphers according to https://www.htbridge.com/ssl/ (NIST, HIPAA)
* added a switch via an environment variable to choose between modern and intermediate ciphers
2018-02-22 08:36:12 +01:00
Achim Christ eb20722b80 Add environment variable to allow for customizing postsrsd's SRS_EXCLUDE_DOMAINS setting (#849, #842) 2018-02-18 20:53:13 +01:00
Johan Smits 803dab12c6
Update readme and changelog about the ports and usage (#848) 2018-02-18 13:12:39 +01:00
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