On 27.07.22 21:41, Scappatura Rocco wrote:
relay_domains = proxy:mysql:/etc/postfix/mysql-relay-domains.cf
/etc/postfix/mysql-relay-domains.cf: query = select domain from domain where 
domain='%s' and active='1'

And, obliviously, while the query returns '2domain.tld' for the domain 2domain.tld, it returns nothing for domain '3domain.2domain.tld'.

Neverthless, the sender of mail coming from domain @3domain.2domain.tld are cheched for existance and so refused with the message " Sender address rejected: User unknown in relay recipient table".

do you have relay_recipient_maps set?
http://www.postfix.org/postconf.5.html#relay_recipient_maps

Could you please say how to edit parent_domain_matches_subdomains to avoid that relay_domains matches also subdomain of domain 2domain.itld?

Maybe I have to set parent_domain_matches_subdomains  from default:
parent_domain_matches_subdomains = 
debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
to
parent_domain_matches_subdomains = 
debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,smtpd_access_maps

precisely. I personally recommend setting parent_domain_matches_subdomains to empty, and whenever you need to match subdomains in any of those directives, use ".example.com".

this may cause troubles in cases you already use subdomain matching somewhere, so be careful.

Could you please submit an example with regexp or pcre table for relay_domains gets rid of this automatic subdomain matching behavior?

regexp/pcre aren't often needed

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Eagles may soar, but weasels don't get sucked into jet engines.

Reply via email to