[Dovecot] patch for passdb-vpopmail in v1.1.3
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
On Sep 25, 2008, at 5:16 PM, James Fidell wrote:
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:
Committed: http://hg.dovecot.org/dovecot-1.1/rev/9d5639f6ce9a
(in my case, auth_request->service and request->service are "pop3", so the comparison fails and the relays file is never updated.)
I guess I changed them accidentally. I had previously thought that
they should be lowercase but then thought I don't want to break
backwards compatibility, but looks like I did it anyway :) Oh well,
wiki needs updating then.
participants (2)
-
James Fidell
-
Timo Sirainen