Rosenbaum, Larry M.: > Running RHEL 6, mail_version = 2.6.6 > > I have a server, let's call it mail1.example.com. I want mail > addressed to n...@example.com to be looked up in $virtual_alias_maps. > Mail to subdomains of example.com should be relayed to a server > by that name. The main.cf file includes the following lines: > > virtual_alias_domains = hash:/etc/postfix/virtual_domains relay_domains > = $mydestination, hash:/etc/postfix/relay_domains > > The virtual_domains file contains example.com ok > > What do I need to put into the relay_domains file to allow mail > coming from sites that aren't in $mynetworks to be relayed to > @*.example.com? I've tried putting > > .example.com ok
As documented: relay_domains (default: $mydestination) What destination domains (and subdomains thereof) this system will relay mail to. Subdomain matching is controlled with the par- ent_domain_matches_subdomains parameter. > into relay_domains but I still got "Relay access denied". If instead > I use > > example.com ok > > then I am able to relay, but the log file has this warning: > > 'postfix/trivial-rewrite[19961]: warning: do not list domain > example.com in BOTH virtual_alias_domains and relay_domains' Right, don't do that. > What should I be doing instead? parent_domain_matches_subdomains (default: see postconf -d output) What Postfix features match subdomains of "domain.tld" automatically, instead of requiring an explicit ".domain.tld" pattern. This is planned backwards compatibility: eventually, all Postfix features are expected to require explicit ".domain.tld" style patterns when you really want to match subdomains. Set the parent_domain_matches_subdomains parameter, and don't include relay_domains there. I expect that "parent_domain_matches_subdomains = smtpd_access_maps" would be practical for many sites. Wietse