diff --git a/config/mail/rspamd/ecloud/blacklist.sender.domain.map b/config/mail/rspamd/ecloud/blacklist.sender.domain.map new file mode 100644 index 0000000000000000000000000000000000000000..50f127510cf3cdcbdebf2f9b5d62e080f49519ae --- /dev/null +++ b/config/mail/rspamd/ecloud/blacklist.sender.domain.map @@ -0,0 +1 @@ +# Blacklisted sender domains, one per line diff --git a/config/mail/rspamd/multimap.conf b/config/mail/rspamd/multimap.conf index cb8ca45ad9683b157c069902317ec5e2dc90d0fc..5483e9a7f5630d835568827dffd264ff258600fd 100644 --- a/config/mail/rspamd/multimap.conf +++ b/config/mail/rspamd/multimap.conf @@ -1,6 +1,13 @@ WHITELIST_SENDER_DOMAIN { type = "from"; filter = "email:domain"; - map = "/etc/rspamd/local.d/whitelist.sender.domain.map"; + map = "/etc/rspamd/local.d/ecloud/whitelist.sender.domain.map"; score = -6.0 } + +BLACKLIST_SENDER_DOMAIN { + type = "from"; + filter = "email:domain"; + map = "/etc/rspamd/local.d/ecloud/blacklist.sender.domain.map"; + score = 99.0 +} diff --git a/scripts/init-repo.sh b/scripts/init-repo.sh index 0e81f2ac5772746383b333313aae5a867e73755a..d4bbbdc4bcbf40a74bb09fdfb1f7f8ed0e7429c7 100755 --- a/scripts/init-repo.sh +++ b/scripts/init-repo.sh @@ -83,7 +83,11 @@ cat templates/automx/automx.conf | sed "s/@@@DOMAIN@@@/$DOMAIN/g" > "config/auto chown www-data:www-data "config/automx/automx.conf" # Configure rspamd whitelist -cat templates/mail/rspamd/whitelist.sender.domain.map | sed "s/@@@DOMAIN@@@/$DOMAIN/g" > "config/mail/rspamd/whitelist.sender.domain.map" +cat templates/mail/rspamd/ecloud/whitelist.sender.domain.map | sed "s/@@@DOMAIN@@@/$DOMAIN/g" > "config/mail/rspamd/ecloud/whitelist.sender.domain.map" + +# Allow white/black lists editing +chown -R 107:109 "config/mail/rspamd/ecloud/" + # Configure nginx vhost diff --git a/templates/docker-compose/docker-compose.yml b/templates/docker-compose/docker-compose.yml index aae05aacbab9eb84ddde56207fe641c28e7a47e0..d049c891cb810746d5a7a1cc928653675e9c59c2 100644 --- a/templates/docker-compose/docker-compose.yml +++ b/templates/docker-compose/docker-compose.yml @@ -33,7 +33,7 @@ services: - /mnt/repo-base/config/mail/dovecot/90-quota.conf:/etc/dovecot/conf.d/90-quota.conf - /mnt/repo-base/config/mail/dovecot/90-sieve.conf:/etc/dovecot/conf.d/90-sieve.conf - /mnt/repo-base/config/mail/rspamd/multimap.conf:/etc/rspamd/local.d/multimap.conf - - /mnt/repo-base/config/mail/rspamd/whitelist.sender.domain.map:/etc/rspamd/local.d/whitelist.sender.domain.map + - /mnt/repo-base/config/mail/rspamd/ecloud:/etc/rspamd/local.d/ecloud - /mnt/repo-base/config/mail/rspamd/ratelimit.conf:/etc/rspamd/local.d/ratelimit.conf - /mnt/repo-base/config/mail/clamav/freshclam.conf:/etc/clamav/freshclam.conf depends_on: diff --git a/templates/mail/rspamd/ecloud/whitelist.sender.domain.map b/templates/mail/rspamd/ecloud/whitelist.sender.domain.map new file mode 100644 index 0000000000000000000000000000000000000000..87b60c4f6f55b1606215940a76e2af6f39ef4da6 --- /dev/null +++ b/templates/mail/rspamd/ecloud/whitelist.sender.domain.map @@ -0,0 +1 @@ +@@@DOMAIN@@@ diff --git a/templates/mail/rspamd/whitelist.sender.domain.map b/templates/mail/rspamd/whitelist.sender.domain.map deleted file mode 100644 index 2eb784dff7a7dad8882c6b71107a4f65cfd985a9..0000000000000000000000000000000000000000 --- a/templates/mail/rspamd/whitelist.sender.domain.map +++ /dev/null @@ -1 +0,0 @@ -@@@DOMAIN@@@ \ No newline at end of file