diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-28 09:26:24 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-28 09:26:24 +0000 |
commit | 42c9dde271cce6043e02e139142321aae760dd81 (patch) | |
tree | 2cb1fd6fc6c7e0f2cd31f3e0bae759a8e5bae00e /libsylph | |
parent | 2996cccf0fc852c2dbb6682adcb76c83986d134c (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')
-rw-r--r-- | libsylph/mbox.c | 19 |
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, |