Skip to content

Adding the PERMIT_DOCKER option#270

Merged
tomav merged 7 commits intodocker-mailserver:masterfrom
Zehir:master
Aug 21, 2016
Merged

Adding the PERMIT_DOCKER option#270
tomav merged 7 commits intodocker-mailserver:masterfrom
Zehir:master

Conversation

@Zehir
Copy link
Copy Markdown
Contributor

@Zehir Zehir commented Aug 19, 2016

See README.md for more informations

Enhancement #261

See README.md for more informations
@tomav
Copy link
Copy Markdown
Contributor

tomav commented Aug 19, 2016

Job restarted.

@tomav
Copy link
Copy Markdown
Contributor

tomav commented Aug 19, 2016

You should add functional tests (have a look to test/tests.bats folder)

@Zehir
Copy link
Copy Markdown
Contributor Author

Zehir commented Aug 19, 2016

Done

Comment thread test/tests.bats
@test "checking PERMIT_DOCKER: mynetworks option exist" {
run docker exec mail /bin/sh -c "postconf -d | grep '^mynetworks ='"
[ "$status" -eq 0 ]
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be always true because a default value exists in the main.cf

@tomav
Copy link
Copy Markdown
Contributor

tomav commented Aug 19, 2016

The test should be the existing one, testing different value of the variable (empty, host, network).
There are multiple containers started in the tests and you can configure one with each value.

@tomav
Copy link
Copy Markdown
Contributor

tomav commented Aug 19, 2016

Otherwise the coverage remains low.
Thanks.

@Zehir
Copy link
Copy Markdown
Contributor Author

Zehir commented Aug 20, 2016

Ok I will make some test with the different containers.
And I need to add the 'whitelist' ip/network to this files:

/etc/opendkim/TrustedHosts
/etc/opendmarc/ignore.hosts

@Zehir
Copy link
Copy Markdown
Contributor Author

Zehir commented Aug 20, 2016

@tomav The Travis build is blocked again.

@Zehir
Copy link
Copy Markdown
Contributor Author

Zehir commented Aug 21, 2016

Done

@tomav tomav merged commit 8b289f6 into docker-mailserver:master Aug 21, 2016
@tomav
Copy link
Copy Markdown
Contributor

tomav commented Aug 21, 2016

Thank you @Zehir, great enhancement!

@kachkaev
Copy link
Copy Markdown
Contributor

kachkaev commented Sep 23, 2016

Sorry if the question is stupid guys,

What would be the recipe for disabling all SMTP attmpts except those within PERMIT_DOCKER: network? Somebody is constantly trying to start sending emails on my behalf, according to the container logs:

...
Sep 23 12:38:19 mail postfix/smtpd[1034]: connect from unknown[41.221.251.52]
Sep 23 12:38:20 mail dovecot: auth: passwd-file(whitesow,41.221.251.52): unknown user (SHA1 of given password: a24bce)
Sep 23 12:38:22 mail postfix/smtpd[1034]: warning: unknown[41.221.251.52]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Sep 23 12:38:22 mail postfix/smtpd[1034]: lost connection after AUTH from unknown[41.221.251.52]
Sep 23 12:38:22 mail postfix/smtpd[1034]: disconnect from unknown[41.221.251.52]
Sep 23 12:38:22 mail postfix/smtpd[1036]: connect from unknown[41.221.251.52]
Sep 23 12:38:23 mail dovecot: auth: Warning: auth client 0 disconnected with 1 pending requests: EOF
Sep 23 12:38:27 mail dovecot: auth: passwd-file(whitesow,41.221.251.52): unknown user (SHA1 of given password: 8d6e34)
Sep 23 12:38:29 mail postfix/smtpd[1036]: warning: unknown[41.221.251.52]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Sep 23 12:38:29 mail postfix/smtpd[1036]: lost connection after AUTH from unknown[41.221.251.52]
Sep 23 12:38:29 mail postfix/smtpd[1036]: disconnect from unknown[41.221.251.52]
...

😕

RichardFevrier pushed a commit to RichardFevrier/docker-mailserver that referenced this pull request Aug 26, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants