On 2009-03-18, at 1151, Charlie Garrison wrote:
On 18/03/09 at 9:31 AM -0500, Matt Brookings <m...@inter7.com> wrote:
Charlie Garrison wrote:
Is there a proper way to delete a domain which is currently configured
as the primary domain for an account? And I want one of the current
domain aliases to become the primary domain.
I can't find any comprehensive documentation for vdeldomain. Maybe it
will do what I want; I don't have a test system to try it on though.

An alias is just that, an alias. It is not an actual domain. If you delete the primary, the alias will not function because there is no primary domain
data for it to alias.

I guessed that, which is why I was asking how to delete the primary domain. I want one of the domain aliases to become the primary domain. Is there any way to do that short of completely recreating the setup for that domain/directory? The primary domain is no longer in use (has expired) and I would like to completely remove all references to it.

My thought was to 'mv' the domain directory to the name of the domain alias, and manually edit the qmail/users/assign file accordingly. But I don't know if there are other locations where the primary domain name is stored that would also need to be updated. (I'm ignoring rcpthosts, etc for now since they seem to be easy changes.)

i had a case like this a few years back. when the client started hosting, they used one domain name. they then added two others as aliases, and printed all of their business cards with one of the alias domains. a year later they decided to give up the original domain name, and wanted the alias on their business cards to become the primary.

from what i remember, the process looked like this:

- shut down qmail-send and all POP3/IMAP services

- delete the alias domain which is about to become primary (using vdeldomain)

- create the new primary as a physical domain (using vadddomain)

- use "mv" to move the contents of domains/olddomain.xyz into domains/ newdomain.xyz

*** edit the vpasswd file so the directory names accurately reflect their new names (i used "sed" for this.)

*** run "vmkpasswd newdomain.xyz"

- delete the old domain (using vdeldomain)

- start up qmail-send and the POP3/IMAP services

so it looks like the only non-trivial thing which hasn't been covered already is updating the vpasswd file and running "vmkpasswd" to rebuild the vpasswd.cdb file.

----------------------------------------------------------------
| John M. Simpson    ---   KG4ZOW   ---    Programmer At Large |
| http://www.jms1.net/                         <j...@jms1.net> |
----------------------------------------------------------------
| http://video.google.com/videoplay?docid=-1656880303867390173 |
----------------------------------------------------------------





Attachment: PGP.sig
Description: This is a digitally signed message part

!DSPAM:49d22c7732681224718157!

Reply via email to