masqmail
diff src/listen.c @ 204:5745edd5b769
removed the --disable-smtp-server configure option
masqmail will now always have the possibility to listen on a port compiled in
if you don't want it to listen on a port add this to your masqmail.conf:
listen_addresses = ""
also, if you don't start it as daemon it will not listen neither
author | meillo@marmaro.de |
---|---|
date | Fri, 16 Jul 2010 15:38:53 +0200 |
parents | f671821d8222 |
children | dcb315792513 |
line diff
1.1 --- a/src/listen.c Fri Jul 16 14:48:17 2010 +0200 1.2 +++ b/src/listen.c Fri Jul 16 15:38:53 2010 +0200 1.3 @@ -46,7 +46,6 @@ 1.4 signal(SIGCHLD, sigchld_handler); 1.5 } 1.6 1.7 -#ifdef ENABLE_SMTP_SERVER 1.8 void 1.9 accept_connect(int listen_sock, int sock, struct sockaddr_in *sock_addr) 1.10 { 1.11 @@ -92,7 +91,6 @@ 1.12 close(sock); 1.13 close(dup_sock); 1.14 } 1.15 -#endif /*ifdef ENABLE_SMTP_SERVER */ 1.16 1.17 void 1.18 listen_port(GList * iface_list, gint qival, char *argv[]) 1.19 @@ -108,7 +106,6 @@ 1.20 1.21 /* Create the sockets and set them up to accept connections. */ 1.22 FD_ZERO(&active_fd_set); 1.23 -#ifdef ENABLE_SMTP_SERVER 1.24 for (node = g_list_first(iface_list); node; node = node_next) { 1.25 interface *iface = (interface *) (node->data); 1.26 int sock; 1.27 @@ -127,7 +124,6 @@ 1.28 DEBUG(5) debugf("sock = %d\n", sock); 1.29 FD_SET(sock, &active_fd_set); 1.30 } 1.31 -#endif 1.32 1.33 /* setup handler for HUP signal: */ 1.34 signal(SIGHUP, sighup_handler); 1.35 @@ -192,7 +188,6 @@ 1.36 } 1.37 } 1.38 } else if (sel_ret > 0) { 1.39 -#ifdef ENABLE_SMTP_SERVER 1.40 for (i = 0; i < FD_SETSIZE; i++) { 1.41 if (FD_ISSET(i, &read_fd_set)) { 1.42 int sock = i; 1.43 @@ -205,9 +200,6 @@ 1.44 accept_connect(sock, new, &clientname); 1.45 } 1.46 } 1.47 -#else 1.48 - ; 1.49 -#endif 1.50 } else { 1.51 /* If select returns 0, the interval time has elapsed. 1.52 We start a new queue runner process */