Make filters understand ReGex or at least wild cards?

Discussion of features in Mozilla Thunderbird
Post Reply
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Make filters understand ReGex or at least wild cards?

Post by Vano »

Hello!
Is there a way we could use Regular Expressions or at least wild cards ( *, ? ) in filters?

Thank you.

[EDIT]
I see by default there is no support for it (http://kb.mozillazine.org/Filters_(Thunderbird)), but maybe there is a way?
User avatar
PAStheLoD
Posts: 18
Joined: May 6th, 2005, 7:16 am
Location: hungary
Contact:

Post by PAStheLoD »

Maybe using extensions?

Anyhow, this is a very handy feature, should be in TB.
Peva
Posts: 271
Joined: September 6th, 2004, 7:48 pm

Post by Peva »

There is an active bug file on this, but it may never get done.

Realizing that reality, at the suggestion of several here during my several whiny posts about this deficiency in TB, I very recently bit the bullet and invested a couple of days in installing the SpamPal proxy, activating the included RegExFilter plugin, and reading enough of the RegExFilter manual to add just two of my own very powerful regular expression filter lines in the rule file. The RegExFilter plugin adds the regular expressions filtering that adds tagging headers that you define upon which you can build some very powerful filters in TB.

I've been reluctant to take this step (adding a DNSRBL proxy with regular expressions filter plugin), and put off doing the inevitable for a long time, but all I can say is WOW! Very effective and powerful. My manual scanning of a multi-thousand mail-a-day company catchall account is now a piece of cake. The number of false negs. I have to visually look at now in a day I can count on both hands (had previously grown to several hundred a day due to more subtle methods of the spamscum).

BTW - that is one freaky avatar.
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Post by SK. »

I'm not sure why the specific call for wild cards. The filters do support the "contains" expression, which is the equivalent of wild cards in the sense that a filter using "*whatever*" (the word whatever surrounded by two "*" wild cards) is no different than Thunderbird's implementation of [contains] [whatever].

I understand the vast difference between inserting a ? wild card and the example I have posed, as well as the power of being able to use multiple wild cards in filters. However, I think that the vast majority of users of Thunderbird (indeed, the vast majority of Internet denizens) are not only unfamiliar with how to use wild cards, but what they are. In addition, regular expressions are a few notches above in the technical expertise required to make them work correctly.

Does all of this mean that we should not have have regular expressions or wild cards in Thunderbird filters? Of course not. It simply means that features more meaningful to the many more users are those being actively coded.

Peva - you raise an excellent point about plug-ins and extensions. That is where Thunderbird really excels. For those specialized functions and features, extensions can be created that do more than I can keep up with. Every time I browse the "official" list, I see intriguing extensions I really should try. Someday. :)

And, yes, that avatar is one of the most disturbing I have ever seen in these forums - and I've been a moderator since late 2004.
John 3:16 and Philippians 4:13
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Post by Vano »

Yes, you are right, majority of the users will never need this feature, however, for some this would be very useful.
In my case, I need this to better organize my emails. My email server allows me create unlimited aliases for my email address (emails sent to an alias will be forwarded to the original address). With importunity like that I create an unique alias for each person/site/etc who can contact me. Using this method allows me 100% detect where the spam (if any) originated from, because nobody knows my "real" email address.
Furthermore, I organize the aliases by adding a category keyword (fromfriendname@example.com - friends category or fromshoppingname@example.com - shopping category). Now, having these categories in aliases would be nice have incoming email be placed in the appropriate category folder under my inbox, that's where the ReGex or at least wild cards needed.
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Post by SK. »

I clearly understand your high-end needs. The point I was trying to make is that Thunderbird's developers - as with every other application - are developing for the majority of their current and potential users. That is why the most likely route to a solution for you would be an extension.
John 3:16 and Philippians 4:13
User avatar
Vano
Posts: 403
Joined: December 26th, 2007, 8:21 pm

Post by Vano »

Thanks, as long its possible with an extension, I'm cool with that :)
User avatar
SK.
Moderator
Posts: 20814
Joined: October 18th, 2007, 1:28 pm
Location: Third Rock From The Sun
Contact:

Post by SK. »

Careful. I didn't say it was possible (I cannot tell you whether or not it is possible), I only said it was the most likely route to a solution for you. There's a big difference. :)
John 3:16 and Philippians 4:13
gworley
Posts: 17
Joined: January 16th, 2005, 12:26 am

Re: Make filters understand ReGex or at least wild cards?

Post by gworley »

I am going to revive an old tread. There is a very big reason for this. Lately I have been getting 200 to 300 messages a day that the From and the To have my email address so I cannot mark them as spam as they would mark everything is spam... learned this the hard way.

From: Approved VIAGRA@ Store (my email address is hidden)
To: my email address
Subject: Personal 79% off.

The 79% keeps changing so I keep having to create new filter rules to delete the very same message. The only thing that seems consistent that is the "Approved VIAGRA" but you cannot filter on Display Name either.
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Re: Make filters understand ReGex or at least wild cards?

Post by makaiguy »

How about filtering for:

(•) Match all of the following
[Subject] [contains] [Personal] +
[Subject] [contains] [% off]
Doug Wilson
Win10 64bit: FF 115.0.02 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 115.2.0/115.0.1 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
jonsg
Posts: 2
Joined: September 23rd, 2010, 6:28 am

Re: Make filters understand ReGex or at least wild cards?

Post by jonsg »

Bump. To answer the critics who say "Use Bayesian filters" (they're crap and don't work, however much I train them) or "The filters are perfectly adequate as they are," let me give you a use case that disproves it:

We're getting a lot of spams to random addresses that consist of a string of alphas, then a string of numerics, then @(domain-name). We don't issue addresses in that form; equally, we use a third party mail server on which we don't have wildcard spam-killer facilities. I'm getting fed up with having to weed them out of the "unrecognised email address" bin in order to find genuine mis-spelled addresses that might mean money.

I'd like to construct a rule like "To: CONTAINS {[a-z]+[0-9]+}@(domain-name)" rather than ten like "To: CONTAINS 0@ /OR/ To: CONTAINS: 1: /OR/ [...]" - particularly because when the spams change their format, as they do regularly, I'm having to do a lot of work to overcome what should be a relatively simple bit of functionality in T-bird.

I don't understand what the problem is with simply implementing it, rather than expending a lot of energy saying, "You're the hundredth person I've told today - there's no demand for it!"
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Make filters understand ReGex or at least wild cards?

Post by tanstaafl »

Install the FiltaQuilla extension. See the Header Regex Match and Javascript Action / Javascript Action (with body) sections on the authors web page.
Post Reply