# HG changeset patch # User markus schnalke # Date 1326561247 -3600 # Node ID 3f923f97563bc14ff61fa6ec1657b8dd48353469 # Parent a96bb42f597d0f96d58dd0534c63d584c5e70a59 local_hosts now understands glob patterns like `*example.org'. diff -r a96bb42f597d -r 3f923f97563b man/masqmail.conf.5 --- a/man/masqmail.conf.5 Sat Jan 14 17:27:21 2012 +0100 +++ b/man/masqmail.conf.5 Sat Jan 14 18:14:07 2012 +0100 @@ -122,6 +122,8 @@ \fBlocal_hosts = \fIlist\fR A semicolon `;' separated list of hostnames which are considered local. +Can contain glob patterns, like +`*example.org' or `mail?.*mydomain.net'. Normally you should set it to "localhost;foo;foo.bar.com" if your host has the fully qualified domain name `foo.bar.com'. diff -r a96bb42f597d -r 3f923f97563b src/deliver.c --- a/src/deliver.c Sat Jan 14 17:27:21 2012 +0100 +++ b/src/deliver.c Sat Jan 14 18:14:07 2012 +0100 @@ -261,7 +261,7 @@ /* search for local host list: */ foreach(conf.local_hosts, dom_node) { - if (strcasecmp(dom_node->data, rcpt->domain) == 0) { + if (fnmatch(dom_node->data, rcpt->domain, FNM_CASEFOLD)==0) { *p_local_list = g_list_append(*p_local_list, rcpt); DEBUG(5) debugf("<%s@%s> is local\n", rcpt->local_part, rcpt->domain); break;