feat: better sieve script
All checks were successful
Build_Deploy / build (push) Successful in 3m5s
Build_Deploy / linter (push) Successful in 4m56s
Build_Deploy / deploy_dns (push) Successful in 2m15s
Build_Deploy / deploy_active (active) (push) Successful in 4m26s
Build_Deploy / deploy_active (active-ext) (push) Successful in 1m13s
Build_Deploy / deploy_active (active-core) (push) Successful in 33m18s
All checks were successful
Build_Deploy / build (push) Successful in 3m5s
Build_Deploy / linter (push) Successful in 4m56s
Build_Deploy / deploy_dns (push) Successful in 2m15s
Build_Deploy / deploy_active (active) (push) Successful in 4m26s
Build_Deploy / deploy_active (active-ext) (push) Successful in 1m13s
Build_Deploy / deploy_active (active-core) (push) Successful in 33m18s
This commit is contained in:
parent
a7a7b8489a
commit
5e33119b14
1 changed files with 16 additions and 6 deletions
|
@ -106,10 +106,11 @@ with lib; let
|
||||||
require ["fileinto", "reject"];
|
require ["fileinto", "reject"];
|
||||||
require "variables";
|
require "variables";
|
||||||
require "regex";
|
require "regex";
|
||||||
|
require "subaddress";
|
||||||
|
|
||||||
# this should be close to teh last step
|
# this should be close to teh last step
|
||||||
if allof (
|
if allof (
|
||||||
address :localpart ["To", "Cc"] ["${toString create_config_to}"],
|
address :user ["To", "Cc"] ["${toString create_config_to}"],
|
||||||
address :domain ["To", "Cc"] "skynet.ie"
|
address :domain ["To", "Cc"] "skynet.ie"
|
||||||
){
|
){
|
||||||
if address :matches ["To", "Cc"] "*@skynet.ie" {
|
if address :matches ["To", "Cc"] "*@skynet.ie" {
|
||||||
|
@ -118,6 +119,8 @@ with lib; let
|
||||||
fileinto :create "''${1}.Spam_Report";
|
fileinto :create "''${1}.Spam_Report";
|
||||||
stop;
|
stop;
|
||||||
} else {
|
} else {
|
||||||
|
# no detail, proceed normally
|
||||||
|
if address :detail ["To", "Cc"] "" {
|
||||||
if header :is "X-Spam" "Yes" {
|
if header :is "X-Spam" "Yes" {
|
||||||
fileinto :create "''${1}.Junk";
|
fileinto :create "''${1}.Junk";
|
||||||
stop;
|
stop;
|
||||||
|
@ -125,6 +128,13 @@ with lib; let
|
||||||
fileinto :create "''${1}";
|
fileinto :create "''${1}";
|
||||||
stop;
|
stop;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
# user+subdir
|
||||||
|
if address :matches ["To", "Cc"] "*+*@skynet.ie" {
|
||||||
|
fileinto :create "''${1}.''${2}";
|
||||||
|
stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue