Marc Risse: > Am 23.03.21 um 15:10 schrieb Wietse Venema: > > Marc Risse: > >> Hello everyone, > >> > >> will ".domain.com" match "b...@sub2.sub1.domain.com" or only > >> "b...@sub1.domain.com" in transport maps? > > With an indexed table (for example, hash: or btree:), .domain.com > > will not match any email address, and it will match every subdomain. > > > > If you want finer control, use pcre maps. There, the query > > string is always the complete email address. > > > > Wietse > > Hello Wietse, > > thank you for your reply. To be clear: .domain.com matches > sub2.sub1.domain.com on hashed transport maps?
That is the wrong question. - .domain.com will not match any email address, WHEN THE QUERY STRING IS AN EMAIL ADDRESS. - .domain.com will match every subdomain level WHEN THE QUERY STRING IS A DOMAIN NAME. As described in the transport manpage (repeated below), a hashed table is queried with an email address, a domain name, or a '*'. Wietse TABLE SEARCH ORDER With lookups from indexed files such as DB or DBM, or from networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below: user+extension@domain transport:nexthop Deliver mail for user+extension@domain through transport to nex- thop. user@domain transport:nexthop Deliver mail for user@domain through transport to nexthop. domain transport:nexthop Deliver mail for domain through transport to nexthop. .domain transport:nexthop Deliver mail for any subdomain of domain through transport to nexthop. This applies only when the string transport_maps is not listed in the parent_domain_matches_subdomains configuration setting. Otherwise, a domain name matches itself and its subdo- mains. * transport:nexthop The special pattern * represents any address (i.e. it functions as the wild-card pattern, and is unique to Postfix transport tables).