Is It possible to integrate this patch into next dovecot's releases?
It implements the "-w ( disable webmail [IMAP from localhost*] access
)" option when using vpopmail.

** Patch created following dovecot mailing list information **

Thanks
-- 
[ ]'s
Aledr - Alexandre
"OpenSource Solutions for SmallBusiness Problems"
diff -Naur ./passdb-vpopmail.c dovecot-1.1.2/src/auth/passdb-vpopmail.c
--- ./passdb-vpopmail.c	2008-06-24 12:12:36.000000000 -0300
+++ dovecot-1.1.1/src/auth/passdb-vpopmail.c	2008-06-24 12:16:36.000000000 -0300
@@ -30,8 +30,12 @@
 		return NULL;
 	}
 
+	char *remotehost = net_ip2addr(&auth_request->remote_ip);
+	auth_request_log_info(auth_request, "vpopmail", "remote ip is: %s",remotehost);
+
 	if (((vpw->pw_gid & NO_IMAP) != 0 &&
-	     strcmp(auth_request->service, "IMAP") == 0) ||
+	     strcmp(auth_request->service, "IMAP") == 0  &&  strcmp(remotehost, "127.0.0.1") !=0) ||
+	    ((vpw->pw_gid & NO_WEBMAIL) != 0 && strcmp(remotehost, "127.0.0.1") == 0) ||
 	    ((vpw->pw_gid & NO_POP) != 0 &&
 	     strcmp(auth_request->service, "POP3") == 0)) {
 		auth_request_log_info(auth_request, "vpopmail",

Reply via email to