[imapfilter-devel] filters for archiving mail
Philippe LeCavalier
support at plecavalier.com
Tue Jan 25 22:31:21 EET 2011
On Tue, 2011-01-25 at 20:39 +0100, Lefteris Chatzimparmpas wrote:
> On 01/23/2011 09:07 PM, Philippe LeCavalier wrote:
> > 58 results = account1.INBOX:arrived_before('01-Jan-2009') -
> > 59 (account1['rec'] +
> > 60 account1['archives'])
> > 61 results:move_messages(account2['archives/pre_2009'])
> > 62
> > 63 --2009
> > 64 results = account1.INBOX:arrived_since('01-Jan-2009') *
> > 65 account1.INBOX:arrived_before('01-Jan-2010') -
> > 66 (account1['rec'] +
> > 67 account1['archives'])
> > 68 results:move_messages(account2['archives/2009'])
>
> You can't include folders in your results like this or combine them with
> search functions like arrived_before(). If you want to exclude all mail
> in those 2 mailboxes then use select_all().
>
> You're supposed to call specific functions to do searching. See the
> imapfilter_config(5) man page section SEARCHING.
>
> > i) rather than specify each mailbox and subfolder thereof, how can I
> > have it look through all mailboxes under INBOX recursively. 'INBOX.*'
> > kind of thing?
>
> Have a look at the LISTING section in the man page.
>
> > ii) if i) then how can I exclude the 'rec' and 'archive' folders?
>
> You have to use a some Lua and to string comparisons based on the output
> of the listing functions.
Thanks Lefteris.
hm. What you mention makes sense to me but I doubt I'll be able to 'take
it from here' :-)
I'll keep searching for a working example...Surely someone is using this
project for this.
Phil
More information about the Imapfilter-devel
mailing list