2011-11-19 21:25:44 +01:00
|
|
|
/*
|
|
|
|
* rules.h, SJ
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RULES_H
|
|
|
|
#define _RULES_H
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
2017-08-08 15:34:45 +02:00
|
|
|
void load_rules(struct session_data *sdata, struct data *data, struct node *xhash[], char *table);
|
2017-08-11 18:18:45 +02:00
|
|
|
int append_rule(struct node *xhash[], struct rule_cond *rule_cond);
|
|
|
|
struct rule *create_rule_item(struct rule_cond *rule_cond);
|
2015-11-21 23:06:47 +01:00
|
|
|
char *check_againt_ruleset(struct node *xhash[], struct parser_state *state, int size, int spam);
|
2017-08-08 15:34:45 +02:00
|
|
|
time_t query_retain_period(struct data *data, struct parser_state *state, int size, int spam, struct config *cfg);
|
|
|
|
int get_folder_id_by_rule(struct data *data, struct parser_state *state, int size, int spam, struct config *cfg);
|
2011-11-19 21:25:44 +01:00
|
|
|
int check_size_rule(int message_size, int size, char *_size);
|
2012-02-19 22:59:47 +01:00
|
|
|
int check_spam_rule(int is_spam, int spam);
|
2015-11-21 23:06:47 +01:00
|
|
|
int check_attachment_rule(struct parser_state *state, struct rule *rule);
|
2013-08-14 14:24:30 +02:00
|
|
|
|
|
|
|
void initrules(struct node *xhash[]);
|
|
|
|
void clearrules(struct node *xhash[]);
|
2011-11-19 21:25:44 +01:00
|
|
|
|
|
|
|
#endif /* _RULES_H */
|
|
|
|
|