This is a hard one to search because it turns up the very common issue of no X-Spam headers are inserted. I found one post like mine with no replies. When I set $sa_tag_level_deflt in amavisd to undef or negative number, ALL email is blocked (sent to .spam folder). Has anyone seen this before? Any help would be appreciated, thanks.
Nothing in maillog, however, based on info I received after my original post, it seems that amavisd is treating the message as clean. Something else is seeing the x-spam header and mistakenly sending it to the .spam folder. Based on that info, I checked the dovecot log and it appears that dovecot lda is the culprit. I'm not sure how to resolve it yet.
In file globalsievec found in mail home folder: require ["fileinto"]; # Move spam to spam folder if exists "X-Spam-Flag" { fileinto "spam"; stop; } To resolve this, in amavisd.conf, I'm setting up a unique tag to be added to subject line and I will change X-Spam-Flag (above) to match. Sorry for the trouble. Not much info on Dovecot LDA cause I guess it's relatively new.
I just wanted to follow-up. The correct syntax for the Dovecot LDA's Sieve script is: require ["fileinto"]; # Move spam to spam folder if header :contains "X-Spam-Flag" ["YES"] { fileinto "spam"; stop; }