diff options
-rw-r--r-- | climl/__init__.py | 6 |
1 files 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') |