* Zachary Bedell <[EMAIL PROTECTED]> [2004-05-29 02:20]: > I'm not sure if vPopMail would return account found if you asked for > alex-foo. I don't have --enable-qmail-ext set on my server right now. > If you have a sec, could you compile vpopaccountexists on your system > and see what it returns? Call it as: > ./vpopaccountexists [EMAIL PROTECTED] ; echo $? > If you see a 1 on the next line, then my code will handle those > addresses by virtue of vPopMail handling them for me.
It returns 0. You can do something like what you see in the attached diff (stolen code from vdelivermail.c) to have this work properly. BTW, I had to add -lcrypt to the compilation of vpopaccountexists (from makevpopaccountexists), else my compilation fails. Alex -- Alex Pleiner zeitform Internet Dienste Fraunhoferstrasse 5 64283 Darmstadt, Germany http://www.zeitform.de Tel.: +49 (0)6151 155-635 mailto:[EMAIL PROTECTED] Fax: +49 (0)6151 155-634 GnuPG/PGP Key-ID: 0x613C21EA
--- vpopaccountexists.c-orig 2004-06-01 14:56:58.000000000 +0200 +++ vpopaccountexists.c 2004-06-01 15:07:02.000000000 +0200 @@ -43,11 +43,12 @@ int main(int argc, char **argv) { char User[MAX_BUFF]; + char UserExt[MAX_BUFF]; char Domain[MAX_BUFF]; char DomainPath[MAX_BUFF]; char *dotqmailpath; struct stat sb; - int ret, fd; + int ret, fd, i; // Missing or invalid email address. Return qmail error code. if(argc != 2 || parse_email(argv[1], User, Domain, MAX_BUFF) != 0) exit(111); @@ -59,6 +60,15 @@ // Check for a real vpopmail account: if(vauth_getpw(User, Domain) != NULL) exit(1); // Found a matching mailbox + + // handle qmail-ext + for(i = 0; User[i] != 0; i++) { + if (User[i] == '-' ) break; + UserExt[i] = User[i]; + } + UserExt[i] = 0; + if ( is_username_valid(UserExt) != 0 ) { vexit(100); } + if(vauth_getpw(UserExt, Domain) != NULL) exit(1); // Found a matching mailbox // Check for a vpopmail alias (in valias table) if(valias_select(User, Domain) != NULL) exit(1); // Found an alias