Docker-mailserver: How to create a global sieve filter ? (Spam moving)

Created on 29 Nov 2017  路  3Comments  路  Source: tomav/docker-mailserver

I need help with setting up a sieve filter that runs for every user, how to do that ?

Why does the container delete spam by default ? I missed some important mails because of that (false positive). The log shows they hit a score of 8 and got rejected.

I now configured Spam handling the following way:

  • Setting env SA_KILL to 1000 which prevents blocking / deletion of spam mails.
  • Running docker exec -it mail sed -i 's/mailbox Junk {/mailbox Spam {\n auto = subscribe/g' /etc/dovecot/conf.d/15-mailboxes.conf
    which will create the Spam folder for every User automatically and marks it as Junk
  • setting up a sieve filter for every users to move Spam into the Spam folder
    cat << 'EOF' > /srv/mail/config/[email protected]
    require "fileinto";
    if header :contains "X-Spam-Flag" "YES" {
    fileinto "Spam";
    }
    EOF

However i would prefer to just create 1 Sieve filter which gets applied to all Users. That should be possible but i don't know how. Could somebody please help me with it, thanks.

help wanted

Most helpful comment

I think it would be a good idea to not delete anything by default, simply mark as spam without deleting.

I potentially lost important mail due to false positives on initial setup

All 3 comments

It it gets over the kill level it deletes the email. If it is below but also spam it gets in je Junk folder.
This is default.

I think it would be a good idea to not delete anything by default, simply mark as spam without deleting.

I potentially lost important mail due to false positives on initial setup

Solution at #795

Was this page helpful?
0 / 5 - 0 ratings

Related issues

landergate picture landergate  路  4Comments

alen12345 picture alen12345  路  4Comments

cottonthread picture cottonthread  路  4Comments

strarsis picture strarsis  路  5Comments

nicklayb picture nicklayb  路  4Comments