Sorry in advance if this is the wrong list, but I couldn't find anywhere to
send patches for qmailadmin

Anyway, I was running qmailadmin-0.30 w/ezmlm+idx and was tring to use some of
the spiffy features, well the -5 commented out in the src just passed the email
addr which cuased the ezmlm portion to fail for me no matter what, second, when
uncommenting the -5 so it passed it with the email addr it was using execl()
and passing it all as one string so the owner email became [EMAIL PROTECTED] -A
-L -L -My other options as well.

I wrote up a quick patch for it, below is a unified diff
what I did quickly was remove teh execl() call and add execv() and pass the
args seperated instead of in one huge string. <I also attached it>

Thanks to _dimi #C dalnet for his assistance.

Hope it helps
LeRoy

--BEGIN PATCH--

--- mailinglist.c       Fri May 12 07:36:24 2000
+++ /usr/local/src/qmailadmin-0.30/mailinglist.c        Tue Jul 11 18:10:13
2000@@ -252,6 +252,9 @@
 #ifdef EZMLMIDX
        char list_owner[MAX_BUFF];
        char options[MAX_BUFF];
+       char *arguments[MAX_BUFF];
+       char owneremail[MAX_BUFF+5];
+       int i=0;
        char tmp[MAX_BUFF];
        char loop_ch[MAX_BUFF];
        int  loop;
@@ -280,9 +283,9 @@
        memset(loop_ch, 0, MAX_BUFF);

        GetValue(TmpCGI, list_owner, "5=", MAX_BUFF); // Get the listowner
-       strcat(options, "-5 ");
-       strcat(options, list_owner);
-       strcat(options, " ");
+       strcat(owneremail, "-5 ");
+       strcat(owneremail, list_owner);
+/*     strcat(options, " "); */
 #if DEBUG
        fprintf(actout, "5=%s\n<br>", list_owner);
 #endif
@@ -293,6 +296,7 @@
                strcat(options, loop_ch);
                strcat(options, " ");
        }
+
        memset(tmp, 0, MAX_BUFF);
        GetValue(TmpCGI, tmp, "sqlsupport=", MAX_BUFF);
 #if DEBUG
@@ -321,7 +325,17 @@
                sprintf(TmpBuf2, "%s/domains/%s/%s", Vpophome, Domain,
ActionUser);
                sprintf(TmpBuf3, "%s/domains/%s/.qmail-%s", Vpophome, Domain,
ActionUser);
 #ifdef EZMLMIDX
-               execl(TmpBuf1, "ezmlm-make", options, TmpBuf2, TmpBuf3,
ActionUser, Domain , NULL);
+               arguments[0] = "ezmlm-make";
+               arguments[1] = strtok(options, " ");
+               while((arguments[i]=strtok(NULL, " ")) != NULL) {
+               i++;
+               }
+               arguments[i]=owneremail;
+               arguments[i+1]=TmpBuf2;
+               arguments[i+2]=TmpBuf3;
+               arguments[i+3]=ActionUser;
+               arguments[i+4]=Domain;
+               execv(TmpBuf1, arguments);
 #else
                execl(TmpBuf1, "ezmlm-make", TmpBuf2, TmpBuf3, ActionUser,
Domain , NULL);
 #endif

--END PATCH

LeRoy C. Miller III
Network Administrator ANSIC Networks
Email: [EMAIL PROTECTED]
Phone: 610-681-6504
Whois NIC: LM4772
http://www.ansic.net <not fully functional yet>
--- mailinglist.c       Fri May 12 07:36:24 2000
+++ /usr/local/src/qmailadmin-0.30/mailinglist.c        Tue Jul 11 18:10:13 2000
@@ -252,6 +252,9 @@
 #ifdef EZMLMIDX
        char list_owner[MAX_BUFF];
        char options[MAX_BUFF];
+       char *arguments[MAX_BUFF];
+       char owneremail[MAX_BUFF+5];    
+       int i=0;
        char tmp[MAX_BUFF];
        char loop_ch[MAX_BUFF];
        int  loop;
@@ -280,9 +283,9 @@
        memset(loop_ch, 0, MAX_BUFF);
 
        GetValue(TmpCGI, list_owner, "5=", MAX_BUFF); // Get the listowner
-       strcat(options, "-5 ");
-       strcat(options, list_owner);
-       strcat(options, " ");
+       strcat(owneremail, "-5 ");
+       strcat(owneremail, list_owner);
+/*     strcat(options, " "); */
 #if DEBUG
        fprintf(actout, "5=%s\n<br>", list_owner);
 #endif
@@ -293,6 +296,7 @@
                strcat(options, loop_ch);
                strcat(options, " ");
        }
+
        memset(tmp, 0, MAX_BUFF);
        GetValue(TmpCGI, tmp, "sqlsupport=", MAX_BUFF);
 #if DEBUG
@@ -321,7 +325,17 @@
                sprintf(TmpBuf2, "%s/domains/%s/%s", Vpophome, Domain, ActionUser);
                sprintf(TmpBuf3, "%s/domains/%s/.qmail-%s", Vpophome, Domain, 
ActionUser);
 #ifdef EZMLMIDX
-               execl(TmpBuf1, "ezmlm-make", options, TmpBuf2, TmpBuf3, ActionUser, 
Domain , 
NULL);
+               arguments[0] = "ezmlm-make";
+               arguments[1] = strtok(options, " ");    
+               while((arguments[i]=strtok(NULL, " ")) != NULL) {
+               i++;
+               }
+               arguments[i]=owneremail; 
+               arguments[i+1]=TmpBuf2;
+               arguments[i+2]=TmpBuf3;
+               arguments[i+3]=ActionUser;
+               arguments[i+4]=Domain;
+               execv(TmpBuf1, arguments);
 #else
                execl(TmpBuf1, "ezmlm-make", TmpBuf2, TmpBuf3, ActionUser, Domain , 
NULL);
 #endif

Reply via email to