[imapfilter-devel] Improving Filter Writing Effeciency
Philippe LeCavalier
support at plecavalier.com
Sat Jan 8 18:34:52 EET 2011
Quoting Lefteris Chatzimparmpas <lefcha at hellug.gr>:
> Yes, that's correct, you got that right. For each account it will move
> messages from its INBOX to its "help/Open" folder.
Perfect!
Thanks,
Phil
>
>
> On 01/08/2011 04:45 PM, Philippe LeCavalier wrote:
>> Thanks. That's much cleaner. I have one question though...
>> Quoting Lefteris Chatzimparmpas <lefcha at hellug.gr>:
>>
>>> Hello,
>>>
>>> You can make use of Lua to accomplish this. For example one way could
>>> be:
>>>
>>> for _, account in ipairs({ account1, account2 }) do
>>>
>>> account.INBOX:contain_subject('[OPEN]'):move_messages(account['help/Open'])
>>>
>>> end
>> Can I assume that I'm reading this correctly in that mail for/from
>> account1 will stay in account1 ie it won't move a msg with subject OPEN
>> from account1.INBOX to account2.INBOX.help.Open right?
>>
>> Pardon my ignorance, I really don't know any form of programming language.
>>
>> Thanks,
>> Phil
>>>
>>> You can add more accounts or even write a nice Lua function, and so on.
>>>
>>>
>>> On 01/07/2011 07:49 PM, Philippe LeCavalier wrote:
>>>> I have 3 IMAP accounts. I'm wondering if I can merge identical filters?
>>>> ie.
>>>>
>>>> --Move Open
>>>> results = account1.INBOX:contain_subject('[OPEN]')
>>>> results:move_messages(account1['help/Open'])
>>>> results = account2.INBOX:contain_subject('[OPEN]')
>>>> results:move_messages(account2['help/Open'])
>>>>
>>>> with something like:
>>>>
>>>> --Move Open
>>>> results = account{1|2}.INBOX:contain_subject('[OPEN]')
>>>> results:move_messages(account{1|2}1['help/Open'])
>>>>
>>>> I know the above syntax is incorrect; it's just for illustration
>>>> purposes.
>>>>
>>>> Any thoughts?
>>>>
>>>> Phil
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Imapfilter-devel mailing list
>>>> Imapfilter-devel at lists.hellug.gr
>>>> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel
>>>
>>
> _______________________________________________
> Imapfilter-devel mailing list
> Imapfilter-devel at lists.hellug.gr
> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel
More information about the Imapfilter-devel
mailing list