Mercurial > masqmail
comparison src/alias.c @ 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 | bc9d9cd9ee8e |
children | 273f6c9eb6a2 |
comparison
equal
deleted
inserted
replaced
243:e758296de02d | 244:7082044c05c6 |
---|---|
38 } | 38 } |
39 foreach(conf.not_local_addresses, addr_node) { | 39 foreach(conf.not_local_addresses, addr_node) { |
40 a = create_address_qualified(addr_node->data, TRUE, conf.host_name); | 40 a = create_address_qualified(addr_node->data, TRUE, conf.host_name); |
41 DEBUG(6) debugf("not_local_addresses: addr_node->data=%s a->address=%s\n", | 41 DEBUG(6) debugf("not_local_addresses: addr_node->data=%s a->address=%s\n", |
42 addr_node->data, a->address); | 42 addr_node->data, a->address); |
43 if (addr_isequal(a, addr, conf.alias_local_cmp)) { | 43 if (addr_isequal(a, addr, conf.localpartcmp)) { |
44 destroy_address(a); | 44 destroy_address(a); |
45 /* in local_hosts but also in not_local_addresses */ | 45 /* in local_hosts but also in not_local_addresses */ |
46 return FALSE; | 46 return FALSE; |
47 } | 47 } |
48 destroy_address(a); | 48 destroy_address(a); |
52 } | 52 } |
53 foreach(conf.local_addresses, addr_node) { | 53 foreach(conf.local_addresses, addr_node) { |
54 a = create_address_qualified(addr_node->data, TRUE, conf.host_name); | 54 a = create_address_qualified(addr_node->data, TRUE, conf.host_name); |
55 DEBUG(6) debugf("local_addresses: addr_node->data=%s a->address=%s\n", | 55 DEBUG(6) debugf("local_addresses: addr_node->data=%s a->address=%s\n", |
56 addr_node->data, a->address); | 56 addr_node->data, a->address); |
57 if (addr_isequal(a, addr, conf.alias_local_cmp)) { | 57 if (addr_isequal(a, addr, conf.localpartcmp)) { |
58 destroy_address(a); | 58 destroy_address(a); |
59 /* in local_addresses */ | 59 /* in local_addresses */ |
60 return TRUE; | 60 return TRUE; |
61 } | 61 } |
62 destroy_address(a); | 62 destroy_address(a); |
122 if (strcasecmp(addr->local_part, "postmaster") == 0) { | 122 if (strcasecmp(addr->local_part, "postmaster") == 0) { |
123 /* postmaster must always be matched caseless | 123 /* postmaster must always be matched caseless |
124 see RFC 822 and RFC 5321 */ | 124 see RFC 822 and RFC 5321 */ |
125 val = (gchar *) table_find_func(alias_table, addr->local_part, strcasecmp); | 125 val = (gchar *) table_find_func(alias_table, addr->local_part, strcasecmp); |
126 } else { | 126 } else { |
127 val = (gchar *) table_find_func(alias_table, addr->local_part, conf.alias_local_cmp); | 127 val = (gchar *) table_find_func(alias_table, addr->local_part, conf.localpartcmp); |
128 } | 128 } |
129 if (!val) { | 129 if (!val) { |
130 DEBUG(5) debugf("alias: '%s' is fully expanded, hence completed\n", | 130 DEBUG(5) debugf("alias: '%s' is fully expanded, hence completed\n", |
131 addr->local_part); | 131 addr->local_part); |
132 return g_list_append(NULL, addr); | 132 return g_list_append(NULL, addr); |
173 continue; | 173 continue; |
174 } | 174 } |
175 | 175 |
176 /* addr is local and to expand at this point */ | 176 /* addr is local and to expand at this point */ |
177 /* but first ... search in parents for loops: */ | 177 /* but first ... search in parents for loops: */ |
178 if (addr_isequal_parent(addr, alias_addr, conf.alias_local_cmp)) { | 178 if (addr_isequal_parent(addr, alias_addr, conf.localpartcmp)) { |
179 /* loop detected, ignore this path */ | 179 /* loop detected, ignore this path */ |
180 logwrite(LOG_ALERT, "alias: detected loop, hence ignoring '%s'\n", | 180 logwrite(LOG_ALERT, "alias: detected loop, hence ignoring '%s'\n", |
181 alias_addr->local_part); | 181 alias_addr->local_part); |
182 continue; | 182 continue; |
183 } | 183 } |
236 GList *non_node; | 236 GList *non_node; |
237 | 237 |
238 rcpt_node_next = g_list_next(rcpt_node); | 238 rcpt_node_next = g_list_next(rcpt_node); |
239 foreach(non_rcpt_list, non_node) { | 239 foreach(non_rcpt_list, non_node) { |
240 address *non_addr = (address *) (non_node->data); | 240 address *non_addr = (address *) (non_node->data); |
241 if (addr_isequal(addr, non_addr, conf.alias_local_cmp)) { | 241 if (addr_isequal(addr, non_addr, conf.localpartcmp)) { |
242 done_list = g_list_remove_link(done_list, rcpt_node); | 242 done_list = g_list_remove_link(done_list, rcpt_node); |
243 g_list_free_1(rcpt_node); | 243 g_list_free_1(rcpt_node); |
244 /* this address is still in the children lists | 244 /* this address is still in the children lists |
245 of the original address, simply mark them delivered */ | 245 of the original address, simply mark them delivered */ |
246 addr_mark_delivered(addr); | 246 addr_mark_delivered(addr); |