aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--antispam-storage-1.1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/antispam-storage-1.1.c b/antispam-storage-1.1.c
index a273f88..1c9fe6b 100644
--- a/antispam-storage-1.1.c
+++ b/antispam-storage-1.1.c
@@ -172,12 +172,14 @@ static int antispam_save_finish(struct mail_save_context *ctx)
ANTISPAM_CONTEXT(ctx->transaction->box);
struct antispam_internal_context *ast =
ANTISPAM_CONTEXT(ctx->transaction);
- struct mail *dest_mail = ast->mail;
+ struct mail *dest_mail;
int ret;
if (asbox->module_ctx.super.save_finish(ctx) < 0)
return -1;
+ dest_mail = ctx->dest_mail ? : ast->mail;
+
asbox->save_hack = TRUE;
ret = 0;