I have one account, domainABC.com that is moving to another provider. The same users have another domain, domainXYZ.com that is remaining on the server. These accounts email back and forth.
To avoid local deliveries, do I need to do anything more than remove domainABC.com from /var/qmail/control/virtualdomains and /var/qmail/control/rcpthosts ?
Do I also need to add an entry in /var/qmail/control/smptroutes
Many Thanks!
I'm assuming you're using a fairly vanilla qmail or netqmail system. What you propose is basically enough but note the following:
qmail-senda HUP signal to tell it to re-read virtualdomains once you've changed it.virtualdomainsline (domain:target) in theqmail-usersdatabase (see man page forqmail-users); you may like to remove this line if it's not in use by any other line invirtualdomainsto keep things tidy. If there's no entry thentargetwill be the username configured for that virtual domain.smtproutessince the DNS should be sufficient; it creates an extra bit of unnecessary configuration that could cause confusion in future.Once the domain is absent from
virtualdomainsandrcpthostsandqmail-sendrestarted, qmail is no longer configured for local delivery of the domain, so will consider it to be a remote domain and act accordingly (DNS lookup and remote delivery etc).