[Dovecot] Delete antispam emails
David Reid
david at jetnet.co.uk
Sun Apr 13 19:45:55 EEST 2008
Johannes Berg wrote:
>> This is what I found in syslog...
>>
>> Apr 12 21:28:15 kosh imap: antispam: plugin initialising
>> Apr 12 21:28:15 kosh imap: antispam: "trash" is trash folder
>> Apr 12 21:28:15 kosh imap: antispam: "Trash" is trash folder
>> Apr 12 21:28:15 kosh imap: antispam: "Deleted Items" is trash folder
>> Apr 12 21:28:15 kosh imap: antispam: "SpamTrain" is spam folder
>> Apr 12 21:28:15 kosh imap: antispam: "INBOX.SpamTrain" is spam folder
>> ...
>>
>> It looks like all the folders are being recognised correctly.
>
> Good, yes, that confirms at least the configuration is working.
>
>> Is it
>> possible to get more info when messages are being processed?
>
> Not as-is, but you can try something like the patch below:
>
> diff --git a/antispam-storage-1.0.c b/antispam-storage-1.0.c
> index 1949454..da21ba4 100644
> --- a/antispam-storage-1.0.c
> +++ b/antispam-storage-1.0.c
> @@ -88,12 +88,18 @@ antispam_copy(struct mailbox_transaction_context *t, struct mail *mail,
> return -1;
> }
>
> + debug("mail copy: from trash: %d, to trash: %d\n",
> + mailbox_is_trash(mail->box), mailbox_is_trash(t->box));
> +
> if (!mailbox_is_trash(mail->box) &&
> !mailbox_is_trash(t->box)) {
> 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("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)
>
I'll try it and let you know how I get on. Thanks for your continued
support on this. I'd really like to get it sorted out!
>
>
> !DSPAM:16,4801b7e5124073413946613!
>
>
More information about the dovecot
mailing list