diff --git a/etc/example.conf b/etc/example.conf index 6fa4eb8..88e873a 100644 --- a/etc/example.conf +++ b/etc/example.conf @@ -45,6 +45,9 @@ ; where you copy emails, eg. archive@piler.yourdomain.com -> piler.yourdomain.com hostid=piler.yourdomain.com +; whether to process rcpt to addresses and add them to rcpt table (1) or not (0) +process_rcpt_to_addresses=0 + ; write pid file pidfile=/var/run/piler/piler.pid diff --git a/src/cfg.c b/src/cfg.c index af66873..4ef4132 100644 --- a/src/cfg.c +++ b/src/cfg.c @@ -99,6 +99,7 @@ { "pilergetd_listen_port", "integer", (void*) int_parser, offsetof(struct __config, pilergetd_listen_port), "10091", sizeof(int)}, { "pilergetd_password", "string", (void*) string_parser, offsetof(struct __config, pilergetd_password), "xxxxxxxxxx", MAXVAL-1}, { "pilergetd_pidfile", "string", (void*) string_parser, offsetof(struct __config, pilergetd_pidfile), PILERGETD_PIDFILE, MAXVAL-1}, + { "process_rcpt_to_addresses", "integer", (void*) int_parser, offsetof(struct __config, process_rcpt_to_addresses), "0", sizeof(int)}, { "queuedir", "string", (void*) string_parser, offsetof(struct __config, queuedir), QUEUE_DIR, MAXVAL-1}, { "server_id", "integer", (void*) int_parser, offsetof(struct __config, server_id), "0", sizeof(int)}, { "spam_header_line", "string", (void*) string_parser, offsetof(struct __config, spam_header_line), "", MAXVAL-1}, diff --git a/src/cfg.h b/src/cfg.h index 66f62b4..7be6746 100644 --- a/src/cfg.h +++ b/src/cfg.h @@ -45,6 +45,8 @@ int backlog; + int process_rcpt_to_addresses; + char workdir[MAXVAL]; char queuedir[MAXVAL]; diff --git a/src/parser.c b/src/parser.c index 6be21e7..80fa320 100644 --- a/src/parser.c +++ b/src/parser.c @@ -32,7 +32,7 @@ } - if(sdata->num_of_rcpt_to > 0){ + if(sdata->num_of_rcpt_to > 0 && cfg->process_rcpt_to_addresses == 1){ for(i=0; inum_of_rcpt_to; i++){ snprintf(puf, sizeof(puf)-1, "%s ", sdata->rcptto[i]);