0

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!

iceninexp
  • 1
  • 3

1 Answers1

0

I'm assuming you're using a fairly vanilla qmail or netqmail system. What you propose is basically enough but note the following:

  • Send qmail-send a HUP signal to tell it to re-read virtualdomains once you've changed it.
  • Be aware that there may be an entry/entries for the target of the virtualdomains line (domain:target) in the qmail-users database (see man page for qmail-users); you may like to remove this line if it's not in use by any other line in virtualdomains to keep things tidy. If there's no entry then target will be the username configured for that virtual domain.
  • In particular I'd advise against an entry in smtproutes since 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 virtualdomains and rcpthosts and qmail-send restarted, 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).

Andrew Richards
  • 1,392
  • 11
  • 18
  • Thanks for that Andrew. That's pretty much what I did. Only difference was the domain lived in morercpthosts. I also restarted BIND before restarting qmail. – iceninexp Oct 05 '19 at 16:30