Hi,
i have working SPAM reporting implementend by imapsieve in debian's 2.3.13 dovecot.
Recently i decide to add personal spam filter by bogofilter and use logic to learn/unlearn SPAM/HAM based on message flags. Here is example of moving message from Junk folder (the opossite logic is similar):
if hasflag "$Junk" {
execute :pipe "bogofilter" ["-Sn"]; removeflag "$Junk"; debug_log "Learned HAM (and unlearned)"; } else { execute :pipe "bogofilter" ["-n"]; debug_log "Learned HAM (only)"; } # mark as learned addflag "$NotJunk";
report ...
When i move message, the debug lines in log shows, that logic works and flag is added as expected, but the other flag is not removed. Thus after moving mail from Junk, which has $Junk flag, it has both flags, the $Junk and $NotJunk.
I tried to move removeflag action outside of condition and add it just before addflag, but the result is the same.
For now i do not know if here is something wrong in my script, or i did some other mistake. On IRC cmouse tell, that removeflag was fixed in some early version (2.3.5 or so), but it doesn't work here.
Please, how i can get it working?
regards
PS: please CC me, i am not subscribed
-- Slavko https://www.slavino.sk/