Re: [PATCH] dbmail-3.2.0 cannot listen only tls

Sergej Pupykin <[email protected]> Wed, 03 Sep 2014 13:27:32 +0400
Newsgroups gmane.mail.imap.dbmail.devel
Message-ID <87fvg9835n.wl%[email protected]>
At Tue, 02 Sep 2014 17:06:08 +0400,
Sergej Pupykin <[email protected]> wrote:
> 
> Hi,
> 
> if I commented out port= settings neither pop3d nor imapd listen
> anything.

Here is the patch

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
tls-only-listen.patch (application/octet-stream, 865 B)
diff -wbBur dbmail-3.2.0/src/server.c dbmail-3.2.0.my/src/server.c
--- dbmail-3.2.0/src/server.c	2014-08-23 17:01:38.000000000 +0400
+++ dbmail-3.2.0.my/src/server.c	2014-09-03 13:24:22.025805061 +0400
@@ -793,7 +793,7 @@
 	if (server_setup(conf))
 		return -1;
 
-	if (strlen(conf->port)) {
+	if (strlen(conf->port) || strlen(conf->ssl_port)) {
 
 		if (MATCH(conf->service_name, "HTTP")) {
 			int port = atoi(conf->port);
@@ -829,7 +829,6 @@
 				event_assign(evsock[i], evbase, conf->listenSockets[i], EV_READ, server_sock_cb, evsock[i]);
 				event_add(evsock[i], NULL);
 			}
-			k = i+1;
 			for (k = i, i = 0; i < conf->ssl_socketcount; i++, k++) {
 				TRACE(TRACE_DEBUG, "Adding event for ssl socket [%d] [%d/%d]", conf->ssl_listenSockets[i], k+1, total);
 				evsock[k] = event_new(evbase, conf->ssl_listenSockets[i], EV_READ, server_sock_ssl_cb, NULL);