Em 30/09/2021 11:46, Markus Schönhaber escreveu:
30.09.21, 16:29 +0200, Marcio Merlone:

I am setting an archiving mail server using a sub-domain of a
relay_domains on the same server as a virtual_mailbox_domains, so every
message relayed to f...@example.tld (On Microsoft cloud) is also archived
on f...@sub.example.tld (my on-premise mail server) using some bcc trick.

     relay_domains = example.tld

     virtual_mailbox_domains = sub.domain.tld

But, as per the docs, relay_domains sets "What destination domains (*and
subdomains thereof*) this system will relay mail to." and thus I am
getting the "warning: do not list domain sub.example.tld in BOTH
virtual_mailbox_domains and relay_domains" log.

Is there how to exclude sub.domain.tld from relay_domains when using
example.tld on virtual_mailbox_domains? How can I deal with that? It
seems to be working as expected, but doesn't smells good. Can the
warning be ignored (that's hard)?

Is there another approach I could/should take to archive mail?

Does the value of the parent_domain_matches_subdomains parameter include "relay_domains" (to check, use
postconf parent_domain_matches_subdomains
)? If it does, remove it from there.

Yes, it did (default):

parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps

I manage to ditch the warning using a negate like this, but is really ugly:

relay_domains = !sub.example.tld, example.tld

So, for the sake of future googling generations, the better, correct way is (*):

parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,smtpd_access_maps
relay_domains = example.tld
virtual_mailbox_domains = sub.domain.tld

* http://www.postfix.org/postconf.5.html#parent_domain_matches_subdomains

And it's done! Thanks a lot, best regards!

--
Marcio Merlone

Reply via email to