mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 04:30:12 +01:00
added an option to decide whether to add rcpt to addresses to rcpt table
This commit is contained in:
parent
3668fcbb0f
commit
863d9ecb50
@ -45,6 +45,9 @@ max_requests_per_child=1000
|
||||
; 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
|
||||
|
||||
|
@ -99,6 +99,7 @@ struct _parse_rule config_parse_rules[] =
|
||||
{ "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},
|
||||
|
@ -45,6 +45,8 @@ struct __config {
|
||||
|
||||
int backlog;
|
||||
|
||||
int process_rcpt_to_addresses;
|
||||
|
||||
char workdir[MAXVAL];
|
||||
char queuedir[MAXVAL];
|
||||
|
||||
|
@ -32,7 +32,7 @@ struct _state parse_message(struct session_data *sdata, int take_into_pieces, st
|
||||
}
|
||||
|
||||
|
||||
if(sdata->num_of_rcpt_to > 0){
|
||||
if(sdata->num_of_rcpt_to > 0 && cfg->process_rcpt_to_addresses == 1){
|
||||
for(i=0; i<sdata->num_of_rcpt_to; i++){
|
||||
|
||||
snprintf(puf, sizeof(puf)-1, "%s ", sdata->rcptto[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user