Hi!
"Dovecot always logs a detailed error message if something goes wrong. If it doesn't, it's considered a bug and will be fixed." (http:// wiki2.dovecot.org/Logging)
I'm trying to set up a spam filter with dovecot-antispam and dspam as backend.
When I move a spam message from INBOX to Spam, I get this in syslog:
Nov 28 21:15:58 desktop imap: antispam: mailbox_is_unsure(Spam): 0 Nov 28 21:15:58 desktop imap: antispam: mailbox_is_trash(INBOX): 0 Nov 28 21:15:58 desktop imap: antispam: mailbox_is_trash(Spam): 0 Nov 28 21:15:58 desktop imap: antispam: mail copy: from trash: 0, to trash: 0 Nov 28 21:15:58 desktop imap: antispam: mailbox_is_spam(INBOX): 0 Nov 28 21:15:58 desktop imap: antispam: mailbox_is_spam(Spam): 1 Nov 28 21:15:58 desktop imap: antispam: mailbox_is_unsure(INBOX): 0 Nov 28 21:15:58 desktop imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0
There are no log entries about how dspam is called, or what goes on. Indeed, dspam doesn't get called at all. I know, because I've examined the antispam- plugin source code. There would be a log message if dspam was called.
It's hard to study the source code, because there are hardly any comments.
I have been able to trace the problem to function signature_extract_to_list() in signature.c. There, -1 is returned:
int signature_extract_to_list(const struct signature_config *cfg, struct mailbox_transaction_context *t, struct mail *mail, struct siglist **list, enum classification wanted) { const char *const *signatures; struct siglist *item;
signatures = get_mail_headers(mail, cfg->signature_hdr);
if (!signatures || !signatures[0]) {
if (!cfg->signature_nosig_ignore) {
mail_storage_set_error(t->box->storage,
ME(NOTPOSSIBLE)
"antispam signature not found");
return -1; /* <-- HERE */
} else {
return 0;
}
}
while (signatures[1])
signatures++;
item = i_new(struct siglist, 1);
item->next = *list;
item->wanted = wanted;
item->sig = i_strdup(signatures[0]);
*list = item;
return 0;
}
So, what's happening is "antispam signature not found". My question: What does this mean? What's going on?
My "dovecot -n" output is attached.
Bye Volker