From: Baptiste Daroussin Date: Thu, 20 Oct 2022 11:03:18 +0000 (+0200) Subject: Add a "send" tunable X-Git-Tag: RELEASE_1_4_0a1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd2b95ca81c6fd5f7b997b51a090af94e90f66d1;p=thirdparty%2Fmlmmj.git Add a "send" tunable The "send" tunable corresponding to a list for emails from which mails will sent unconditionally. It will not be moderated, nor subject to subonlypost, nor modnonsubposts. --- diff --git a/TUNABLES b/TUNABLES index c42fbe33..16195e9d 100644 --- a/TUNABLES +++ b/TUNABLES @@ -263,3 +263,10 @@ entire content is used as value, it's marked "text". When this file is present, mlmmj will stop issueing bounce probes. It is intended to temporary disable the bounce probe for debugging purpose. + + + · send (list) + + The file contains a list of email address for which the mail will be sent + unconditionally. It will not be moderated, nor subject to subonlypost, nor + modnonsubposts. diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index ce30e96b..2917aea6 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -477,6 +477,7 @@ int main(int argc, char **argv) struct email_container rpemails = { 0, NULL }; struct email_container dtemails = { 0, NULL }; struct strlist *access_rules = NULL; + struct strlist *list_rules = NULL; struct strlist *delheaders = NULL; struct strlist allheaders; struct strlist *listaddrs = NULL; @@ -1023,6 +1024,16 @@ int main(int argc, char **argv) } } + list_rules = ctrlvalues(listdir, "send"); + if (list_rules != NULL) { + for (i = 0; i < list_rules->count; i++) { + if (strcasecmp(posteraddr, list_rules->strs[i]) == 0) { + send = 1; + break; + } + } + } + subonlypost = statctrl(listdir, "subonlypost"); modonlypost = statctrl(listdir, "modonlypost"); modnonsubposts = statctrl(listdir, "modnonsubposts");