[Dovecot] Delete antispam emails
Johannes Berg
johannes at sipsolutions.net
Sat Apr 19 14:06:20 EEST 2008
> Anyways, this is what I see with your patch (date/time stamp truncated
> to allow the details to be on a single line)...
>
> ... map: antispam: mail copy: from trash: 0, to trash: 0
> ... map: antispam: mail copy: src spam: 1, dst spam: 0, src unsure: 0
>
> So, it looks as though my trash detection is broken. I guess I need to
> look at the mailbox_is_trash() function next? Can you suggest a patch to
> debug that?
Hmm. Odd. Let's try this. Are you using namespaces?
johannes
diff --git a/antispam-plugin.c b/antispam-plugin.c
index c83d225..1f33820 100644
--- a/antispam-plugin.c
+++ b/antispam-plugin.c
@@ -60,7 +60,10 @@ static bool mailbox_in_list(struct mailbox *box, char **list)
if (!list)
return FALSE;
+ debug("mailbox_in_list");
+
while (*list) {
+ debug(" - list item: %s, box: %s\n", *list, mailbox_get_name(box));
if (mailbox_equals(box, box->storage, *list))
return TRUE;
list++;
@@ -76,6 +79,7 @@ bool mailbox_is_spam(struct mailbox *box)
bool mailbox_is_trash(struct mailbox *box)
{
+ debug("checking trash %s\n", mailbox_get_name(box));
return mailbox_in_list(box, trash_folders);
}
More information about the dovecot
mailing list