<DKIM> python in offlineimaprc

Nicolas Sebrecht nicolas.s-dev at laposte.net
Sun Aug 19 18:51:06 BST 2018


On Sun, Aug 19, 2018 at 07:49:18PM +0200, Nicolas Sebrecht wrote:

> # pythonfile
> 
> FOLDERFILTER_DICT = {
>     'account_a': ['one', 'two'],
>     'account_b': ['three', 'four'],
> }
> 
> 
> def get_folderfilter_function(account_key_name):
>     def folderfilter_function(folder):
>         return folder in FOLDERFILTER_DICT[account_key_name]
>     return folderfilter_function
> 
# offlineimaprc

folderfilter = get_folderfilter_function('account_a')

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list