Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing global filters. #934

Merged
merged 4 commits into from
Apr 5, 2018
Merged

Conversation

17Halbe
Copy link
Contributor

@17Halbe 17Halbe commented Apr 4, 2018

On my way to getting spam handling done. This was part of PR #835 but should be handled as a separate PR I think.
This introduces the optional global sieve files after.dovecot.sieve/before.dovecot.sieve which apply to every incoming email. They are executed before and after any user specific {user}.dovecot.sieve filter would be applied.

Wiki entry will follow once accepted.

  • added optional after.dovecot.sieve/before.dovecot.sieve files
  • added global filter test

- added optional after.dovecot.sieve/before.dovecot.sieve files
- added global filter test
@17Halbe
Copy link
Contributor Author

17Halbe commented Apr 4, 2018

tests are succeeding on my end. (Except the checking setup.sh: setup.sh email add test, which shouldn't be affected)

@@ -31,14 +31,14 @@ plugin {
# executed. The order of execution within a directory is determined by the
# file names, using a normal 8bit per-character comparison. Multiple script
# file or directory paths can be specified by appending an increasing number.
#sieve_before =
sieve_before = /usr/lib/dovecot/sieve-global/before.dovecot.sieve
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this fail when no file it copied in the start-mailserver.sh?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was afraid of that as well. I couldn't find anything in the Docs though(It just states, that it's safe to not have any files in a directory when configuring a directory as a target) and just ran the tests with it. Dovecot wasn't complaining(the after.dovecot.sieve file doesn't exist during the tests) so I basically forgot about it.
Do you think we should take the safer route and comment those lines out, when not used?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it is safer indeed, if you could change it I can merge the request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me check again..

@johansmitsnl
Copy link
Contributor

About test 130 something broke this test, you have any idea why?

@17Halbe
Copy link
Contributor Author

17Halbe commented Apr 4, 2018

This is the test from the #914 PR, where I already had my problems with it. I ended up inserting a 30 sec sleep before commencing the test. It was enough to get it running once.
I'll move the addmailuser command to the Makefile.

@johansmitsnl
Copy link
Contributor

@17Halbe ok, did you also saw my comment on your change?

@17Halbe
Copy link
Contributor Author

17Halbe commented Apr 4, 2018

Yeah, I'm just too slow in answering it! ;)

@johansmitsnl johansmitsnl merged commit cc7c1f8 into docker-mailserver:master Apr 5, 2018
@johansmitsnl
Copy link
Contributor

Thanks!

johansmitsnl added a commit that referenced this pull request Apr 23, 2018
Release 6.0.0

* Implementation of multi-domain relay hosts (#922, #926)
  AWS_SES_HOST and AWS_SES_PORT are deprecated now.
  RELAY_HOST and RELAY_PORT are introduced to replace them.
* Password creation fix (#908, #914)
* Fixes 'duplicate log entry for /var/log/mail/mail.log' (#925, #927)
* fixed cleanup (mail_with_relays didn't get cleaned up) (#930)
* fix line breaks in postfix-summary mail error case (#936)
* Set default virus delete time (#932, #935)
  This defaults to 7 days
* Ensure that the account contains a @ (#923, #924)
* Introducing global filters. (#934)
* add missing env vars to docker-compose.yml (#937)
* set postmaster address to a sensible default (#938, #939,  #940)
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.

None yet

2 participants