[imapfilter-devel] Improving Filter Writing Effeciency
Lefteris Chatzimparmpas
lefcha at hellug.gr
Sat Jan 8 14:28:00 EET 2011
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
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
More information about the Imapfilter-devel
mailing list