aboutsummaryrefslogtreecommitdiffstats
path: root/trainstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'trainstore.c')
-rw-r--r--trainstore.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/trainstore.c b/trainstore.c
index 055828d..bcd40be 100644
--- a/trainstore.c
+++ b/trainstore.c
@@ -40,8 +40,6 @@ static const char *hamdir = NULL;
struct antispam_transaction_context {
int count;
- const char *spamdir;
- const char *hamdir;
};
int mkdir_rec(const char *dir, mode_t mask) {
@@ -85,9 +83,6 @@ backend_start(struct mailbox *box __attr_unused__)
mkdir_rec(spamdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
mkdir_rec(hamdir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
- ast->spamdir = spamdir;
- ast->hamdir = hamdir;
-
return ast;
}
@@ -142,7 +137,7 @@ int backend_handle_mail(struct mailbox_transaction_context *t,
const char *date = NULL, *mail_id = NULL, *dest = NULL, *other = NULL;
struct stat sb;
- if (!ast->hamdir || !ast->spamdir) {
+ if (!hamdir || !spamdir) {
mail_storage_set_error(t->box->storage,
ME(NOTPOSSIBLE)
"antispam plugin not configured");
@@ -186,12 +181,12 @@ int backend_handle_mail(struct mailbox_transaction_context *t,
/* switch weather this should be ham or spam */
switch (wanted) {
case CLASS_SPAM:
- dest = ast->spamdir;
- other = ast->hamdir;
+ dest = spamdir;
+ other = hamdir;
break;
case CLASS_NOTSPAM:
- dest = ast->hamdir;
- other = ast->spamdir;
+ dest = hamdir;
+ other = spamdir;
break;
}