Matus UHLAR - fantomas: > >Matus UHLAR - fantomas: > >> does prefix ".domain" apply for smtp_connection_cache_destinations? > >> (debian's 3.5.6 doesn't seem to accept that). > > On 05.04.22 10:26, Wietse Venema wrote: > >Is it documented to support this? > > > >What is documented is that smtp_connection_cache_destinations > >supports type:name tables so you could specify a pcre: or regexp: > >map. > > I was curious if this option supports (could support) subdomain/subnet > matching like access tables do.
It makes sense for queries with a domain name, but that is not the case here. smtp_connection_cache_destinations is queried with the next-hop destination, which can include [] and :port information. > >> I can name all those subdomains in smtp_connection_cache_destinations, > >> set smtp_connection_cache_on_demand=no, but supporting .subdomains would be > >> easier. > > > >Why DISABLE on-demand connection caching? > > I was under impression that disabling caching on demand turns is on by > default. Perhaps incorrectly, and having it on by default requires putting > kind of wildcard into smtp_connection_cache_destinations. No, that is not the documented behavior. smtp_connection_cache_on_demand enables connection caching *conditionally*. The condition is that a destination has multiple messages in the active queue so that Postfix can send messages back-to-back. smtp_connection_cache_destinations enables connection caching *unconditionally* for the named destinations. This means it keeps a connection open for several seconds even when the destination has no email in the active queue. I think that you can stick with the default settings, which keep connections open only when they can be reused immediately. Wietse