Mercurial > 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 (2012-01-14) |
parents | a96bb42f597d |
children | 028bc124d744 |
files | man/masqmail.conf.5 src/deliver.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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'.
--- 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;