> > I guess that in need_keyword_hook case save_init/save_finish hooks will > > have to check email for spams and keyword it. It is not clear how to > > mark mail as spam if both need_folder_hook and need_keyword_hook are > > true. > > Well, the need_keyword_hook variable is just internal. The point is that > save_{init,finish} are not invoked when just the keywords change, so I > override the struct mail's update_keywords function. > > See > http://git.sipsolutions.net/?p=dovecot-antispam.git;a=blob;f=antispam-storage-1.0.c;hb=HEAD#l265 >
I thought about new mail case here, sorry for confusion.
signature.asc
Description: This is a digitally signed message part