[MlMt] Archive by applying rules with default of move to Archive folder

Benny Kjær Nielsen mailinglist at freron.com
Thu Apr 17 05:27:40 EDT 2014


On 16 Apr 2014, at 22:23, Dr Gregory Jefferis wrote:

> 1) rules are automatically triggered only when messages arrive in a 
> mailbox, right?

Well, more like “added”. Manually dragging a message to a mailbox 
also triggers the rules. This is currently not optional.

> 2) can a rule include a second mailbox restriction?

You could make a condition on the virtual “Source” header, but I'm 
not sure what you are trying to do. A smart mailbox only matching the 
messages of interest would likely be a better solution.

> 3) are rules/searches based on address book groups any closer?

No. It's only implemented on paper (I know how I want it to work, but I 
haven't done a single line of code).

> 4) is there a way to tell if a message has been read less than x 
> minutes ago

Yes, look for the “Date-Last-Viewed” header. It's actually used for 
internal purposes, but I think it works well for conditions as well — 
at least in recent test versions of MailMate (your revision should be 
fine).

> And then in terms of strategy:
>
> I already have smart mailboxes that define most of these searches. I 
> was thinking that I could add a rule to the smart mailbox that said:
> * if this message is now in the archive folder then move it to its 
> permanent folder.
>
> Alternatively I could have a rule in the Archive folder that says:
> * if this message is also in smart folder X then move it to IMAP 
> folder Y.
>
> But I don't see that either of those are possible right now (without 
> perhaps giving smart folders rules that give messages a tag). What I'd 
> like to avoid is duplicating all of my message search conditions in 
> two places (once in an archive rule, a second time in a smart folder).

The solution now is to create a smart folder based on your smart folder 
which adds the additional condition. This could be done using the 
Mailboxes pane to tell MailMate to match on messages both in the smart 
folder and the archive. The rule in this smart mailbox would then not 
have any conditions. If you have many smart mailboxes to do this for and 
the action is the same then it could also be:

~~~
All of these mailboxes
	Any of these mailboxes
		Smart Mailbox 1
		Smart Mailbox 2
		...
	Archive
~~~

But I see the implicit request (a known issue): Rules which are 
“dynamic” in the sense that they are triggered whenever their 
conditions are matched and not just when messages arrive in the mailbox.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20140417/5ab12cae/attachment.html>


More information about the mailmate mailing list