]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Make it possible to specify several owner emailaddresses, not just one
authormmj <none@none>
Thu, 17 Jun 2004 12:48:34 +0000 (22:48 +1000)
committermmj <none@none>
Thu, 17 Jun 2004 12:48:34 +0000 (22:48 +1000)
TUNABLES
src/mlmmj-process.c
src/mlmmj-send.c

index e208d32ba4484ef1ef7a965a69bc570c275d1918..ebd3d6fb1336b9d6951246f2f155142022ee7dd5 100644 (file)
--- 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.)
index 0152ad0c7f89a4c01f627081067359c0c01eaa0d..0166e6c8bd1a1e3c67cc30b084ee22e016c3d2c6 100644 (file)
@@ -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",
index 6e9b223c8a7ca368c161c74fb0ff956299055ca6..046601341595fa363db87f9e593ee40a2528ab3e 100644 (file)
@@ -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) {