OK, this is what I did in the past to change the ZEG domain name. I haven't done a lot of testing on the Samba side, so I'm not sure if there are some changes I missed there. I have some scripts I'm updating for user management (add/remove, etc) that I'll post once they're done.

-- Scott

ZEG DOMAIN CHANGE
------------------------------

DO THIS AT YOUR OWN RISK! Make sure you have a backup/snapshot just in case you want to rollback if
things go wrong and something bad happens.

o Login as root (sudo -s)
o Stop the LDAP service:  root@sogo:~# service slapd stop
o Backup the existing LDAP Database: root@sogo:~# slapcat -v -l sogo_orig.ldif o Create a new LDAP data file: root@sogo:~# sed 's/example/<newdom>/g' sogo_orig.ldif > sogo_new.ldif
  where <newdom> is the new domain name (don't include the "<" ">")
o If you need to change ".com" use:
root@sogo:~# sed -e 's/example/<newdom>/g' -e 's/com/<new_gTLD>/g' sogo_orig.ldif > sogo_new.ldif
  again, <new_gTLD> is "org", "net", etc.
o If you need to add additional domain extensions (eg - newdom.org.ca), you'll need to edit
  the sogo_new.ldif file manually
o Edit the file: /etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif
and replace all "example" with your new domain name and replace "com" with the different gTLD if needed. Again, if you need additional domain extensions, you'll need to add those to this file. Finally, remove the "CRC" line (2nd line). If you don't you'll get an error during the
  LDAP import
o Remove (or rename) the existing LDAP database: root@sogo:~# rm -r /var/lib/ldap/*
o Import the new LDAP data file: root@sogo:~# slapadd -v -l sogo_new.ldif
    --> You should see *no* errors
o Change the ownership of the new LDAP database files (if not, LDAP won't run):
  root@sogo:~# chown -R openldap: /var/lib/ldap
o Edit /etc/mailname and /etc/saslauthd.conf and replace "example" with the new domain o Edit /etc/postfix/main.cf -> Replace "example" in "myhostname" with the new domain o Edit /etc/postfix/people.ldap -> Replace "example" in "search_base" with the new domain
o Update GNUstep:
  root@sogo:~# defaults write sogod SOGoTimeZone "<your_time_zone>"
    (eg - ~# defaults write sogod SOGoTimeZone "US/Pacific")
  root@sogo:~# defaults write sogod SOGoMailDomain "<newdom>.com"
o Edit /home/sogo/GNUstep/Defaults/.GNUstepDefaults and replace all "example" entries
  with the new domain
o Reboot the ZEG and your new domain name is now in place. The "sogo1", "sogo2", and "sogo3" users are
  still available in the new domain.
--
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to