From 7516b155aa59a180e81bc5951efc1f74ee71452c Mon Sep 17 00:00:00 2001 From: VG Date: Sat, 21 May 2016 02:10:06 +0200 Subject: Auto-commit on 807fe7afb37fe2cfcf15c9457d04f64fa11b7511 --- climl/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/climl/__init__.py b/climl/__init__.py index c16218f..8da9f80 100644 --- a/climl/__init__.py +++ b/climl/__init__.py @@ -2,7 +2,7 @@ from . import imap from . import interface from . import hooks -def on_email(content): +def on_email(content, hooks): print('on_email:', content) context = {} try: @@ -18,7 +18,7 @@ def main(): # to generate hooks list ? # now try a fixed list ? hooks = ( - hook_check_ml_restrictions, + hook_check_ml_restrictions, # open/private ml hook_validate_poster, hook_process_subscribe_queries, hook_generate_rcpt_list, @@ -26,7 +26,7 @@ def main(): ) print('starting imap.main loop') try: - imap.main(on_email) + imap.main(lambda content: on_mail(content, hooks)) except KeyboardInterrupt: pass print('end of main imap loop') -- cgit v1.2.3