quickFilters icon indicating copy to clipboard operation
quickFilters copied to clipboard

Is there a way to pattern match the Reply To field?

Open infinitelyintrigued opened this issue 1 year ago • 8 comments

I would like to create a regex message filter that matches the message's Reply-To field. Can this be done?

infinitelyintrigued avatar Aug 22 '23 23:08 infinitelyintrigued

I was about to say yes quickly, thinking you can achieve this in conjunction with my Add-on FiltaQuilla, it has a number of regex options; but it seems there is no regex option for address fields specifically.

This may be something I might add to quickFilters as premium function for Pro users would you be interested?

However there is a generic way to regex match any text field:

image

I tested it for you, something like this should work:

Header Regex Match matches replyTo:/.*(test).*/

Here is a successful test I did, using a pattern to match a replyTo that contains a hash followed by a set of numbers (e.g. #2000)

image

RealRaven2000 avatar Aug 23 '23 10:08 RealRaven2000

PS: it seems the documentation at https://quickfilters.quickfolders.org/filtaquilla.html#header_regex is missing the entry for replyTo, so I am going to add that to the page now.

RealRaven2000 avatar Aug 23 '23 10:08 RealRaven2000

Hi, the sample filter does work. However, I'm having trouble matching specific email addresses. I'm doing something like this:

replyTo:/(bob|sue|tom|mary)@example.com/i

However, this works for the sender field. sender:/(bob|sue|tom|mary)@example.com/i

Yes, I'd be interested in seeing it for Pro users.

infinitelyintrigued avatar Aug 24 '23 02:08 infinitelyintrigued

  • Try without the /i first. There is a global case sensitivity switch in FiltaQuilla settings.

  • Test it at https://regex101.com/ and make sure the entire contents of the from field matches.

  • in case there are additional characters around / before the email, i would try:

/.*(bob|sue|tom|mary)@example\.com.?/

this will match Bobby Fischer <[email protected]> As well as [email protected]

RealRaven2000 avatar Aug 24 '23 05:08 RealRaven2000

Slightly improved version:

/(.*\W)?(bob|sue|tom|mary)@example\.com.?/

to avoid matching [email protected]

RealRaven2000 avatar Aug 24 '23 06:08 RealRaven2000

Hmm. The suggested filters do not work.

I looked at the Reply-To section of the message source of one of the messages I wanted to filter. It looked like this.

Reply-To: [email protected]

infinitelyintrigued avatar Aug 25 '23 11:08 infinitelyintrigued

Hmm. The suggested filters do not work.

I looked at the Reply-To section of the message source of one of the messages I wanted to filter. It looked like this.

Reply-To: [email protected]

I don't know what's happening, the only way I could find out by importing your filter, (using quickFilters Pro) you can export it like this:

  • select the filter
  • hold down CTRL and click the Backup Filters... button. this will create a json file

image

You can also export the test email via Thunderbird File menu (as eml file, please)

image

RealRaven2000 avatar Aug 25 '23 12:08 RealRaven2000

I found that this issue only occurs to messages when they are sent from one particular system I use. I was successfully able to apply your replyTo filter to other messages from other systems. I guess I will live with it. Thank you.

infinitelyintrigued avatar Aug 28 '23 22:08 infinitelyintrigued