masqmail

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
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 diff
     1.1 --- a/INSTALL	Fri Jul 16 14:48:17 2010 +0200
     1.2 +++ b/INSTALL	Fri Jul 16 15:38:53 2010 +0200
     1.3 @@ -83,13 +83,6 @@
     1.4  uses only gethostbyname() to resolve DNS names, and you cannot send
     1.5  mail without a smart host. Not recommended.
     1.6  
     1.7 ---disable-smtp-server
     1.8 -disables SMTP server support. You may want this if you do not need
     1.9 -masqmail to listen. In this case, you cannot use masqmail as a smart
    1.10 -host for other hosts on your LAN, you cannot use mail clients that
    1.11 -send SMTP, you cannot even use pine. In short, use of this option is
    1.12 -discouraged unless your resources are extremely limited.
    1.13 -
    1.14  
    1.15  --with-libcryto
    1.16  instead of using the md5 and hmac functions within the package, link
     2.1 --- a/acconfig.h	Fri Jul 16 14:48:17 2010 +0200
     2.2 +++ b/acconfig.h	Fri Jul 16 15:38:53 2010 +0200
     2.3 @@ -8,8 +8,6 @@
     2.4  
     2.5  #undef ENABLE_RESOLVER
     2.6  
     2.7 -#undef ENABLE_SMTP_SERVER
     2.8 -
     2.9  #undef ENABLE_AUTH
    2.10  
    2.11  #undef ENABLE_MAILDIR
     3.1 --- a/config.h.in	Fri Jul 16 14:48:17 2010 +0200
     3.2 +++ b/config.h.in	Fri Jul 16 15:38:53 2010 +0200
     3.3 @@ -9,8 +9,6 @@
     3.4  
     3.5  #undef ENABLE_RESOLVER
     3.6  
     3.7 -#undef ENABLE_SMTP_SERVER
     3.8 -
     3.9  #undef ENABLE_AUTH
    3.10  
    3.11  #undef ENABLE_MAILDIR
    3.12 @@ -52,9 +50,6 @@
    3.13  /* If the resolver is to be used */
    3.14  #undef ENABLE_RESOLVER
    3.15  
    3.16 -/* If the SMTP server is enabled */
    3.17 -#undef ENABLE_SMTP_SERVER
    3.18 -
    3.19  /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
    3.20  #undef HAVE_DOPRNT
    3.21  
     4.1 --- a/configure	Fri Jul 16 14:48:17 2010 +0200
     4.2 +++ b/configure	Fri Jul 16 15:38:53 2010 +0200
     4.3 @@ -704,7 +704,6 @@
     4.4  with_user
     4.5  with_group
     4.6  enable_debug
     4.7 -enable_smtp_server
     4.8  enable_auth
     4.9  enable_maildir
    4.10  with_libcrypto
    4.11 @@ -1347,7 +1346,6 @@
    4.12    --enable-dependency-tracking   do not reject slow dependency extractors
    4.13    --disable-resolver      disable resolver support
    4.14    --disable-debug         disable debugging
    4.15 -  --disable-smtp-server   disable smtp server support
    4.16    --enable-auth           enable AUTH (RFC 2554) client support
    4.17    --enable-maildir        enable qmail style maildir support
    4.18    --enable-ident          enable ident (RFC 1413) support
    4.19 @@ -5151,22 +5149,6 @@
    4.20  MD5_LIBS=''
    4.21  BASE64_LIBS=''
    4.22  
    4.23 -# Check whether --enable-smtp_server was given.
    4.24 -if test "${enable_smtp_server+set}" = set; then :
    4.25 -  enableval=$enable_smtp_server; if test "x$enable_smtp_server" != 'xno'; then
    4.26 -		smtp_server_enabled='yes'
    4.27 -	fi
    4.28 -else
    4.29 -  smtp_server_enabled='yes'
    4.30 -
    4.31 -fi
    4.32 -
    4.33 -if test "x$smtp_server_enabled" = xyes; then
    4.34 -
    4.35 -$as_echo "#define ENABLE_SMTP_SERVER 1" >>confdefs.h
    4.36 -
    4.37 -fi
    4.38 -
    4.39  # Check whether --enable-auth was given.
    4.40  if test "${enable_auth+set}" = set; then :
    4.41    enableval=$enable_auth; if test "x$enable_auth" != 'xno'; then
     5.1 --- a/configure.ac	Fri Jul 16 14:48:17 2010 +0200
     5.2 +++ b/configure.ac	Fri Jul 16 15:38:53 2010 +0200
     5.3 @@ -122,18 +122,6 @@
     5.4  MD5_LIBS=''
     5.5  BASE64_LIBS=''
     5.6  
     5.7 -dnl smtp server support (default is use it)
     5.8 -AC_ARG_ENABLE(smtp_server,
     5.9 -	[  --disable-smtp-server   disable smtp server support],
    5.10 -	if test "x$enable_smtp_server" != 'xno'; then
    5.11 -		smtp_server_enabled='yes'
    5.12 -	fi,
    5.13 -	smtp_server_enabled='yes'
    5.14 -	)
    5.15 -if test "x$smtp_server_enabled" = xyes; then
    5.16 -	AC_DEFINE(ENABLE_SMTP_SERVER, 1, [If the SMTP server is enabled])
    5.17 -fi
    5.18 -
    5.19  dnl auth support (default is to not use it)
    5.20  AC_ARG_ENABLE(auth,
    5.21  	[  --enable-auth           enable AUTH (RFC 2554) client support],
     6.1 --- a/src/listen.c	Fri Jul 16 14:48:17 2010 +0200
     6.2 +++ b/src/listen.c	Fri Jul 16 15:38:53 2010 +0200
     6.3 @@ -46,7 +46,6 @@
     6.4  	signal(SIGCHLD, sigchld_handler);
     6.5  }
     6.6  
     6.7 -#ifdef ENABLE_SMTP_SERVER
     6.8  void
     6.9  accept_connect(int listen_sock, int sock, struct sockaddr_in *sock_addr)
    6.10  {
    6.11 @@ -92,7 +91,6 @@
    6.12  	close(sock);
    6.13  	close(dup_sock);
    6.14  }
    6.15 -#endif  /*ifdef ENABLE_SMTP_SERVER */
    6.16  
    6.17  void
    6.18  listen_port(GList * iface_list, gint qival, char *argv[])
    6.19 @@ -108,7 +106,6 @@
    6.20  
    6.21  	/* Create the sockets and set them up to accept connections. */
    6.22  	FD_ZERO(&active_fd_set);
    6.23 -#ifdef ENABLE_SMTP_SERVER
    6.24  	for (node = g_list_first(iface_list); node; node = node_next) {
    6.25  		interface *iface = (interface *) (node->data);
    6.26  		int sock;
    6.27 @@ -127,7 +124,6 @@
    6.28  		DEBUG(5) debugf("sock = %d\n", sock);
    6.29  		FD_SET(sock, &active_fd_set);
    6.30  	}
    6.31 -#endif
    6.32  
    6.33  	/* setup handler for HUP signal: */
    6.34  	signal(SIGHUP, sighup_handler);
    6.35 @@ -192,7 +188,6 @@
    6.36  				}
    6.37  			}
    6.38  		} else if (sel_ret > 0) {
    6.39 -#ifdef ENABLE_SMTP_SERVER
    6.40  			for (i = 0; i < FD_SETSIZE; i++) {
    6.41  				if (FD_ISSET(i, &read_fd_set)) {
    6.42  					int sock = i;
    6.43 @@ -205,9 +200,6 @@
    6.44  						accept_connect(sock, new, &clientname);
    6.45  				}
    6.46  			}
    6.47 -#else
    6.48 -			;
    6.49 -#endif
    6.50  		} else {
    6.51  			/* If select returns 0, the interval time has elapsed.
    6.52  			   We start a new queue runner process */
     7.1 --- a/src/masqmail.c	Fri Jul 16 14:48:17 2010 +0200
     7.2 +++ b/src/masqmail.c	Fri Jul 16 15:38:53 2010 +0200
     7.3 @@ -177,7 +177,6 @@
     7.4  	listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv);
     7.5  }
     7.6  
     7.7 -#ifdef ENABLE_SMTP_SERVER
     7.8  static void
     7.9  mode_smtp()
    7.10  {
    7.11 @@ -204,7 +203,6 @@
    7.12  
    7.13  	smtp_in(stdin, stderr, peername, NULL);
    7.14  }
    7.15 -#endif
    7.16  
    7.17  static void
    7.18  mode_accept(address * return_path, gchar * full_sender_name, guint accept_flags, char **addresses, int addr_cnt)
    7.19 @@ -500,7 +498,6 @@
    7.20  
    7.21  	if (mta_mode == MODE_VERSION) {
    7.22  		gchar *with_resolver = "";
    7.23 -		gchar *with_smtp_server = "";
    7.24  		gchar *with_auth = "";
    7.25  		gchar *with_maildir = "";
    7.26  		gchar *with_ident = "";
    7.27 @@ -508,9 +505,6 @@
    7.28  #ifdef ENABLE_RESOLVER
    7.29  		with_resolver = " +resolver";
    7.30  #endif
    7.31 -#ifdef ENABLE_SMTP_SERVER
    7.32 -		with_smtp_server = " +smtp-server";
    7.33 -#endif
    7.34  #ifdef ENABLE_AUTH
    7.35  		with_auth = " +auth";
    7.36  #endif
    7.37 @@ -521,7 +515,7 @@
    7.38  		with_ident = " +ident";
    7.39  #endif
    7.40  
    7.41 -		printf("%s %s%s%s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_smtp_server,
    7.42 +		printf("%s %s%s%s%s%s\n", PACKAGE, VERSION, with_resolver,
    7.43  		       with_auth, with_maildir, with_ident);
    7.44  
    7.45  		exit(EXIT_SUCCESS);
    7.46 @@ -646,11 +640,7 @@
    7.47  		break;
    7.48  
    7.49  	case MODE_SMTP:
    7.50 -#ifdef ENABLE_SMTP_SERVER
    7.51  		mode_smtp();
    7.52 -#else
    7.53 -		fprintf(stderr, "smtp server support not compiled in\n");
    7.54 -#endif
    7.55  		break;
    7.56  
    7.57  	case MODE_LIST:
     8.1 --- a/src/smtp_in.c	Fri Jul 16 14:48:17 2010 +0200
     8.2 +++ b/src/smtp_in.c	Fri Jul 16 15:38:53 2010 +0200
     8.3 @@ -29,7 +29,6 @@
     8.4    RFC 2554 (ESMTP AUTH)
     8.5  */
     8.6  
     8.7 -#ifdef ENABLE_SMTP_SERVER
     8.8  
     8.9  smtp_cmd smtp_cmds[] = {
    8.10  	{SMTP_HELO, "HELO",},
    8.11 @@ -418,4 +417,3 @@
    8.12  		break;
    8.13  	}
    8.14  }
    8.15 -#endif