aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mbox.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-28 09:26:24 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-28 09:26:24 +0000
commit42c9dde271cce6043e02e139142321aae760dd81 (patch)
tree2cb1fd6fc6c7e0f2cd31f3e0bae759a8e5bae00e /libsylph/mbox.c
parent2996cccf0fc852c2dbb6682adcb76c83986d134c (diff)
filter junk mails on incorporation from local spool when filter_junk_on_recv is enabled.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1464 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mbox.c')
-rw-r--r--libsylph/mbox.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libsylph/mbox.c b/libsylph/mbox.c
index 3ecf61c5..7385c285 100644
--- a/libsylph/mbox.c
+++ b/libsylph/mbox.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -204,9 +204,24 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table)
fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD;
fltinfo->flags.tmp_flags = MSG_RECEIVED;
- if (folder_table)
+ if (folder_table && prefs_common.enable_junk &&
+ prefs_common.filter_junk_on_recv &&
+ prefs_common.filter_junk_before) {
+ filter_apply(prefs_common.junk_fltlist, tmp_file,
+ fltinfo);
+ }
+
+ if (!fltinfo->drop_done && folder_table)
filter_apply(prefs_common.fltlist, tmp_file, fltinfo);
+ if (!fltinfo->drop_done &&
+ folder_table && prefs_common.enable_junk &&
+ prefs_common.filter_junk_on_recv &&
+ !prefs_common.filter_junk_before) {
+ filter_apply(prefs_common.junk_fltlist, tmp_file,
+ fltinfo);
+ }
+
if (fltinfo->actions[FLT_ACTION_MOVE] == FALSE &&
fltinfo->actions[FLT_ACTION_DELETE] == FALSE) {
if (folder_item_add_msg(dest, tmp_file, &fltinfo->flags,