Re: parent_domain_matches_subdomains && smtpd_access_maps

2023-01-02 Thread Emmanuel Fusté

Le 02/01/2023 à 20:38, Laurent Frigault a écrit :

Hi,

Is there any way to have some smtpd_access_maps with
parent_domain_matches_subdomains and some other without it ?

I have :
smtpd_recipient_restrictions =
permit_mynetworks
 reject_non_fqdn_sender
 reject_unknown_sender_domain
 reject_unauth_destination
 check_sender_access hash:$config_directory/sender_access
 check_recipient_access hash:$config_directory/rcpt_recipient_access


I would like to have parent_domain_matches_subdomains in
rcpt_recipient_access and not in sender_access

Without parent_domain_matches_subdomains matching property, subdomains 
of mydomain.net are expressed as .mydomain.net.
So in parent_domain_matches_subdomains put two lines for domains for 
witch you want subdomain matching.


For sane behavior I always disable parent_domain_matches_subdomain 
matching and always use explicit subdomain matching where needed. That 
is a personal preference.


Emmanuel.


Re: parent_domain_matches_subdomains && smtpd_access_maps

2023-01-02 Thread Rob McGee

On 1/2/2023 1:38 PM, Laurent Frigault wrote:

Is there any way to have some smtpd_access_maps with
parent_domain_matches_subdomains and some other without it ?

I have :
smtpd_recipient_restrictions =
permit_mynetworks
 reject_non_fqdn_sender
 reject_unknown_sender_domain
 reject_unauth_destination
 check_sender_access hash:$config_directory/sender_access
 check_recipient_access hash:$config_directory/rcpt_recipient_access


I would like to have parent_domain_matches_subdomains in
rcpt_recipient_access and not in sender_access


The p_d_m_s setting is global per instance, but one thing you can do is 
unset it (remove smtpd_access_maps) and use the workaround to include 
subdomains of the parent as needed:


example.com target
.example.comtarget

Yes, it means using 2 entries for each domain where you want inclusion 
of subdomains, but it's not hard to automate adding all these to your 
existing map.

--
   http://rob0.nodns4.us/



Re: parent_domain_matches_subdomains && smtpd_access_maps

2023-01-02 Thread Wietse Venema
Laurent Frigault:
> Hi,
> 
> Is there any way to have some smtpd_access_maps with
> parent_domain_matches_subdomains and some other without it ?

There currently is no syntax to force some lookups with and some
without.

However, parent_domain_matches_subdomains does not apply to pcre:,
regexp:, tcp:, and socketmap: tables and check_policy lookups. These
always get the full domain. Maybe you can handle check_sender_access
that way.

Wietse

> I have :
> smtpd_recipient_restrictions =
>   permit_mynetworks
> reject_non_fqdn_sender
> reject_unknown_sender_domain
> reject_unauth_destination
> check_sender_access hash:$config_directory/sender_access
> check_recipient_access hash:$config_directory/rcpt_recipient_access
> 
> 
> I would like to have parent_domain_matches_subdomains in
> rcpt_recipient_access and not in sender_access
> 
> Regards,
> -- 
> Laurent Frigault | http://www.agneau.org/>
> 


parent_domain_matches_subdomains && smtpd_access_maps

2023-01-02 Thread Laurent Frigault
Hi,

Is there any way to have some smtpd_access_maps with
parent_domain_matches_subdomains and some other without it ?

I have :
smtpd_recipient_restrictions =
permit_mynetworks
reject_non_fqdn_sender
reject_unknown_sender_domain
reject_unauth_destination
check_sender_access hash:$config_directory/sender_access
check_recipient_access hash:$config_directory/rcpt_recipient_access


I would like to have parent_domain_matches_subdomains in
rcpt_recipient_access and not in sender_access

Regards,
-- 
Laurent Frigault | http://www.agneau.org/>