Filters and wildcards

Forum for MailWasher Pro 7 and/or older 2011/2012 versions.
deaded
Rattled Rabbit
Posts: 3
Joined: Tue May 26, 2009 5:32 pm

Filters and wildcards

Mon Aug 02, 2010 4:40 pm

Are there windcards for filters?

Here is my problem. I have a domain, call it domain.com. Mailwasher does a good job at weeding out the spam to me, me@domain.com, but I get a ton of stuff for you@domain.com, frank@domain.com, john@domain.com, etc... I'd like to tell mailwasher to delete everything that has 'domain.com' in the To: field, but does not contain me@domain.com, us@domain.com, and them.domain.com. I don't want to tell it to delete everything that doesn't have those three email addresses because sometimes i'm in a blind cc or something, but I want it to look and see if it's addressed to anything at domain.com and if it's not me, us, or them, then delete it.

I tried
"all must be true"
if "To:" contains *@domain.com
and
if "To:" does not contain me@domain.com
and
if "To:" does not contain us@domain.com
and
if "To:" does not contain them@domain.com
...then delete

that did not work.

any suggestions?
User avatar
stan_qaz
Omniscient Kiwi
Location: Gilbert, Arizona
Posts: 8671
Joined: Fri Jul 25, 2008 5:13 am

Re: Filters and wildcards

Mon Aug 02, 2010 5:04 pm

You need to use regular expressions, take a look at this topic for a starter, the to-me and not-to-me filters might help:

http://forum.firetrust.com/viewtopic.php?f=50&t=5575
I am not a Firetrust employee just a MW user.
--
First rule of computer consulting: Sell a customer a Linux computer and you'll eat for a day,
sell a customer a Windows computer and you'll eat for a lifetime.
User avatar
anniebrion
βeta Tester
Contact:
Location: Milkyway, Sol, Earth, UK, London
Posts: 3222
Joined: Thu Nov 05, 2009 10:39 am

Re: Filters and wildcards

Mon Aug 02, 2010 8:18 pm

"all must be true"
if "To:" contains @domain.com
and
if "To:" does not contain me@domain.com
and
if "To:" does not contain us@domain.com
and
if "To:" does not contain them@domain.com
...then delete

You just needed to remove the * from the first rule :)

But as Stan says, regex is extremely powerful and well worth learning :)
Annie.......... PC details
Mailwasher Pro βeta [v 7.12.39]
deaded
Rattled Rabbit
Posts: 3
Joined: Tue May 26, 2009 5:32 pm

Re: Filters and wildcards

Mon Aug 02, 2010 8:48 pm

Thanks for the replies. I will read that thread, check out regex, and in the mean time remove the star.

So there are no wildcards for the regular rules in the filter?
User avatar
anniebrion
βeta Tester
Contact:
Location: Milkyway, Sol, Earth, UK, London
Posts: 3222
Joined: Thu Nov 05, 2009 10:39 am

Re: Filters and wildcards

Mon Aug 02, 2010 8:55 pm

Contains is an implied wildcard ie @domain is the same as *@domain*

regex is the way to go:

Code: Select all

(^|<|\x20).+@domain\.com\b
(^|<|\x20) = Start of line or < or space, to find the start of the email address.
.+ = 1 or more characters.
\. = .
\b = Word boundry, find the end of the address.
Annie.......... PC details
Mailwasher Pro βeta [v 7.12.39]
User avatar
stan_qaz
Omniscient Kiwi
Location: Gilbert, Arizona
Posts: 8671
Joined: Fri Jul 25, 2008 5:13 am

Re: Filters and wildcards

Tue Aug 03, 2010 8:07 am

deaded wrote:So there are no wildcards for the regular rules in the filter?
Right, in plain text mode every letter is just a letter, to get wildcards you switch to regex mode. Wildcards in regex are as simple as . and * but have many other options and much better control.
I am not a Firetrust employee just a MW user.
--
First rule of computer consulting: Sell a customer a Linux computer and you'll eat for a day,
sell a customer a Windows computer and you'll eat for a lifetime.

Return to “MailWasher Pro 7”