I find myself needing to do this a few times daily and would love an easier way to do it.
The domain example.com's email is handled by a third party, so the server needs to be told this by listing its domain in /etc/remotedomains.
I then remove the domain from localdomains:
pico /etc/localdomains
Search for "example.com" (being careful not to land on "subdomain.example.com")
Remote "example.com" from /etc/localdomains
Save and close
And place it within remotedomain:
pico /etc/remotedomains
Goto end of file and add "example.com"
Save and close
A way to do this in one command would be great! :)
vim -p /etc/localdomains /etc/remotedomains/domainddgtp:xa. it cuts out the steps of opening closing and saving each file, though I'm pretty sure it could be more optimized. – xenoterracide♦ Apr 20 '11 at 12:57