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 | |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/mbox.c | 19 |
3 files changed, 27 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2006-12-28 + * libsylph/mbox.c: proc_mbox(): filter junk mails when + filter_junk_on_recv is enabled. + +2006-12-28 + * configure.in: check additional libraries (resolv, socket, nsl) (fixes compilation failure in some OSes). diff --git a/ChangeLog.ja b/ChangeLog.ja index a12d87d7..1beda082 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2006-12-28 + * libsylph/mbox.c: proc_mbox(): filter_junk_on_recv が有効になっている + 場合迷惑メールをフィルタするようにした。 + +2006-12-28 + * configure.in: 追加のライブラリをチェック(resolv, socket, nsl) (OS によってはコンパイルに失敗するのを修正)。 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, |