[MlMt] Regular expressions in rules?
Benny Kjær Nielsen
mailinglist at freron.com
Mon Apr 27 04:53:20 EDT 2015
On 26 Apr 2015, at 16:23, Christian Hopps wrote:
> I’m trying to use the “.” regular expression in my mailbox rules
> to filter spam that uses a symbol rather than the true spelling to
> sneak by normal spam filtering, but I don’t think this is supported
> by default. Is there a way to enable something like this?
No, there is no regexp-comparison method. The only workaround is to, low
level, introduce a new specifier using the regular expression. For
example, such that you could make a condition like “From ▸ Junk
exists”.
For example, save this as `~/Library/Application
Support/MailMate/Resources/specifiers.plist`:
~~~
{
parsers = {
junk = {
headers = ( "from" );
specifierRegex = '(mm-.*@freron\.com)';
specifierCaptures = {
1 = { specifier = "junk"; };
};
};
};
}
~~~
It's cumbersome and not very flexible, but an advantage is that it can
be used everywhere (searches, rules, submailboxes, ...).
--
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20150427/e814e583/attachment.html>
More information about the mailmate
mailing list