Hello,
Earlier today we had a customer with a long domain name sign up for our
services (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com).

I used the following command and arguments to add the domain to vpopmail.
vadddomain -q10M -b xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com.

When adding them using the vpopmail tool vadddomain command I received the
following error "Error: dir too long".

We are currently using vpopmail version 5.3.30, and the source code for this
version is the basis for my real question.

When reading the source code I found that within vpopmail.c this error is
generated when the vadddomain function evaluates dir, DOMAINS_DIR, and
DomainSubDir as greater then or equal to MAX_PW_DOMAIN. Which is defined by
default as 64 in vpopmail.h.

if (strlen(dir)+strlen(DOMAINS_DIR)+strlen(DomainSubDir) >= MAX_PW_DOMAIN) {
    /* back out of changes made so far */
    dec_dir_control(dir_control_for_uid, uid, gid);
    chdir(calling_dir);
    return(VA_DIR_TOO_LONG);
}

Should this not be evaluated against say the MAX_PW_DIR definition? I am not
very familiar with the insides of vpopmail, so I am more or less just
interested in if I should do one of two things.

1) Increase the size of MAX_PW_DOMAIN beyond 64.
2) Change the evaluation in vadddomain() to use MAX_PW_DIR instead of
MAX_PW_DOMAIN.

Or has this been changed fixed in newer versions of vpopmail?

Take care, and thank you in advance for taking the time to respond to my
inquiry.

--
Sean



Reply via email to