I need pop-before-smtp to work with vpopmail (yes, yes, I know, don't ask). Enabling the code to update the relays file brings a small bug to light, fixable with the following patch: --- passdb-vpopmail.c~ 2008-09-25 15:06:47.000000000 +0100 +++ passdb-vpopmail.c 2008-09-25 15:07:14.000000000 +0100 @@ -31,9 +31,9 @@ } if (((vpw->pw_gid & NO_IMAP) != 0 && - strcmp(auth_request->service, "IMAP") == 0) || + strcasecmp(auth_request->service, "IMAP") == 0) || ((vpw->pw_gid & NO_POP) != 0 && - strcmp(auth_request->service, "POP3") == 0)) { + strcasecmp(auth_request->service, "POP3") == 0)) { auth_request_log_info(auth_request, "vpopmail", "%s disabled", auth_request->service); password = NULL; @@ -101,8 +101,8 @@ } #ifdef HAVE_VPOPMAIL_OPEN_SMTP_RELAY - if (strcmp(request->service, "POP3") == 0 || - strcmp(request->service, "IMAP") == 0) { + if (strcasecmp(request->service, "POP3") == 0 || + strcasecmp(request->service, "IMAP") == 0) { const char *host = net_ip2addr(&request->remote_ip); if (host != NULL) { /* use putenv() directly rather than env_put() which (in my case, auth_request->service and request->service are "pop3", so the comparison fails and the relays file is never updated.) James