> Robert Borden wrote:
>
> can vqadmin have a list of the domains setup on the box rather then
> having to type one in?
>
> Rob
That's a really good idea.
Have a page to List Domains
with a pattern matching feature.
Then for each domain provide a link to each of
the other domain based features, display domain,
delete domain, list users.
The vpopmail sql modules all support the LIKE
verb. So pattern matching is easy to implement.
For the cdb or as a default module we can use
regex to search the /var/qmail/usrs/assign file.
Regex test program:
#include <sys/types.h>
#include <regex.h>
main( int argc, char *argv[] )
{
char *pattern = argv[1];
char *line = argv[2];
char errbuf[100];
regex_t preg;
int ret;
printf("regexcomp %s : %d\n", pattern,
regcomp(&preg, pattern, REG_ICASE | REG_NOSUB | REG_NEWLINE ));
printf("regexec %s : %d\n", line, line,
(ret=regexec(&preg, line, 0, 0, 0 )));
regerror(ret, &preg, errbuf, 100);
printf("%s\n", errbuf);
regfree(&preg);
}
I wish I understood Dan Bernsteins cdb search
functions. It can probably do the pattern matching.
Then we could just add it to the base vpopmail
library.
Ken Jones