From: mmj Date: Thu, 17 Jun 2004 12:48:34 +0000 (+1000) Subject: Make it possible to specify several owner emailaddresses, not just one X-Git-Tag: RELEASE_1_0_0~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abeea08bfc0829752b1e36d288a562c23e4cad4e;p=thirdparty%2Fmlmmj.git Make it possible to specify several owner emailaddresses, not just one --- diff --git a/TUNABLES b/TUNABLES index e208d32b..ebd3d6fb 100644 --- a/TUNABLES +++ b/TUNABLES @@ -5,7 +5,8 @@ The following files can be used for changing the behaviour of a list. The filename is supposed to be below listdir/control. In the case it's a "boolean", the contents of a file does not matter, the mere presence of it, will set the variable to "true". If it's a "normal" file, the first line will be used as -value, leaving line 2 and forward ready for commentary etc. +value, leaving line 2 and forward ready for commentary etc. If it's possible +to specify several entries pr. line, it's marked "list". · closedlist (boolean) @@ -34,5 +35,10 @@ value, leaving line 2 and forward ready for commentary etc. The prefix for the Subject: line of mails to the list. This will alter the Subject: line, and add a prefix if it's not present elsewhere. + · owner (list) + + The emailaddresses in this file (1 pr. line) will get mails to + listname+owner@listdomain.tld + ... more to follow. (relayhost, owner etc.) diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index 0152ad0c..0166e6c8 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -327,13 +327,13 @@ int main(int argc, char **argv) recipdelim = strchr(toemails.emaillist[0], RECIPDELIM); if(recipdelim) { - owner = ctrlvalue(listdir, "owner"); + owner = concatstr(2, listdir, "control/owner"); if(owner && strncmp(recipdelim, "+owner@", 7) == 0) { unlink(donemailname); execlp(mlmmjsend, mlmmjsend, - "-l", "1", - "-T", owner, + "-l", "4", "-F", efromemails.emaillist[0], + "-s", owner, "-a", "-m", mailfile, 0); log_error(LOG_ARGS, "execlp() of '%s' failed", diff --git a/src/mlmmj-send.c b/src/mlmmj-send.c index 6e9b223c..04660134 100644 --- a/src/mlmmj-send.c +++ b/src/mlmmj-send.c @@ -531,7 +531,8 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); } break; - case '3': /* resending earlier failed mails */ + case '3': + case '4': /* sending mails to subfile */ if((subfd = open(subfilename, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s':", subfilename); @@ -615,6 +616,15 @@ int main(int argc, char **argv) endsmtp(&sockfd); unlink(subfilename); break; + case '4': /* send mails to owner */ + initsmtp(&sockfd, relayhost); + if(send_mail_many(sockfd, bounceaddr, NULL, mailmap, st.st_size, + subfd, listaddr, mailfilename, listdir, + mlmmjbounce)) + close(sockfd); + else + endsmtp(&sockfd); + break; default: /* normal list mail */ subddirname = concatstr(2, listdir, "/subscribers.d/"); if((subddir = opendir(subddirname)) == NULL) {