email: handle junk mails better

This commit is contained in:
silver 2023-10-24 18:53:06 +01:00
parent d2ece41ace
commit bb346e294f

View file

@ -111,7 +111,12 @@ with lib; let
address :domain ["To"] "skynet.ie" address :domain ["To"] "skynet.ie"
){ ){
if address :matches ["To"] "*@skynet.ie" { if address :matches ["To"] "*@skynet.ie" {
fileinto :create "''${1}"; if header :is "X-Spam" "Yes" {
fileinto :create "''${1}.Junk";
stop;
} else {
fileinto :create "''${1}";
}
} }
} }
''; '';