Thank you Wietse.

This is what is set relay_domains on my server:

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".

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

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

RS

-----Messaggio originale-----
Da: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
Per conto di Wietse Venema
Inviato: mercoledì 27 luglio 2022 12:41
A: Postfix users <postfix-users@postfix.org>
Oggetto: Re: third-level domains

ATTENZIONE: Questa email ha origine esterna all’organizzazione. Non selezionare 
link o scaricare allegati, a meno di riconoscere il mittente e di sapere che il 
contenuto è sicuro.


Scappatura Rocco:
> Hello.
>
> I'm stuck while observe my server postfix, that hosts domain 2domain.tld, 
> that refuses mail from sender of the domain 3domain.2domain.tld (not hosted 
> on my server):
>
> Jul 11 14:43:36 myserver postfix/smtpd[1799310]: NOQUEUE: reject: RCPT 
> from smtpecsmallgo02.extdomain.tld [xx.xx.xx.xx]: 550 5.1.0 
> <n...@3domain.2domain.tld>: Sender address rejected: User unknown in 
> relay recipient table; from=<n...@3domain.2domain.tld> 
> to=<n...@2domain.it> proto=ESMTP helo=<smtps.extdomain.tld>
>
> Basically, myserver check the validity of sender in the domain 
> 3domain.2domain.tld even if it is not local (while it is local domain 
> 2domain.tld).
>
> In can't find where is the miscunfiguration in postfix..

relay_domains matches all subdomains of the listed domains. This is controlled 
with parent_domain_matches_subdomains. Unfortunately the default value is a 
long list, so edit this carefully.

Perhaps using a regexp or pcre table for relay_domains gets rid of this 
automatic subdimain matching behavior.

        Wietse

Reply via email to