2011-11-19 21:25:44 +01:00
|
|
|
/*
|
|
|
|
* rules.h, SJ
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RULES_H
|
|
|
|
#define _RULES_H
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
2013-08-14 14:24:30 +02:00
|
|
|
void load_rules(struct session_data *sdata, struct __data *data, struct node *xhash[], char *table);
|
|
|
|
int append_rule(struct node *xhash[], char *domain, char *from, char *to, char *subject, char *_size, int size, char *attachment_type, char *_attachment_size, int attachment_size, int spam, int days);
|
2013-07-31 09:10:26 +02:00
|
|
|
struct rule *create_rule_item(char *domain, char *from, char *to, char *subject, char *_size, int size, char *attachment_type, char *_attachment_size, int attachment_size, int spam, int days);
|
2013-08-14 14:24:30 +02:00
|
|
|
char *check_againt_ruleset(struct node *xhash[], struct _state *state, int size, int spam);
|
2013-07-31 09:10:26 +02:00
|
|
|
unsigned long query_retain_period(struct __data *data, struct _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);
|
2011-11-23 12:24:21 +01:00
|
|
|
int check_attachment_rule(struct _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 */
|
|
|
|
|