OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: access table: .domain.tld syntax for host patterns

From: Wietse Venema (wietseporcupine.org)
Date: Mon Nov 12 2007 - 10:43:24 CST


David Schweikert:
> Hi,
>
> I recently tried to list all hosts of a domain, including sub-domains
> using the following syntax:
>
> .domain.tld OK
>
> It didn't work (with Postfix 2.4.6 and with client hostnames like
> host.domain.tld and host.sub.domain.tld) until I did remove the initial
> dot...
>
> The man-page access(5) says:
>
> domain.tld
> Matches domain.tld.
>
> The pattern domain.tld also matches subdomains, but
> only when the string smtpd_access_maps is listed in
> the Postfix parent_domain_matches_subdomains con-
> figuration setting. Otherwise, specify .domain.tld
> (note the initial dot) in order to match subdo-
> mains.
>
> Note that I _do_ have smtpd_access_maps listed in
> parent_domain_matches_subdomains... It seems to me, however, that it
> should work also if I put an explicit dot (so that the semantics of the
> map entry do not change with a configuration change in main.cf).

parent_domain_matches_subdomains changes the way subdomains are
specified between domain.tld <=> .domain.tld. Only one form is
implemented at a time, to avoid excessive numbers of lookups.

        Wietse