diff --git a/applications/email.nix b/applications/email.nix index 2129de2..2341952 100644 --- a/applications/email.nix +++ b/applications/email.nix @@ -113,7 +113,11 @@ with lib; let address :domain ["To", "Cc"] "skynet.ie" ){ if address :matches ["To", "Cc"] "*@skynet.ie" { - if header :is "X-Spam" "Yes" { + # handle spam reports specifically for teh service accounts in each users inbox + if address :matches ["From"] "postmaster@mimi.skynet.ie" { + fileinto :create "''${1}.Spam_Report"; + stop; + } else if header :is "X-Spam" "Yes" { fileinto :create "''${1}.Junk"; stop; } else { @@ -122,6 +126,13 @@ with lib; let } } } + + # handle spam Reports for general users + if address :matches ["From"] "postmaster@mimi.skynet.ie" { + fileinto :create "INBOX..Spam_Report"; + stop; + } + if allof ( address :localpart ["From"] ["${toString create_config_to}"], address :domain ["From"] "skynet.ie"