From: Baptiste Daroussin Date: Thu, 13 Nov 2025 15:33:55 +0000 (+0100) Subject: rename modemailsender to selfmoderate X-Git-Tag: RELEASE_1_7_0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff3706855a0ef2ac362b7d2d5d39bf76df3112b0;p=thirdparty%2Fmlmmj.git rename modemailsender to selfmoderate --- diff --git a/TUNABLES.md b/TUNABLES.md index 0c929b12..99839610 100644 --- a/TUNABLES.md +++ b/TUNABLES.md @@ -135,7 +135,7 @@ entire content is used as value, it's marked "text". If this file is present, the poster (based on the envelope from) will get a mail when their post is being moderated. - * modemailsender (boolean) + * selfmoderate (boolean) If this file is present, moderation emails for posts are sent to the original sender instead of the moderators. Only affects moderated lists. diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index 300514a1..3f5f3f8a 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -122,7 +122,7 @@ static void newmoderated(struct ml *ml, const char *mailfilename, const char *efromismod = NULL; const char *mailbasename = mybasename(mailfilename); int notifymod = 0; - int modemailsender = 0; + bool selfmoderate = 0; struct mail mail; #if 0 printf("mailfilename = [%s], mailbasename = [%s]\n", mailfilename, @@ -145,9 +145,9 @@ static void newmoderated(struct ml *ml, const char *mailfilename, gen_addr(from, ml, "owner"); - modemailsender = statctrl(ml->ctrlfd, "modemailsender"); + selfmoderate = statctrl(ml->ctrlfd, "selfmoderate"); - if (modemailsender) + if (selfmoderate) to = xstrdup(posteraddr); else xasprintf(&to, "%s-moderators@%s", ml->name, ml->fqdn); @@ -210,7 +210,7 @@ static void newmoderated(struct ml *ml, const char *mailfilename, exit(EXIT_SUCCESS); } - if (modemailsender) { + if (selfmoderate) { memset(&mail, 0, sizeof(mail)); mail.from = from; mail.to = to; diff --git a/tests/mlmmj-receive.in b/tests/mlmmj-receive.in index 98a999ed..75e2d350 100644 --- a/tests/mlmmj-receive.in +++ b/tests/mlmmj-receive.in @@ -19,8 +19,8 @@ tests_init \ subscription_moderation \ moderation \ moderation_autosubscribe \ - moderation_modemailsender \ - moderation_modemailsender_autosubscribe \ + moderation_selfmoderate \ + moderation_selfmoderate_autosubscribe \ moderation_notifymod \ moderation_notmetoo \ moderation_reject_invalid \ @@ -2009,15 +2009,15 @@ moderation_autosubscribe_body() { } -moderation_modemailsender_body() { +moderation_selfmoderate_body() { moderation_init_body bob@test - atf_check touch list/control/modemailsender + atf_check touch list/control/selfmoderate moderation_test_body bob@test } -moderation_modemailsender_autosubscribe_body() { +moderation_selfmoderate_autosubscribe_body() { moderation_init_body bob@test - touch list/control/modemailsender + touch list/control/selfmoderate touch list/control/autosubscribe moderation_test_body bob@test atf_check -o inline:"bob@test\n" cat list/nomailsubs.d/b