diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-04-19 13:27:59 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2008-04-19 13:27:59 +0200 |
commit | 2c7f3b568203ee3010db95d6dd060ebaddfe5475 (patch) | |
tree | 05220cb95993e97f3550aecfa1b90ee4c12dd9ab /antispam-storage-1.0.c | |
parent | 0ac5aca79054773d6c03bc7febc81e3f22d0292f (diff) | |
download | dovecot-antispam-2c7f3b568203ee3010db95d6dd060ebaddfe5475.tar.gz dovecot-antispam-2c7f3b568203ee3010db95d6dd060ebaddfe5475.tar.xz dovecot-antispam-2c7f3b568203ee3010db95d6dd060ebaddfe5475.zip |
add verbose debugging
Diffstat (limited to 'antispam-storage-1.0.c')
-rw-r--r-- | antispam-storage-1.0.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/antispam-storage-1.0.c b/antispam-storage-1.0.c index 1949454..79dcdf2 100644 --- a/antispam-storage-1.0.c +++ b/antispam-storage-1.0.c @@ -71,6 +71,7 @@ antispam_copy(struct mailbox_transaction_context *t, struct mail *mail, ANTISPAM_CONTEXT(t); struct mail *copy_dest_mail; int ret; + bool src_trash, dst_trash; if (dest_mail != NULL) copy_dest_mail = dest_mail; @@ -88,12 +89,21 @@ antispam_copy(struct mailbox_transaction_context *t, struct mail *mail, return -1; } - if (!mailbox_is_trash(mail->box) && - !mailbox_is_trash(t->box)) { + src_trash = mailbox_is_trash(mail->box); + dst_trash = mailbox_is_trash(t->box); + + debug_verbose("mail copy: from trash: %d, to trash: %d\n", + src_trash, dst_trash); + + if (!src_trash && !dst_trash) { bool src_spam = mailbox_is_spam(mail->box); bool dst_spam = mailbox_is_spam(t->box); bool src_unsu = mailbox_is_unsure(mail->box); + debug_verbose("mail copy: src spam: %d, dst spam: %d," + " src unsure: %d\n", + src_spam, dst_spam, src_unsu); + if ((src_spam || src_unsu) && !dst_spam) asbox->movetype = MMT_TO_CLEAN; else if ((!src_spam || src_unsu) && dst_spam) |