Feature: extended filter rules — attachment field + multi-value conditions

Adds an "Attachment" condition field (is present / of type <ext>) backed by
the RFC 5703 Sieve mime extension, matching the filename in both
Content-Disposition and Content-Type headers so real-world senders that only
put the name in Content-Type (Microsoft SMTPSVC, etc.) are caught. Users type
extensions (pdf, doc) not MIME types.

Also makes each text condition accept comma-separated multiple values emitted
as a Sieve string list (OR within the condition), so "(domain1 OR domain2)
AND attachment pdf/xml" is expressible in one rule. value is now string |
string[] (single-value rules stay strings -> backward compatible). New filter
locale keys in all 17 locales.
This commit is contained in:
dealerweb
2026-05-30 15:45:33 +02:00
committed by Linus Rath
parent 229992853b
commit 8353b28b33
22 changed files with 431 additions and 64 deletions
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Akce",
"add_action": "Přidat akci",
"stop_processing": "Zastavit zpracování dalších pravidel",
"attachment_type_placeholder": "např. pdf, doc, jpg",
"value_placeholder_multi": "Hodnota (více oddělených čárkami)",
"condition_fields": {
"attachment": "Příloha",
"from": "Od",
"to": "Komu",
"cc": "Kopie",
@@ -1642,6 +1645,8 @@
"body": "Tělo zprávy"
},
"comparators": {
"has_any": "je přítomna",
"has_type": "typu",
"contains": "obsahuje",
"not_contains": "neobsahuje",
"is": "je přesně",
+5
View File
@@ -1633,7 +1633,10 @@
"actions": "Handlinger",
"add_action": "Tilføj handling",
"stop_processing": "Stop behandling af efterfølgende regler",
"attachment_type_placeholder": "f.eks. pdf, doc, jpg",
"value_placeholder_multi": "Værdi (flere adskilt med komma)",
"condition_fields": {
"attachment": "Vedhæftet fil",
"from": "Fra",
"to": "Til",
"cc": "Cc",
@@ -1643,6 +1646,8 @@
"body": "Brødtekst"
},
"comparators": {
"has_any": "er til stede",
"has_type": "af typen",
"contains": "indeholder",
"not_contains": "indeholder ikke",
"is": "er præcis",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Aktionen",
"add_action": "Aktion hinzufügen",
"stop_processing": "Verarbeitung nachfolgender Regeln stoppen",
"attachment_type_placeholder": "z.B. pdf, doc, jpg",
"value_placeholder_multi": "Wert (mehrere mit Komma trennen)",
"condition_fields": {
"attachment": "Anhang",
"from": "Von",
"to": "An",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Nachrichtentext"
},
"comparators": {
"has_any": "vorhanden",
"has_type": "vom Typ",
"contains": "enthält",
"not_contains": "enthält nicht",
"is": "ist genau",
+5
View File
@@ -1633,7 +1633,10 @@
"actions": "Actions",
"add_action": "Add Action",
"stop_processing": "Stop processing subsequent rules",
"attachment_type_placeholder": "e.g. pdf, doc, jpg",
"value_placeholder_multi": "Value (multiple separated by commas)",
"condition_fields": {
"attachment": "Attachment",
"from": "From",
"to": "To",
"cc": "Cc",
@@ -1643,6 +1646,8 @@
"body": "Body"
},
"comparators": {
"has_any": "is present",
"has_type": "of type",
"contains": "contains",
"not_contains": "does not contain",
"is": "is exactly",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Acciones",
"add_action": "Agregar acción",
"stop_processing": "Detener el procesamiento de reglas posteriores",
"attachment_type_placeholder": "p. ej. pdf, doc, jpg",
"value_placeholder_multi": "Valor (varios separados por comas)",
"condition_fields": {
"attachment": "Adjunto",
"from": "De",
"to": "Para",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Cuerpo"
},
"comparators": {
"has_any": "está presente",
"has_type": "del tipo",
"contains": "contiene",
"not_contains": "no contiene",
"is": "es exactamente",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Actions",
"add_action": "Ajouter une action",
"stop_processing": "Arrêter le traitement des règles suivantes",
"attachment_type_placeholder": "p. ex. pdf, doc, jpg",
"value_placeholder_multi": "Valeur (plusieurs séparées par des virgules)",
"condition_fields": {
"attachment": "Pièce jointe",
"from": "De",
"to": "À",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Corps"
},
"comparators": {
"has_any": "est présent",
"has_type": "de type",
"contains": "contient",
"not_contains": "ne contient pas",
"is": "est exactement",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Azioni",
"add_action": "Aggiungi azione",
"stop_processing": "Interrompere l'elaborazione delle regole successive",
"attachment_type_placeholder": "es. pdf, doc, jpg",
"value_placeholder_multi": "Valore (più valori separati da virgole)",
"condition_fields": {
"attachment": "Allegato",
"from": "Da",
"to": "A",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Corpo"
},
"comparators": {
"has_any": "è presente",
"has_type": "di tipo",
"contains": "contiene",
"not_contains": "non contiene",
"is": "è esattamente",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "アクション",
"add_action": "アクションを追加",
"stop_processing": "以降のルールの処理を停止",
"attachment_type_placeholder": "例: pdf, doc, jpg",
"value_placeholder_multi": "値(カンマで複数指定可)",
"condition_fields": {
"attachment": "添付ファイル",
"from": "差出人",
"to": "宛先",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "本文"
},
"comparators": {
"has_any": "あり",
"has_type": "タイプ",
"contains": "を含む",
"not_contains": "を含まない",
"is": "と完全一致",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "동작",
"add_action": "동작 추가",
"stop_processing": "이후 규칙 무시하기",
"attachment_type_placeholder": "예: pdf, doc, jpg",
"value_placeholder_multi": "값 (쉼표로 여러 개 구분)",
"condition_fields": {
"attachment": "첨부 파일",
"from": "보낸 사람",
"to": "받는 사람",
"cc": "참조",
@@ -1642,6 +1645,8 @@
"body": "본문"
},
"comparators": {
"has_any": "있음",
"has_type": "유형",
"contains": "포함함",
"not_contains": "포함하지 않음",
"is": "정확히 일치",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Darbības",
"add_action": "Pievienot darbību",
"stop_processing": "Pārtraukt nākamo noteikumu apstrādi",
"attachment_type_placeholder": "piem. pdf, doc, jpg",
"value_placeholder_multi": "Vērtība (vairākas atdalītas ar komatu)",
"condition_fields": {
"attachment": "Pielikums",
"from": "No",
"to": "Kam",
"cc": "Kopija",
@@ -1642,6 +1645,8 @@
"body": "Teksts"
},
"comparators": {
"has_any": "ir klāt",
"has_type": "tipa",
"contains": "satur",
"not_contains": "nesatur",
"is": "precīzi sakrīt",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Acties",
"add_action": "Actie toevoegen",
"stop_processing": "Verwerking van volgende regels stoppen",
"attachment_type_placeholder": "bijv. pdf, doc, jpg",
"value_placeholder_multi": "Waarde (meerdere met komma's gescheiden)",
"condition_fields": {
"attachment": "Bijlage",
"from": "Van",
"to": "Aan",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Inhoud"
},
"comparators": {
"has_any": "aanwezig",
"has_type": "van type",
"contains": "bevat",
"not_contains": "bevat niet",
"is": "is precies",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Akcje",
"add_action": "Dodaj akcję",
"stop_processing": "Zatrzymaj przetwarzanie kolejnych reguł",
"attachment_type_placeholder": "np. pdf, doc, jpg",
"value_placeholder_multi": "Wartość (kilka oddzielonych przecinkami)",
"condition_fields": {
"attachment": "Załącznik",
"from": "Od",
"to": "Do",
"cc": "DW",
@@ -1642,6 +1645,8 @@
"body": "Treść"
},
"comparators": {
"has_any": "jest obecny",
"has_type": "typu",
"contains": "zawiera",
"not_contains": "nie zawiera",
"is": "jest dokładnie",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Ações",
"add_action": "Adicionar ação",
"stop_processing": "Parar o processamento das regras seguintes",
"attachment_type_placeholder": "ex.: pdf, doc, jpg",
"value_placeholder_multi": "Valor (vários separados por vírgulas)",
"condition_fields": {
"attachment": "Anexo",
"from": "De",
"to": "Para",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Corpo"
},
"comparators": {
"has_any": "está presente",
"has_type": "do tipo",
"contains": "contém",
"not_contains": "não contém",
"is": "é exatamente",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Действия",
"add_action": "Добавить действие",
"stop_processing": "Прекратить обработку последующих правил",
"attachment_type_placeholder": "напр. pdf, doc, jpg",
"value_placeholder_multi": "Значение (несколько через запятую)",
"condition_fields": {
"attachment": "Вложение",
"from": "От",
"to": "Кому",
"cc": "Копия",
@@ -1642,6 +1645,8 @@
"body": "Тело"
},
"comparators": {
"has_any": "присутствует",
"has_type": "типа",
"contains": "содержит",
"not_contains": "не содержит",
"is": "точно совпадает",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "İşlemler",
"add_action": "İşlem Ekle",
"stop_processing": "Sonraki kuralları işlemeyi durdur",
"attachment_type_placeholder": "örn. pdf, doc, jpg",
"value_placeholder_multi": "Değer (birden fazla virgülle ayrılır)",
"condition_fields": {
"attachment": "Ek",
"from": "Kimden",
"to": "Kime",
"cc": "Bilgi",
@@ -1642,6 +1645,8 @@
"body": "Gövde"
},
"comparators": {
"has_any": "mevcut",
"has_type": "türünde",
"contains": "içerir",
"not_contains": "içermez",
"is": "tam olarak",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "Дії",
"add_action": "Додати дію",
"stop_processing": "Зупинити обробку наступних правил",
"attachment_type_placeholder": "напр. pdf, doc, jpg",
"value_placeholder_multi": "Значення (декілька через кому)",
"condition_fields": {
"attachment": "Вкладення",
"from": "Від",
"to": "до",
"cc": "Cc",
@@ -1642,6 +1645,8 @@
"body": "Тіло"
},
"comparators": {
"has_any": "присутнє",
"has_type": "типу",
"contains": "містить",
"not_contains": "не містить",
"is": "точно",
+5
View File
@@ -1632,7 +1632,10 @@
"actions": "操作",
"add_action": "添加操作",
"stop_processing": "停止处理后续规则",
"attachment_type_placeholder": "例如:pdf、doc、jpg",
"value_placeholder_multi": "值(多个用逗号分隔)",
"condition_fields": {
"attachment": "附件",
"from": "发件人",
"to": "收件人",
"cc": "抄送",
@@ -1642,6 +1645,8 @@
"body": "正文"
},
"comparators": {
"has_any": "存在",
"has_type": "类型为",
"contains": "包含",
"not_contains": "不包含",
"is": "等于",