]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
When using Delivered-To: for spotting the recipient delimiter we
authormmj <none@none>
Wed, 20 Oct 2004 12:12:18 +0000 (22:12 +1000)
committermmj <none@none>
Wed, 20 Oct 2004 12:12:18 +0000 (22:12 +1000)
should also use it when calling listcontrol.

ChangeLog
src/mlmmj-process.c

index 7faf02ec935389ac88399df1c9c959218ab0ff52..e5c58d4d38d26f6a58822cd6a578bd69c4df6b69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ o Be consistent when using To: or Delivered-To:
  o mlmmj-unsub should also change user id to the listdir owner
  o Add support for not archiving the list by touching listdir/control/noarchive
  o Add 'nomail' version of lists. Subscribers to the nomail version are
index 30b5d389136662e46aa65bbe251a3cef3f7e4a84..589ebc45825ec1acdb4ea04adc9c260c6248eb37 100644 (file)
@@ -349,6 +349,7 @@ int main(int argc, char **argv)
        struct email_container ccemails = { 0, NULL };
        struct email_container efromemails = { 0, NULL };
        struct email_container dtoemails = { 0, NULL };
+       struct email_container *whichto;
        struct strlist *access_rules = NULL;
        struct strlist *delheaders = NULL;
        struct strlist allheaders;
@@ -536,9 +537,14 @@ int main(int argc, char **argv)
        }
 
        if(dtoemails.emaillist)
-               recipdelim = strchr(dtoemails.emaillist[0], RECIPDELIM);
+               whichto = &dtoemails;
        else if(toemails.emaillist)
-               recipdelim = strchr(toemails.emaillist[0], RECIPDELIM);
+               whichto = &toemails;
+       else
+               whichto = NULL;
+
+       if(whichto && whichto->emaillist && whichto->emaillist[0])
+               recipdelim = strchr(whichto->emaillist[0], RECIPDELIM);
        else
                recipdelim = NULL;
 
@@ -560,7 +566,7 @@ int main(int argc, char **argv)
                log_error(LOG_ARGS, "listcontrol(from, %s, %s, %s, %s, %s, %s)\n", listdir, toemails.emaillist[0], mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce);
 #endif
                unlink(mailfile);
-               listcontrol(&fromemails, listdir, toemails.emaillist[0],
+               listcontrol(&fromemails, listdir, whichto->emaillist[0],
                            mlmmjsub, mlmmjunsub, mlmmjsend, mlmmjbounce,
                            donemailname);
                return EXIT_SUCCESS;