Revision 3222 libsylph/filter.c

View differences:

filter.c
1586 1586
	debug_print("filter_junk_rule_create: junk folder: %s\n",
1587 1587
		    junk_id);
1588 1588

  
1589
	if (prefs_common.nofilter_junk_sender_in_book) {
1590
		cond = filter_cond_new(FLT_COND_HEADER, FLT_IN_ADDRESSBOOK,
1591
				       FLT_NOT_MATCH, "From", NULL);
1592
		cond_list = g_slist_append(cond_list, cond);
1593
	}
1594

  
1589 1595
	cond = filter_cond_new(FLT_COND_CMD_TEST, 0, 0, NULL,
1590 1596
			       prefs_common.junk_classify_cmd);
1591
	cond_list = g_slist_append(NULL, cond);
1597
	cond_list = g_slist_append(cond_list, cond);
1598

  
1592 1599
	if (prefs_common.delete_junk_on_recv && !is_manual) {
1593 1600
		action = filter_action_new(FLT_ACTION_COPY, junk_id);
1594 1601
		action_list = g_slist_append(NULL, action);
......
1605 1612
	}
1606 1613

  
1607 1614
	if (is_manual)
1608
		rule = filter_rule_new(_("Junk mail filter (manual)"), FLT_OR,
1615
		rule = filter_rule_new(_("Junk mail filter (manual)"), FLT_AND,
1609 1616
				       cond_list, action_list);
1610 1617
	else
1611
		rule = filter_rule_new(_("Junk mail filter"), FLT_OR,
1618
		rule = filter_rule_new(_("Junk mail filter"), FLT_AND,
1612 1619
				       cond_list, action_list);
1613 1620

  
1614 1621
	g_free(junk_id);

Also available in: Unified diff