Hi,

I ran yesterday in a problem with qmailadmin, when I tried to forward a
user's email to some other accounts. I saw that I cannot add more than 2
forwards to the same email account.

i.e.:
"Forward to: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]"

If I edit .qmail by hand, adding more than 2 &[EMAIL PROTECTED] lines, the
forwarding is working, obviously, but qmailadmin it shows only the first
2 forwards.

I've found this limit in "user.c":

modusergo()
{
[...]
    count=0;
    while( tmpstr != NULL && count < 2) {  /* <= here */
      fprintf(fs,"&%s\n", tmpstr);
      tmpstr = strtok(NULL," ,\n");
      ++count;
    }
[...]

    /* save the forward for vacation too */
    GetValue(TmpCGI,box,"nforward=", MAX_BUFF);
    snprintf(NewBuf, 156, "%s/.qmail", vpw->pw_dir);
    fs = fopen(NewBuf, "a+");
    tmpstr = strtok(box, " ,;\n");
    count = 0;
    while( tmpstr != NULL && count < 2 ) {  /* <= and here */
      fprintf(fs, "&%s\n", tmpstr);
      tmpstr = strtok(NULL, " ,;\n");
      ++count;
    }
    fclose(fs);
[...]
}

Is there any good reason for this limit (count < 2)?
If I change this to a MAX_FWD_COUNT, what are the side effects if
MAX_FWD_COUNT is something around 10 or 20?
I'll grep the sources tomorrow but I'll appreciate any answer which will
help me to solve this issue.

Regards,
Mircea MITU



Reply via email to