-require [ "date", "envelope", "fileinto", "mailbox", "subaddress", "variables" ];
+require [ "envelope", "fileinto", "mailbox", "subaddress", "variables" ];
#if currentdate :matches "year" "*" { set "year" "${1}"; }
#if currentdate :matches "month" "*" { set "month" "${1}"; }
}
}
elsif exists "List-Id" {
- if header :matches "List-Id" "*<*/*.lists.sr.ht>*" {
- if allof (not string :is "${2}" "", not string :is "${3}" "") {
- fileinto :create "Listes+sr.ht+${2}+${3}";
- stop;
- }
+ if allof (header :matches "List-Id" "*<*/*.*.lists.sr.ht>*", not string :is "${2}" "", not string :is "${3}" "", not string :is "${4}" "") {
+ fileinto :create "Listes+sr-ht+${2}+${3}+${4}";
+ stop;
}
- elsif header :matches "List-Id" "*<*.*.*.*>*" {
- if allof (not string :is "${2}" "", not string :is "${3}" "", not string :is "${4}" "") {
- fileinto :create "Listes+${4}+${3}+${2}";
- stop;
- }
+ elsif allof (header :matches "List-Id" "*<*/*.lists.sr.ht>*", not string :is "${2}" "", not string :is "${3}" "") {
+ fileinto :create "Listes+sr-ht+${2}+${3}";
+ stop;
}
- elsif header :matches "List-Id" "*<*.*.*>*" {
- if allof (not string :is "${2}" "", not string :is "${3}" "") {
- fileinto :create "Listes+${3}+${2}";
- stop;
- }
+ elsif allof (header :matches "List-Id" "*<*.*.*.*>*", not string :is "${2}" "", not string :is "${3}" "", not string :is "${4}" "") {
+ fileinto :create "Listes+${4}+${3}+${2}";
+ stop;
+ }
+ elsif allof (header :matches "List-Id" "*<*.*.*>*", not string :is "${2}" "", not string :is "${3}" "") {
+ fileinto :create "Listes+${3}+${2}";
+ stop;
}
-}
-
-if envelope :matches :detail "TO" "*" { set "extension" "${1}"; }
-if not string :is "${extension}" "" {
- fileinto :create "Listes+${extension}";
- stop;
}