fix(PROJ-43): Dry-Run für from_addr/to_addr matcht bare Adressen statt <addr>-Form

dryRunCondition() erwartete faelschlich die Winkelklammer-Form "Name <addr>",
waehrend mail_from/mail_to die Adresse bare speichern - Dry-Run zeigte dadurch
immer 0 Treffer fuer Adress-Regeln, obwohl der Live-Matcher (routeBareAddr)
korrekt matcht. QA-Ergebnisse (Bug-1) in die Feature-Spec uebernommen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sysops
2026-07-04 11:57:21 +02:00
co-authored by Claude Sonnet 5
parent 04e5b0f74a
commit 4c92587b60
4 changed files with 129 additions and 4 deletions
+2 -2
View File
@@ -314,9 +314,9 @@ func dryRunCondition(matchType, pattern string) (cond string, arg string, err er
}
switch matchType {
case RouteMatchFromAddr:
return "LOWER(mail_from) LIKE $1", "%<" + p + ">%", nil
return "LOWER(mail_from) LIKE $1", "%" + p + "%", nil
case RouteMatchToAddr:
return "LOWER(mail_to) LIKE $1", "%<" + p + ">%", nil
return "LOWER(mail_to) LIKE $1", "%" + p + "%", nil
case RouteMatchFromDomain:
return "LOWER(mail_from) LIKE $1", "%@%" + base + "%", nil
case RouteMatchToDomain: