Postmaster filter needs some kind of preview/testing feature

I’m currently trying to write a postmaster filter with rather complex anchored regexes:

From: contains: regex:^no-reply@inwx.(de|com)$
Subject: contains: regex:(^Ankündigung SEPA-Lastschrifteinzug$|^Verlängerungsbericht vom |^Ihr Guthabenkonto wurde aktualisiert$|^Neue Rechnung verfügbar$|^DOMAIN \S+ (RENEWAL SUCCESSFUL|UPDATE SUCCESSFUL|UPDATE FAILED)$)

Unsurprisingly, it doesn’t work ^^

I’m not even certain yet how the From match actually works. Does it match the complete From header (Name <addr@domain>), or only the address part (addr@domain)? I had assumed the latter, but I’m now starting to believe it’s the former. Maybe multiple fields might be helpful here:

  • From (complete header)
  • From (only name)
  • From (only address)

Well, anyway, some kind of preview or testing feature would be really helpful here to figure out whether my filter is actually working or not, without having to wait for the next mail :slight_smile:

This is probably not as easy to implement as the ticket list previews as the postmaster filter operates on raw mails, so it’s not a simple database lookup. Maybe just give the admin the option to choose one or multiple ticket articles, and the filter will say whether the article(s) match or don’t.

1 Like

I tested it, and Zammad does match the complete header. I went ahead and improved the documentation a bit: channels-email.rst: improved postmaster filter desc by martinvonwittich · Pull Request #16 · zammad/zammad-admin-documentation · GitHub

This topic was automatically closed after 416 days. New replies are no longer allowed.