masqmail

changeset 244:7082044c05c6

renamed `alias_local_cmp' to `localpartcmp' this is more accurate
author markus schnalke <meillo@marmaro.de>
date Mon, 25 Oct 2010 17:48:08 -0300
parents e758296de02d
children 2f5e2b6a3a39
files src/alias.c src/conf.c src/masqmail.h
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line diff
     1.1 --- a/src/alias.c	Mon Oct 25 17:46:13 2010 -0300
     1.2 +++ b/src/alias.c	Mon Oct 25 17:48:08 2010 -0300
     1.3 @@ -40,7 +40,7 @@
     1.4  			a = create_address_qualified(addr_node->data, TRUE, conf.host_name);
     1.5  			DEBUG(6) debugf("not_local_addresses: addr_node->data=%s a->address=%s\n",
     1.6  			                addr_node->data, a->address);
     1.7 -			if (addr_isequal(a, addr, conf.alias_local_cmp)) {
     1.8 +			if (addr_isequal(a, addr, conf.localpartcmp)) {
     1.9  				destroy_address(a);
    1.10  				/* in local_hosts but also in not_local_addresses */
    1.11  				return FALSE;
    1.12 @@ -54,7 +54,7 @@
    1.13  		a = create_address_qualified(addr_node->data, TRUE, conf.host_name);
    1.14  		DEBUG(6) debugf("local_addresses: addr_node->data=%s a->address=%s\n",
    1.15  		                addr_node->data, a->address);
    1.16 -		if (addr_isequal(a, addr, conf.alias_local_cmp)) {
    1.17 +		if (addr_isequal(a, addr, conf.localpartcmp)) {
    1.18  			destroy_address(a);
    1.19  			/* in local_addresses */
    1.20  			return TRUE;
    1.21 @@ -124,7 +124,7 @@
    1.22  		   see RFC 822 and RFC 5321 */
    1.23  		val = (gchar *) table_find_func(alias_table, addr->local_part, strcasecmp);
    1.24  	} else {
    1.25 -		val = (gchar *) table_find_func(alias_table, addr->local_part, conf.alias_local_cmp);
    1.26 +		val = (gchar *) table_find_func(alias_table, addr->local_part, conf.localpartcmp);
    1.27  	}
    1.28  	if (!val) {
    1.29  		DEBUG(5) debugf("alias: '%s' is fully expanded, hence completed\n",
    1.30 @@ -175,7 +175,7 @@
    1.31  
    1.32  		/* addr is local and to expand at this point */
    1.33  		/* but first ... search in parents for loops: */
    1.34 -		if (addr_isequal_parent(addr, alias_addr, conf.alias_local_cmp)) {
    1.35 +		if (addr_isequal_parent(addr, alias_addr, conf.localpartcmp)) {
    1.36  			/* loop detected, ignore this path */
    1.37  			logwrite(LOG_ALERT, "alias: detected loop, hence ignoring '%s'\n",
    1.38  			         alias_addr->local_part);
    1.39 @@ -238,7 +238,7 @@
    1.40  		rcpt_node_next = g_list_next(rcpt_node);
    1.41  		foreach(non_rcpt_list, non_node) {
    1.42  			address *non_addr = (address *) (non_node->data);
    1.43 -			if (addr_isequal(addr, non_addr, conf.alias_local_cmp)) {
    1.44 +			if (addr_isequal(addr, non_addr, conf.localpartcmp)) {
    1.45  				done_list = g_list_remove_link(done_list, rcpt_node);
    1.46  				g_list_free_1(rcpt_node);
    1.47  				/* this address is still in the children lists
     2.1 --- a/src/conf.c	Mon Oct 25 17:46:13 2010 -0300
     2.2 +++ b/src/conf.c	Mon Oct 25 17:48:08 2010 -0300
     2.3 @@ -429,7 +429,7 @@
     2.4  
     2.5  	conf.log_max_pri = 7;
     2.6  	conf.do_relay = TRUE;
     2.7 -	conf.alias_local_cmp = strcmp;
     2.8 +	conf.localpartcmp = strcmp;
     2.9  	conf.max_defer_time = 86400 * 4;  /* 4 days */
    2.10  	conf.max_msg_size = 0; /* no limit on msg size */
    2.11  	conf.spool_dir = SPOOL_DIR;
    2.12 @@ -494,7 +494,7 @@
    2.13  		else if (strcmp(lval, "alias_file") == 0) {
    2.14  			conf.alias_file = g_strdup(rval);
    2.15  		} else if (strcmp(lval, "caseless_matching") == 0) {
    2.16 -			conf.alias_local_cmp = parse_boolean(rval) ? strcasecmp : strcmp;
    2.17 +			conf.localpartcmp = parse_boolean(rval) ? strcasecmp : strcmp;
    2.18  		} else if (strcmp(lval, "mbox_default") == 0) {
    2.19  			conf.mbox_default = g_strdup(rval);
    2.20  		} else if (strcmp(lval, "mbox_users") == 0) {
     3.1 --- a/src/masqmail.h	Mon Oct 25 17:46:13 2010 -0300
     3.2 +++ b/src/masqmail.h	Mon Oct 25 17:48:08 2010 -0300
     3.3 @@ -179,7 +179,7 @@
     3.4  	gboolean pipe_fromhack;
     3.5  
     3.6  	gchar *alias_file;
     3.7 -	int (*alias_local_cmp) (const char *, const char *);
     3.8 +	int (*localpartcmp) (const char *, const char *);
     3.9  
    3.10  	GList *local_net_routes;
    3.11  	GList *connect_routes;  /* list of pairs which point to lists */