# HG changeset patch # User markus schnalke # Date 1315128811 -7200 # Node ID ddb7b3fd3d08f97085614a1839145e9280703ee1 # Parent 08932c6298492671ac507e9e02ff8287587e818e found further appearences of ``localnet'' in the code diff -r 08932c629849 -r ddb7b3fd3d08 examples/example.route --- a/examples/example.route Sun Sep 04 11:25:38 2011 +0200 +++ b/examples/example.route Sun Sep 04 11:33:31 2011 +0200 @@ -11,7 +11,7 @@ allowed_senders = "okurth" -# local_hosts and local_nets will be checked before this. +# local_hosts will be checked before this. # cpwright.com uses the dialup up list of dul.maps.vix.com, # so I cannot send any mail over this connection to that domain. # There are probably many others... :-( (No, this is okay. Nobody diff -r 08932c629849 -r ddb7b3fd3d08 src/route.c --- a/src/route.c Sun Sep 04 11:25:38 2011 +0200 +++ b/src/route.c Sun Sep 04 11:33:31 2011 +0200 @@ -193,16 +193,12 @@ /* Split a recipient list into the three groups: - local recipients -- local net recipients -- other/remote/online recipients -It should be possible to call the function like: - split_rcpts(rcpts, hostlist, local, others, others); -This would split online between local and localnet+online recipients. -(untested yet; remove this line if you saw it worked -- meillo 2010-10-21) -If host_list is NULL, only splitting between local and other is done. +- those maching the patterns +- those not matching the patterns +If patterns is NULL: only splitting between local and others is done. */ void -split_rcpts(GList* rcpt_list, GList* localnets, GList** rl_local, GList** rl_localnet, GList** rl_others) +split_rcpts(GList* rcpt_list, GList* patterns, GList** rl_local, GList** rl_matching, GList** rl_others) { GList *rcpt_node; GList *host_node = NULL; @@ -219,16 +215,16 @@ if (rl_local) *rl_local = g_list_append(*rl_local, rcpt); } else { - /* if localnets is NULL, host_node will be NULL, + /* if patterns is NULL, host_node will be NULL, hence all non-locals are put to others */ - foreach(localnets, host_node) { + foreach(patterns, host_node) { gchar *host = (gchar *) (host_node->data); if (fnmatch(host, rcpt->domain, FNM_CASEFOLD) == 0) break; } if (host_node) { - if (rl_localnet) - *rl_localnet = g_list_append(*rl_localnet, rcpt); + if (rl_matching) + *rl_matching = g_list_append(*rl_matching, rcpt); } else { if (rl_others) *rl_others = g_list_append(*rl_others, rcpt);