From 1a9c1451163aac1309a262f40830fa729d078227 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Mon, 19 Feb 2018 15:01:11 +0100 Subject: [PATCH] re-introduced the archive_only_mydomains feature to the new architecture Signed-off-by: Janos SUTO --- src/piler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/piler.c b/src/piler.c index 99b92b38..cf0d9416 100644 --- a/src/piler.c +++ b/src/piler.c @@ -147,7 +147,10 @@ int process_email(char *filename, struct session_data *sdata, struct data *data, if(arule){ syslog(LOG_PRIORITY, "%s: discarding: archiving policy: *%s*", filename, arule); rc = ERR_DISCARDED; - remove_stripped_attachments(&parser_state); + } + else if(cfg->archive_only_mydomains == 1 && sdata->internal_sender == 0 && sdata->internal_recipient == 0){ + syslog(LOG_PRIORITY, "%s: discarding: not on mydomains", filename); + rc = ERR_DISCARDED; } else { make_digests(sdata, cfg);