Custom Mailwasher Filters: compare portion of one field to portion of another field

Forum for MailWasher Pro 7 and/or older 2011/2012 versions.
DanAtCCD
Travelling Tuatara
Posts: 26
Joined: Wed Aug 24, 2016 4:39 am

Custom Mailwasher Filters: compare portion of one field to portion of another field

Thu Apr 20, 2017 3:58 am

(This is a continuance of http://forum.firetrust.com/viewtopic.php?p=113033)

We're looking to perform general comparisons of the domain component ONLY of the following 3 fields:
From
X-Sender
Reply-To

We are wanting to increase the Bayesian spam value by 100 every time one of the domain values don't match. So, then, if all 3 fields contain differing domains, then we would be adding 300 (A<>B, A<>C, B<>C).

Please note that we are *NOT* white-listing or black-listing, we need to simply compare everything after the "@" in those addresses. However, we can find no capability for MailWasher spam filtering to compare a partial value from one string against a partial value from a different string.

It was mentioned that REGEX filters can be used to do this, but from what I can see, you can only use a REGEX filter to compare perform a true/false tests against one field (i.e. "Does the REGEX [@(\w+\.)+\w+] match on the From field"), but you can't use a REGEX filter to compare against the results of a different REGEX-determined value (i.e. "Does the REGEX [@(\w+\.)+\w+] value returned from the From field match the REGEX [@(\w+\.)+\w+] value returned from the Reply-To field").

Can someone please assist with some details?
User avatar
rusticdog
Firetrust Monkey
Posts: 15864
Joined: Mon Jun 13, 2005 6:27 pm

Re: Custom Mailwasher Filters: compare portion of one field to portion of another field

Thu Apr 20, 2017 2:46 pm

Unfortunately that's not going to be possible as MailWasher just runs simple expressions over the fields, and cannot compare results.

The guts to put a domain comparison together is all there under the hood, so it's an interesting thought. X headers are a slight complication given they vary across servers though.
DanAtCCD
Travelling Tuatara
Posts: 26
Joined: Wed Aug 24, 2016 4:39 am

Re: Custom Mailwasher Filters: compare portion of one field to portion of another field

Fri Apr 21, 2017 10:59 am

Thanks for the reply. This is exactly the conclusion I had come to, but I had a very experienced user assert that it was do-able, without providing details.

Some other day, with some other version, maybe.

Return to “MailWasher Pro 7”