instead of `test ...`, use exceptions:

if (/^X-Spam-Flag:\s*YES/)
{
     exception    {
         to  "$_JUNK_DEST";
     }
     `maildirmake ...&&  chmod ....&&  chmod ...&  echo ...`
     to  "$_JUNK_DEST";
}

this way, once the user has received a spam that caused the creation of
the maildir, the 'test' is no more performed.

Yes, thanks. I glanced at exceptions but was just glad to have something working.

you seem to use dovecot. then why use maildrop? can't you just use
dovecot-lda with sieve? (dovecot can auto-create maildirs).
Finally, the right piece. I looked for a while for tools to work with Spamassassin and only found procmail and maildrop. I didn't think to explore Dovecot's secondary tools because conceptually, I had it boxed in as an IMAP service only, and not the final link in the SMTP chain.

It felt wrong to have to run the Cyrus authentication daemon and a conceptually duplicate SQL config file just to help maildrop talk to my database.

-Daniel

Reply via email to