Filtering
Reported by Steve H | March 31st, 2011 @ 08:09 AM
Hi.
I've just started using MailMate and am very impressed with it. I just wondered whether there are any plans to introduce filtering into the application?
Steve
Comments and changes to this ticket
-
benny March 31st, 2011 @ 12:42 PM
- State changed from new to accepted
- Assigned user set to benny
Yes, it definitely is, but I cannot give you a time frame.
If you do not mind a low-level (experimental) solution for now then it is possible to do filtering using disk-based files. Let me know if this has any interest.
The encouraged workflow in MailMate is to receive all message in the Inbox and then do simple archiving to a single mailbox when reading these messages. Any groping of messages should then be done via smart mailboxes (which you can think of as dynamic filtering). I do understand though that there are many scenarios where this is not enough.
I'll leave this ticket open as a request for a GUI for doing filtering.
-
Steve H March 31st, 2011 @ 12:57 PM
If you do not mind a low-level (experimental) solution for now then it is possible to do filtering using disk-based files. Let me know if this has any interest.
Very much of interest. Most of my filtering is done server-side with sievescripts but there are still some I would like to carry out at the client side, where they are based on address book groups for instance.
-
benny April 1st, 2011 @ 02:49 PM
Address book groups are supported in the Address Book panel and when completing addresses (both in the Composer), but they are currently not supported by the filters (neither in the GUI or the low-level query language). I've noted this, but I cannot promise you anything soon.
If you want to do other kinds of filtering then you can create a file such as
~/Library/Application Support/MailMate/Scripts/AutoMove.mmCommand
The file should contain something like:
{ name = 'Auto Move'; events = ( 'selection.added' ); select = "$Inbox"; actions = ( { type = moveMessage; mailbox = "imap://username@imap.example.com/Some Mailbox"; } ); }
The value for the “select” key could use the UUID of any smart mailbox defined within MailMate. You can see these in the following file:
~/Library/Application Support/MailMate/Mailboxes.plist
It could also be explicitly stated like
select = "$Inbox.filter(from.address = 'someone@example.com')"
Again, inspiration for the possible filters can be found in Mailboxes.plist.
You can find some additional information in the examples at
MailMate.app/Contents/SharedSupport/Scripts/
There is a lack of documentation for all of this and it is also all subject to change at any time, but maybe it can solve some of your problems for now. At least it indicates some of the future possibilities in MailMate.
Feel free to ask questions about how to solve specific problems.
-
benny April 1st, 2011 @ 02:52 PM
Note: I edited the formatting of my answer. Unfortunately lighthouseapp does not handle flowed paragraphs well when answering by email.
-
Eric A. Meyer January 17th, 2013 @ 02:10 PM
I’m looking into this too, as I’d like to auto-filter incoming mail in a few ways. I just want to confirm that I’ve done this right before trying it out—the nature of IMAP makes me deeply wary of accidentally losing mail with no recovery. (Yes, I back up my hard drive, but still.)
So if I wanted to filter all mail from a specific address into a subfolder as it comes in, I’ve derived this from the various examples I’ve found:
{ name = 'www-style'; events = ( 'account.synchronized' ); select = "$Inbox.filter(#from.address = 'sending-address@example.com')"; actions = ( { type = moveMessage; mailbox = "imap://username@imap.example.com/lists/www-style"; } } ); }
Did I get that right? Should the
#
be in theevents
value?Also, is there a significance to single versus double quotes, or is it simply a case of picking whichever you like and making sure you properly nest and balance them?
And yes, I know smart mailboxes are generally recommended for this kind of thing, but in some cases having messages moved to a subfolder and also removed from the Inbox is valuable to me. It’s that latter part that makes smart mailboxes a poor fit in these cases.
-
benny January 17th, 2013 @ 03:09 PM
The age of this ticket is embarrassing, but a GUI for filtering is still part of the future of MailMate.
I think you got it right except for the
from
header. You wrote#from.address
which should just befrom.address
. The#
is used for virtual headers, that is, headers which are not really part of the message (I even use##
at times which typically means that the header is temporary, that is, not saved to disk).And yes, the use of quotes should just be correctly nested.
-
Eric A. Meyer January 29th, 2013 @ 08:18 PM
Just now saw your reply, Benny—apparently I don’t have email notifications of replies turned on. Doh!
Thanks for the clarification about the header. I’ve just now set up a test filter and I believe it’s working as intended, but I’ll report back once I’ve run it for a while to let you know if I hit any problems or not.
-
Eric A. Meyer January 29th, 2013 @ 08:43 PM
My test filter ran perfectly once I quit and relaunched MailMate!
For the record, here’s what I used (with account names altered) to auto-move messages to a subfolder as they came in:
{ name = 'Filter Test'; events = ( 'account.synchronized' ); select = "$Inbox.filter(from.address = 'test@example.com')"; actions = ( { type = moveMessage; mailbox = "imap://eric%example.com@imap.example.com/Filtertest"; } ); }
So my last question on this topic, at least for now: is there a difference between having one filter per
.mmCommand
file as opposed to comma-separating filters in a single file? Or is the latter even possible? -
Zvi Biener February 27th, 2013 @ 01:15 AM
Are there other functions that are available for these filters? Say type=flagMessage, or something similar to automate tagging? Thanks!
-
benny October 9th, 2013 @ 09:29 AM
(Sorry about the late response. I'm in the process of cleaning up old tickets.)
As you might already know, recent test versions of MailMate have an experimental Rules feature which can be enabled using:
defaults write com.freron.MailMate MmTwoPointOhFeaturesEnabled -bool YES
Restart MailMate and a Rules pane should be available in the mailbox editor. Feedback is welcome.
-
benny October 9th, 2013 @ 09:29 AM
- State changed from accepted to fixcommitted
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Mac OS X email client.
People watching this ticket
Referenced by
- 125 Update to OS X 10.6.7 breaks Smart Mailboxes Thanks, Benny. I've already noticed that there is an open...