Re: [vchkpw] Deleting primary domain; keeping alias domains
Instead of jumping all of these hoops, I find that it's easier to manually remove the real domain from all files in /var/qmail/controls and its entry in users/assign. Then edit the alias entry in users/ assign to have the new "real" domain in the second column. You'll have to run qmail-newu, qmail-newmrh and -HUP qmail-send. Keep the directory name the same to avoid breaking .qmail files, autoresponders, mailing lists, etc. If you really want to rename the directory, create a symlink with the old name. (You'll still want to grep the config files of each mailing -Tom (Sent from my iPhone) !DSPAM:49d582f732681184643329!
Re: [vchkpw] Deleting primary domain; keeping alias domains
Hello, I would like to unsubscribe to this list. Thank you. From: Rick Widmer To: vchkpw@inter7.com Sent: Wednesday, April 1, 2009 5:52:17 AM Subject: Re: [vchkpw] Deleting primary domain; keeping alias domains John Simpson wrote: > 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. As long as you don't have any ezmlm mailing lists... I believe the domain name appears in come of its control files. Rick !DSPAM:49d51c2632682524914421!
Re: [vchkpw] Deleting primary domain; keeping alias domains
On 2009-03-31, at 2252, Rick Widmer wrote: John Simpson wrote: 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. As long as you don't have any ezmlm mailing lists... I believe the domain name appears in come of its control files. yeah, i knew i was forgetting something. for mailing lists... - create the list using the same options as the old list. the "LISTDIR/ flags" file in the old list contains the options in effect for the old list. ezmlm-make `cat /old/list/dir/flags` /new/list/dir \ NEWDOMDIR/.qmail-listname listname newdomain.xyz or, use qmailadmin to create the list, then use this to make the flags the same: ezmlm-make -+ `cat /old/list/dir/flags` /new/list/dir - copy any other control or text files you may have customized from the old list directory to the new one. for example, on my qmail-patch list, i have customized the "text/faq", "text/info", and "text/sub-ok" text files. - use "ezmlm-list" to get the subscribers list from the old list and "ezmlm-sub" to put them on the new list. ezmlm-list /old/list/dir | xargs ezmlm-sub /new/list/dir - if you have "allow", "deny", "digest", or "mod" subscribers, do the same for those lists: ezmlm-list /old/list/dir/allow | xargs ezmlm-sub /new/list/dir/allow i *think* that's it, but it's been a while since i did one of these so i may be forgetting something. | John M. Simpson--- KG4ZOW ---Programmer At Large | | http://www.jms1.net/ | | http://video.google.com/videoplay?docid=-1656880303867390173 | PGP.sig Description: This is a digitally signed message part !DSPAM:49d38e0d32685792818665!
Re: [vchkpw] Deleting primary domain; keeping alias domains
John Simpson wrote: 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. As long as you don't have any ezmlm mailing lists... I believe the domain name appears in come of its control files. Rick !DSPAM:49d2d6e432689534615464!
Re: [vchkpw] Deleting primary domain; keeping alias domains
On 2009-03-18, at 1151, Charlie Garrison wrote: On 18/03/09 at 9:31 AM -0500, Matt Brookings 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/ | | http://video.google.com/videoplay?docid=-1656880303867390173 | PGP.sig Description: This is a digitally signed message part !DSPAM:49d22c7732681224718157!
Re: [vchkpw] Deleting primary domain; keeping alias domains
> -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Joshua Megerman wrote: >> environment. When in doubt, DON'T DO THIS. >> >> Now, if you just want to stop receiving email for the primary domain and >> not delete it completely, take your server out of the MX entry, point >> the >> domain A record somewhere that doesn't accept mail, and/or add the >> domain >> to qmail's badmailto file (assuming you have that patch installed). > > While there are several ways to rename a domain, which is essentially what > is > being done here, the best question to ask one's self before beginning this > very manual process, is if you NEED to, and if you have the experience > with > your backend database selection, and with qmail. > > The only time you really NEED to do this is if the domain is hosted on a > remote > site now, and the users of this system need to be able to email the remote > system. If your users of this domain own both domains, and simply want > the > new domain to 'be their primary', just tell them it's done, and to use the > new domain name and leave everything as it is. > I totally agree - in my case I was hosting a subdomain of a domain that the company wasn't renewing the registration on and I really didn't want to be hosting a domain we didn't own anymore. Plus like I said it was small and still in testing (the decision to not renew the domain (and migrate the process to the other one) was made after the initial setup was completed with the original domain) I figured the worst case scenario was to delete the whole thing and start from scratch :) > The instructions above look correct by the way :) Thanks! Josh Joshua Megerman SJGames MIB #5273 - OGRE AI Testing Division You can't win; You can't break even; You can't even quit the game. - Layman's translation of the Laws of Thermodynamics j...@honorablemenschen.com !DSPAM:49c1313232684641599795!
Re: [vchkpw] Deleting primary domain; keeping alias domains
Here is how you could make it work with the mv Backup all your data. Remove the domain and alias create a new domain and all users for that domain cp or mv all that mgs into the new domain. It should be fine for you. Just my 2 cents. Remo > From: Charlie Garrison > Reply-To: > Date: Thu, 19 Mar 2009 02:51:46 +1100 > To: > Subject: Re: [vchkpw] Deleting primary domain; keeping alias domains > > Good morning, > > On 18/03/09 at 9:31 AM -0500, Matt Brookings 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.) > > Thanks, > Charlie > > -- > Charlie Garrison > PO Box 141, Windsor, NSW 2756, Australia > > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > http://www.ietf.org/rfc/rfc1855.txt > > > > > > !DSPAM:49c1203032681502410438!
Re: [vchkpw] Deleting primary domain; keeping alias domains
Good morning, On 18/03/09 at 9:31 AM -0500, Matt Brookings 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.) Thanks, Charlie -- Charlie Garrison PO Box 141, Windsor, NSW 2756, Australia O< ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt !DSPAM:49c1189632686147620501!
Re: [vchkpw] Deleting primary domain; keeping alias domains
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joshua Megerman wrote: > 2) Rename the domain directory in vpopmail/domains to match the new primary. I should make a quick note on this. You MUST do this. Simply changing the control files to point at the new domain name is not enough. There are some hacks within vpopmail, for the time being, that determine what u...@domain is being worked with based on the user's filesystem path. While I hope to have these types of situations removed from the code in the future, they exist today, so keep that in mind when renaming domains. - -- /* Matt BrookingsGnuPG Key D9414F70 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknBFW8ACgkQ6QgvSNlBT3ArwQCdHylydBjCpKkyMNc2N8DAvQ6z GKYAn1SKcJtiwnM3Ib9ZHivDcVwxciXo =/Xa4 -END PGP SIGNATURE-
Re: [vchkpw] Deleting primary domain; keeping alias domains
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joshua Megerman wrote: > environment. When in doubt, DON'T DO THIS. > > Now, if you just want to stop receiving email for the primary domain and > not delete it completely, take your server out of the MX entry, point the > domain A record somewhere that doesn't accept mail, and/or add the domain > to qmail's badmailto file (assuming you have that patch installed). While there are several ways to rename a domain, which is essentially what is being done here, the best question to ask one's self before beginning this very manual process, is if you NEED to, and if you have the experience with your backend database selection, and with qmail. The only time you really NEED to do this is if the domain is hosted on a remote site now, and the users of this system need to be able to email the remote system. If your users of this domain own both domains, and simply want the new domain to 'be their primary', just tell them it's done, and to use the new domain name and leave everything as it is. The instructions above look correct by the way :) - -- /* Matt BrookingsGnuPG Key D9414F70 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAknBFNsACgkQ6QgvSNlBT3As1QCYwklN/I+lkJmpzvn32n4Llmfv yQCfRxgeN6Z4khd7p3jgfXahEC6js6M= =plpZ -END PGP SIGNATURE-
Re: [vchkpw] Deleting primary domain; keeping alias domains
> 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've actually done this before (using the MySQL back-end), but it's not pretty. First off, you pretty much have to turn off mail services while you do this, or you're gonna lose mail. Have a secondary MX hold delivery if you have one, but it's probably even better to just not accept any inbound connections to the servers that are listed as MXs for the domains in question. The way I did it was as follows: 0) Take a backup of absolutely everything related to your mail server and keep it handy (but also create an offline copy for safekeeping). 1) Delete the alias domain that you want to become primary - I know this sounds counter intuitive, but you MUST remove it before you can change the old primary to the new one. 2) Rename the domain directory in vpopmail/domains to match the new primary. 3) Change all references from the old primary to the new primary in the vpopmail DB. IOW, it's a global search and replace. 4) Change all references from the old primary to the new primary anywhere you find it in /var/qmail/{alias|control|users} 5) Triple-check that there are no more references to the old domain ANYWHERE in the control structure for qmail, vpopmail, and any other things you use. For example, a spamassassin or squirrelmail preferences DB. 6) Once you have completely changed everything, restart local delivery and inject a test message to the queue. If that works, start up SMTP locally (set up an SMTP instance on localhost for testing if you can, otherwise use a firewall or temporary tcprules file to deny access from the outside) and test sending a message all the way through. If that works, test any other services you provide (POP/IMAP/Webmail etc.) to make sure that they all work. Assuming you don't have any problems, open things up to the outside world. 7) KEEP A CLOSE EYE ON THINGS FOR AT LEAST 48 HOURS - sometimes you miss a tiny thing and it won't show up right away, so be on the lookout for weirdness. One last thing - just to be clear. I did this for a small domain with only a couple of users on a server that wasn't very busy and that I had total control over. I also had the luxury of being able to lose a little mail because we were in test mode at the time so that was acceptable. I make NO GUARANTEES that this will work without problems in a production environment. When in doubt, DON'T DO THIS. Now, if you just want to stop receiving email for the primary domain and not delete it completely, take your server out of the MX entry, point the domain A record somewhere that doesn't accept mail, and/or add the domain to qmail's badmailto file (assuming you have that patch installed). Josh Joshua Megerman SJGames MIB #5273 - OGRE AI Testing Division You can't win; You can't break even; You can't even quit the game. - Layman's translation of the Laws of Thermodynamics j...@honorablemenschen.com !DSPAM:49c110ff32682048076310!
Re: [vchkpw] Deleting primary domain; keeping alias domains
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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. - -- /* Matt BrookingsGnuPG Key D9414F70 Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknBBbcACgkQ6QgvSNlBT3AxSgCeOQ1s/EdrXf6p/axWQ7ZBxFUg BosAoIhQ0pfAT+O60YQLTLYZ1ygthw5F =4KVw -END PGP SIGNATURE-