masqmail

diff src/masqmail.c @ 378:5781ba87df95

Removed ident. This had been discussed on the mailing list in Oct 2011. Ident is hardly useful in typical setups for masqmail. Probably Oliver had used it in his setup; that would make sense. Now, I know of nobody who needs it.
author markus schnalke <meillo@marmaro.de>
date Sat, 14 Jan 2012 21:36:58 +0100
parents b27f66555ba8
children cdd16614c1f5
line diff
     1.1 --- a/src/masqmail.c	Sat Jan 14 18:44:48 2012 +0100
     1.2 +++ b/src/masqmail.c	Sat Jan 14 21:36:58 2012 +0100
     1.3 @@ -77,26 +77,6 @@
     1.4  	raise(sig);
     1.5  }
     1.6  
     1.7 -#ifdef ENABLE_IDENT  /* so far used for that only */
     1.8 -static gboolean
     1.9 -is_in_netlist(gchar *host, GList *netlist)
    1.10 -{
    1.11 -	guint hostip = inet_addr(host);
    1.12 -	struct in_addr addr;
    1.13 -
    1.14 -	addr.s_addr = hostip;
    1.15 -	if (addr.s_addr != INADDR_NONE) {
    1.16 -		GList *node;
    1.17 -		foreach(netlist, node) {
    1.18 -			struct in_addr *net = (struct in_addr *) (node->data);
    1.19 -			if ((addr.s_addr & net->s_addr) == net->s_addr)
    1.20 -				return TRUE;
    1.21 -		}
    1.22 -	}
    1.23 -	return FALSE;
    1.24 -}
    1.25 -#endif
    1.26 -
    1.27  /*
    1.28  **  argv: the original argv
    1.29  **  argp: number of arg (may get modified!)
    1.30 @@ -361,12 +341,8 @@
    1.31  			continue;
    1.32  		}
    1.33  
    1.34 -		if ( (msg->received_host || (msg->received_prot != PROT_LOCAL))
    1.35 -#ifdef ENABLE_IDENT
    1.36 -		    && !is_in_netlist(msg->received_host, conf.ident_trusted_nets)
    1.37 -#endif
    1.38 -		) {
    1.39 -			fprintf(stderr, "message %s was not received locally or from a trusted network\n", *id);
    1.40 +		if (msg->received_host || (msg->received_prot != PROT_LOCAL)) {
    1.41 +			fprintf(stderr, "message %s was not received locally\n", *id);
    1.42  			continue;
    1.43  		}
    1.44  
    1.45 @@ -407,7 +383,6 @@
    1.46  {
    1.47  	gchar *with_resolver = "";
    1.48  	gchar *with_auth = "";
    1.49 -	gchar *with_ident = "";
    1.50  
    1.51  #ifdef ENABLE_RESOLVER
    1.52  	with_resolver = " +resolver";
    1.53 @@ -415,12 +390,8 @@
    1.54  #ifdef ENABLE_AUTH
    1.55  	with_auth = " +auth";
    1.56  #endif
    1.57 -#ifdef ENABLE_IDENT
    1.58 -	with_ident = " +ident";
    1.59 -#endif
    1.60  
    1.61 -	printf("%s %s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth,
    1.62 -			with_ident);
    1.63 +	printf("%s %s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth);
    1.64  }
    1.65  
    1.66  void