mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:10:12 +01:00
syslog recipients
Change-Id: I9d7e5307447babb71ab152d33b0f02d9bf05384f Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
d314a606b2
commit
49348fd261
14
src/piler.c
14
src/piler.c
@ -89,8 +89,10 @@ void child_sighup_handler(int sig){
|
|||||||
|
|
||||||
int process_email(char *filename, struct session_data *sdata, struct __data *data, int size, struct __config *cfg){
|
int process_email(char *filename, struct session_data *sdata, struct __data *data, int size, struct __config *cfg){
|
||||||
int rc;
|
int rc;
|
||||||
|
char tmpbuf[SMALLBUFSIZE];
|
||||||
char *status=S_STATUS_UNDEF;
|
char *status=S_STATUS_UNDEF;
|
||||||
char *arule;
|
char *arule;
|
||||||
|
char *rcpt;
|
||||||
struct timezone tz;
|
struct timezone tz;
|
||||||
struct timeval tv1, tv2;
|
struct timeval tv1, tv2;
|
||||||
struct parser_state parser_state;
|
struct parser_state parser_state;
|
||||||
@ -109,6 +111,18 @@ int process_email(char *filename, struct session_data *sdata, struct __data *dat
|
|||||||
parser_state = parse_message(sdata, 1, data, cfg);
|
parser_state = parse_message(sdata, 1, data, cfg);
|
||||||
post_parse(sdata, &parser_state, cfg);
|
post_parse(sdata, &parser_state, cfg);
|
||||||
|
|
||||||
|
if(cfg->syslog_recipients == 1){
|
||||||
|
rcpt = parser_state.b_to;
|
||||||
|
do {
|
||||||
|
rcpt = split_str(rcpt, " ", tmpbuf, sizeof(tmpbuf)-1);
|
||||||
|
|
||||||
|
if(does_it_seem_like_an_email_address(tmpbuf) == 1){
|
||||||
|
syslog(LOG_PRIORITY, "%s: rcpt=%s", sdata->ttmpfile, tmpbuf);
|
||||||
|
}
|
||||||
|
} while(rcpt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
arule = check_againt_ruleset(data->archiving_rules, &parser_state, sdata->tot_len, sdata->spam_message);
|
arule = check_againt_ruleset(data->archiving_rules, &parser_state, sdata->tot_len, sdata->spam_message);
|
||||||
|
|
||||||
if(arule){
|
if(arule){
|
||||||
|
Loading…
Reference in New Issue
Block a user