Skip to content

Introducing global filters.#934

Merged
johansmitsnl merged 4 commits intodocker-mailserver:masterfrom
17Halbe:sieve
Apr 5, 2018
Merged

Introducing global filters.#934
johansmitsnl merged 4 commits intodocker-mailserver:masterfrom
17Halbe:sieve

Conversation

@17Halbe
Copy link
Copy Markdown
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

@17Halbe
Copy link
Copy Markdown
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)

Comment thread target/dovecot/90-sieve.conf Outdated
# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@17Halbe
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@17Halbe
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants