changeset 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 (2010-07-16)
parents 45acc5727493
children 4fd237550525
files INSTALL acconfig.h config.h.in configure configure.ac src/listen.c src/masqmail.c src/smtp_in.c
diffstat 8 files changed, 1 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/INSTALL	Fri Jul 16 14:48:17 2010 +0200
+++ b/INSTALL	Fri Jul 16 15:38:53 2010 +0200
@@ -83,13 +83,6 @@
 uses only gethostbyname() to resolve DNS names, and you cannot send
 mail without a smart host. Not recommended.
 
---disable-smtp-server
-disables SMTP server support. You may want this if you do not need
-masqmail to listen. In this case, you cannot use masqmail as a smart
-host for other hosts on your LAN, you cannot use mail clients that
-send SMTP, you cannot even use pine. In short, use of this option is
-discouraged unless your resources are extremely limited.
-
 
 --with-libcryto
 instead of using the md5 and hmac functions within the package, link
--- a/acconfig.h	Fri Jul 16 14:48:17 2010 +0200
+++ b/acconfig.h	Fri Jul 16 15:38:53 2010 +0200
@@ -8,8 +8,6 @@
 
 #undef ENABLE_RESOLVER
 
-#undef ENABLE_SMTP_SERVER
-
 #undef ENABLE_AUTH
 
 #undef ENABLE_MAILDIR
--- a/config.h.in	Fri Jul 16 14:48:17 2010 +0200
+++ b/config.h.in	Fri Jul 16 15:38:53 2010 +0200
@@ -9,8 +9,6 @@
 
 #undef ENABLE_RESOLVER
 
-#undef ENABLE_SMTP_SERVER
-
 #undef ENABLE_AUTH
 
 #undef ENABLE_MAILDIR
@@ -52,9 +50,6 @@
 /* If the resolver is to be used */
 #undef ENABLE_RESOLVER
 
-/* If the SMTP server is enabled */
-#undef ENABLE_SMTP_SERVER
-
 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
 #undef HAVE_DOPRNT
 
--- a/configure	Fri Jul 16 14:48:17 2010 +0200
+++ b/configure	Fri Jul 16 15:38:53 2010 +0200
@@ -704,7 +704,6 @@
 with_user
 with_group
 enable_debug
-enable_smtp_server
 enable_auth
 enable_maildir
 with_libcrypto
@@ -1347,7 +1346,6 @@
   --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-resolver      disable resolver support
   --disable-debug         disable debugging
-  --disable-smtp-server   disable smtp server support
   --enable-auth           enable AUTH (RFC 2554) client support
   --enable-maildir        enable qmail style maildir support
   --enable-ident          enable ident (RFC 1413) support
@@ -5151,22 +5149,6 @@
 MD5_LIBS=''
 BASE64_LIBS=''
 
-# Check whether --enable-smtp_server was given.
-if test "${enable_smtp_server+set}" = set; then :
-  enableval=$enable_smtp_server; if test "x$enable_smtp_server" != 'xno'; then
-		smtp_server_enabled='yes'
-	fi
-else
-  smtp_server_enabled='yes'
-
-fi
-
-if test "x$smtp_server_enabled" = xyes; then
-
-$as_echo "#define ENABLE_SMTP_SERVER 1" >>confdefs.h
-
-fi
-
 # Check whether --enable-auth was given.
 if test "${enable_auth+set}" = set; then :
   enableval=$enable_auth; if test "x$enable_auth" != 'xno'; then
--- a/configure.ac	Fri Jul 16 14:48:17 2010 +0200
+++ b/configure.ac	Fri Jul 16 15:38:53 2010 +0200
@@ -122,18 +122,6 @@
 MD5_LIBS=''
 BASE64_LIBS=''
 
-dnl smtp server support (default is use it)
-AC_ARG_ENABLE(smtp_server,
-	[  --disable-smtp-server   disable smtp server support],
-	if test "x$enable_smtp_server" != 'xno'; then
-		smtp_server_enabled='yes'
-	fi,
-	smtp_server_enabled='yes'
-	)
-if test "x$smtp_server_enabled" = xyes; then
-	AC_DEFINE(ENABLE_SMTP_SERVER, 1, [If the SMTP server is enabled])
-fi
-
 dnl auth support (default is to not use it)
 AC_ARG_ENABLE(auth,
 	[  --enable-auth           enable AUTH (RFC 2554) client support],
--- a/src/listen.c	Fri Jul 16 14:48:17 2010 +0200
+++ b/src/listen.c	Fri Jul 16 15:38:53 2010 +0200
@@ -46,7 +46,6 @@
 	signal(SIGCHLD, sigchld_handler);
 }
 
-#ifdef ENABLE_SMTP_SERVER
 void
 accept_connect(int listen_sock, int sock, struct sockaddr_in *sock_addr)
 {
@@ -92,7 +91,6 @@
 	close(sock);
 	close(dup_sock);
 }
-#endif  /*ifdef ENABLE_SMTP_SERVER */
 
 void
 listen_port(GList * iface_list, gint qival, char *argv[])
@@ -108,7 +106,6 @@
 
 	/* Create the sockets and set them up to accept connections. */
 	FD_ZERO(&active_fd_set);
-#ifdef ENABLE_SMTP_SERVER
 	for (node = g_list_first(iface_list); node; node = node_next) {
 		interface *iface = (interface *) (node->data);
 		int sock;
@@ -127,7 +124,6 @@
 		DEBUG(5) debugf("sock = %d\n", sock);
 		FD_SET(sock, &active_fd_set);
 	}
-#endif
 
 	/* setup handler for HUP signal: */
 	signal(SIGHUP, sighup_handler);
@@ -192,7 +188,6 @@
 				}
 			}
 		} else if (sel_ret > 0) {
-#ifdef ENABLE_SMTP_SERVER
 			for (i = 0; i < FD_SETSIZE; i++) {
 				if (FD_ISSET(i, &read_fd_set)) {
 					int sock = i;
@@ -205,9 +200,6 @@
 						accept_connect(sock, new, &clientname);
 				}
 			}
-#else
-			;
-#endif
 		} else {
 			/* If select returns 0, the interval time has elapsed.
 			   We start a new queue runner process */
--- a/src/masqmail.c	Fri Jul 16 14:48:17 2010 +0200
+++ b/src/masqmail.c	Fri Jul 16 15:38:53 2010 +0200
@@ -177,7 +177,6 @@
 	listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv);
 }
 
-#ifdef ENABLE_SMTP_SERVER
 static void
 mode_smtp()
 {
@@ -204,7 +203,6 @@
 
 	smtp_in(stdin, stderr, peername, NULL);
 }
-#endif
 
 static void
 mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt)
@@ -500,7 +498,6 @@
 
 	if (mta_mode == MODE_VERSION) {
 		gchar *with_resolver = "";
-		gchar *with_smtp_server = "";
 		gchar *with_auth = "";
 		gchar *with_maildir = "";
 		gchar *with_ident = "";
@@ -508,9 +505,6 @@
 #ifdef ENABLE_RESOLVER
 		with_resolver = " +resolver";
 #endif
-#ifdef ENABLE_SMTP_SERVER
-		with_smtp_server = " +smtp-server";
-#endif
 #ifdef ENABLE_AUTH
 		with_auth = " +auth";
 #endif
@@ -521,7 +515,7 @@
 		with_ident = " +ident";
 #endif
 
-		printf("%s %s%s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_smtp_server,
+		printf("%s %s%s%s%s%s\n", PACKAGE, VERSION, with_resolver,
 		       with_auth, with_maildir, with_ident);
 
 		exit(EXIT_SUCCESS);
@@ -646,11 +640,7 @@
 		break;
 
 	case MODE_SMTP:
-#ifdef ENABLE_SMTP_SERVER
 		mode_smtp();
-#else
-		fprintf(stderr, "smtp server support not compiled in\n");
-#endif
 		break;
 
 	case MODE_LIST:
--- a/src/smtp_in.c	Fri Jul 16 14:48:17 2010 +0200
+++ b/src/smtp_in.c	Fri Jul 16 15:38:53 2010 +0200
@@ -29,7 +29,6 @@
   RFC 2554 (ESMTP AUTH)
 */
 
-#ifdef ENABLE_SMTP_SERVER
 
 smtp_cmd smtp_cmds[] = {
 	{SMTP_HELO, "HELO",},
@@ -418,4 +417,3 @@
 		break;
 	}
 }
-#endif