From: mmj Date: Wed, 20 Oct 2004 12:12:18 +0000 (+1000) Subject: When using Delivered-To: for spotting the recipient delimiter we X-Git-Tag: RELEASE_1_1_0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=846ce837100b85cce6217c4363adb925bb600cb1;p=thirdparty%2Fmlmmj.git When using Delivered-To: for spotting the recipient delimiter we should also use it when calling listcontrol. --- diff --git a/ChangeLog b/ChangeLog index 7faf02ec..e5c58d4d 100644 --- 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 diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index 30b5d389..589ebc45 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -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;