From 7310552ffbee0b14e7333bb564261ebe041af66f Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Wed, 7 Feb 2018 13:52:25 +0100 Subject: [PATCH] syslog rules loaded Signed-off-by: Janos SUTO --- src/config.h | 2 +- src/rules.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config.h b/src/config.h index 5c3d736f..562e810d 100644 --- a/src/config.h +++ b/src/config.h @@ -11,7 +11,7 @@ #define VERSION "1.3.3" -#define BUILD 986 +#define BUILD 987 #define HOSTID "mailarchiver" diff --git a/src/rules.c b/src/rules.c index 41fd4d97..c2445161 100644 --- a/src/rules.c +++ b/src/rules.c @@ -184,7 +184,10 @@ struct rule *create_rule_item(struct rule_cond *rule_cond){ - if(h->rulestr) snprintf(h->rulestr, len-1, "domain=%s,from=%s,to=%s,subject=%s,body=%s,size%s%d,att.name=%s,att.type=%s,att.size%s%d,spam=%d", rule_cond->domain, rule_cond->from, rule_cond->to, rule_cond->subject, rule_cond->body, rule_cond->_size, rule_cond->size, rule_cond->attachment_name, rule_cond->attachment_type, rule_cond->_attachment_size, rule_cond->attachment_size, rule_cond->spam); + if(h->rulestr){ + snprintf(h->rulestr, len-1, "domain=%s,from=%s,to=%s,subject=%s,body=%s,size%s%d,att.name=%s,att.type=%s,att.size%s%d,spam=%d", rule_cond->domain, rule_cond->from, rule_cond->to, rule_cond->subject, rule_cond->body, rule_cond->_size, rule_cond->size, rule_cond->attachment_name, rule_cond->attachment_type, rule_cond->_attachment_size, rule_cond->attachment_size, rule_cond->spam); + syslog(LOG_INFO, "adding rule: %s", h->rulestr); + } else h->compiled = 0; h->r = NULL;