mail: Configure global anti-spam sieve
This commit is contained in:
parent
b482bd34a6
commit
71ba9ba18c
1 changed files with 20 additions and 0 deletions
|
@ -86,6 +86,26 @@ in
|
||||||
dkimKeyDirectory = "${config.chvp.dataPrefix}/var/dkim";
|
dkimKeyDirectory = "${config.chvp.dataPrefix}/var/dkim";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.dovecot2.sieveScripts = {
|
||||||
|
after2 = pkgs.writeText "custom-spam.sieve" ''
|
||||||
|
require ["fileinto", "regex"];
|
||||||
|
|
||||||
|
if anyof(address :is "From" ["junjunggaming07@gmail.com",
|
||||||
|
"censysnetbackup@gmail.com",
|
||||||
|
"vitor.carvalheiro@escola.pr.gov.br",
|
||||||
|
"spam@vuztc.ru",
|
||||||
|
# itsme spam
|
||||||
|
"noreply.mailing.itsme@online.be",
|
||||||
|
"mailing.itsme@online.be"],
|
||||||
|
# Freshdesk is often used to sent spam from emails like `support@info5813.freshdesk.com`
|
||||||
|
address :regex "From" "[a-z\d]+@[a-z\d]+\.freshdesk\.com",
|
||||||
|
header :contains "From" ["jakubbielec", "Jakub Bielec"]) {
|
||||||
|
fileinto "Junk";
|
||||||
|
stop;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.rspamd.extraConfig = ''
|
services.rspamd.extraConfig = ''
|
||||||
actions {
|
actions {
|
||||||
reject = null;
|
reject = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue