masqmail
changeset 375:3f923f97563b
local_hosts now understands glob patterns like `*example.org'.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 14 Jan 2012 18:14:07 +0100 |
parents | a96bb42f597d |
children | 028bc124d744 |
files | man/masqmail.conf.5 src/deliver.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/man/masqmail.conf.5 Sat Jan 14 17:27:21 2012 +0100 1.2 +++ b/man/masqmail.conf.5 Sat Jan 14 18:14:07 2012 +0100 1.3 @@ -122,6 +122,8 @@ 1.4 \fBlocal_hosts = \fIlist\fR 1.5 1.6 A semicolon `;' separated list of hostnames which are considered local. 1.7 +Can contain glob patterns, like 1.8 +`*example.org' or `mail?.*mydomain.net'. 1.9 Normally you should set it to "localhost;foo;foo.bar.com" if your host has the 1.10 fully qualified domain name `foo.bar.com'. 1.11
2.1 --- a/src/deliver.c Sat Jan 14 17:27:21 2012 +0100 2.2 +++ b/src/deliver.c Sat Jan 14 18:14:07 2012 +0100 2.3 @@ -261,7 +261,7 @@ 2.4 2.5 /* search for local host list: */ 2.6 foreach(conf.local_hosts, dom_node) { 2.7 - if (strcasecmp(dom_node->data, rcpt->domain) == 0) { 2.8 + if (fnmatch(dom_node->data, rcpt->domain, FNM_CASEFOLD)==0) { 2.9 *p_local_list = g_list_append(*p_local_list, rcpt); 2.10 DEBUG(5) debugf("<%s@%s> is local\n", rcpt->local_part, rcpt->domain); 2.11 break;