aboutsummaryrefslogtreecommitdiffstats
path: root/antispam-plugin.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-10-01 15:05:54 +0200
committerJohannes Berg <johannes@sipsolutions.net>2007-10-01 15:05:54 +0200
commit2822b28cc9840b5ff3ea192aa12b8154fc3a163a (patch)
treea6a30b43df884945abe65006c4a76b9b7b9f654c /antispam-plugin.c
parent74b2bd7184ad32939235be32452d3569bba67370 (diff)
downloaddovecot-antispam-2822b28cc9840b5ff3ea192aa12b8154fc3a163a.tar.gz
dovecot-antispam-2822b28cc9840b5ff3ea192aa12b8154fc3a163a.tar.xz
dovecot-antispam-2822b28cc9840b5ff3ea192aa12b8154fc3a163a.zip
this seems to make the storage-based plugin work
Diffstat (limited to 'antispam-plugin.c')
-rw-r--r--antispam-plugin.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/antispam-plugin.c b/antispam-plugin.c
index 556d631..993c8c1 100644
--- a/antispam-plugin.c
+++ b/antispam-plugin.c
@@ -31,8 +31,8 @@
#include "lib.h"
#include "str.h"
#include "client.h"
-#include "ostream.h"
-#include "imap-search.h"
+#include "mail-storage-private.h"
+
/* defined by imap, pop3, lda */
extern void (*hook_mail_storage_created)(struct mail_storage *storage);
@@ -48,14 +48,13 @@ static char *default_spam_folders[] = {
};
static char **spam_folders = default_spam_folders;
-static bool mailbox_in_list(struct mail_storage *storage, struct mailbox *box,
- char **list)
+static bool mailbox_in_list(struct mailbox *box, char **list)
{
if (!list)
return FALSE;
while (*list) {
- if (mailbox_equals(box, storage, *list))
+ if (mailbox_equals(box, box->storage, *list))
return TRUE;
list++;
}
@@ -63,14 +62,14 @@ static bool mailbox_in_list(struct mail_storage *storage, struct mailbox *box,
return FALSE;
}
-bool mailbox_is_spam(struct mail_storage *storage, struct mailbox *box)
+bool mailbox_is_spam(struct mailbox *box)
{
- return mailbox_in_list(storage, box, spam_folders);
+ return mailbox_in_list(box, spam_folders);
}
-bool mailbox_is_trash(struct mail_storage *storage, struct mailbox *box)
+bool mailbox_is_trash(struct mailbox *box)
{
- return mailbox_in_list(storage, box, trash_folders);
+ return mailbox_in_list(box, trash_folders);
}
void antispam_init(void)