Changing the Host Name or Domain of Openexchange Server
Support knowledgebase (rsimai_slox_rename)
Applies to
Openexchange Server: Version 4
Concern
How to change the host name and/or the domain of your Openexchange Server.
Background
Do not use YaST for this purpose!
The configuration of Openexchange Server is very complex. The modification must be performed
at many positions YaST is not 'aware' of.
There is a special script for renaming the domain and/or the host name:
/usr/share/doc/packages/imapweb32/tools/rename_domain.pl
Procedure
- Create the directory
mkdir /root/rename
-
Change to the directory
cd /root/rename
-
Start the program without any options in order to get information on the possible parameters
cheetah:~/rename # /usr/share/doc/packages/imapweb32/tools/rename_domain.pl
Syntax: /usr/share/doc/packages/imapweb32/tools/rename_domain.pl -oldhost oldhost -olddomain olddomain -newhost newhost -newdomain newdomain
where oldhost and newhost is only the host part of the name.
Example:
Host+Domainname: mail.domain.com
Hostpart = mail
Domain = domain.com
/usr/share/doc/packages/imapweb32/tools/rename_domain.pl -printold
Tries to determine the old settings and prints it to STDOUT
We assume that you want to perform the following changes:
| old value | new value |
Host name | cheetah | mailserver |
Domain | linux.tux | suse.com |
FQDN | cheetah.linux.tux | mailserver.suse.com |
- Now start the script with the required options. Do this very carefully!
/usr/share/doc/packages/imapweb32/tools/rename_domain.pl -oldhost cheetah -newhost mailserver -olddomain linux.tux -newdomain suse.com
You will be asked for the password of cyrus.
-
Now you will find a new script called
rename.sh
in the directory. Please execute this script:
cheetah:~/rename # ./rename.sh
This script copies configuration files and modifies the entries in LDAP.
- After the host name has been renamed, you should restart the server, since otherwise active services
such as syslog will not adopt the new name.
What Do the Scripts Do?
rename_domain.pl generates the following files:
/etc/openldap/slapd.conf.new
/etc/openldap/ldap.conf.new
/etc/postfix/main.cf.new
/etc/resolv.conf.new
ldapdata_new.ldif
rename.sh
rename.sh generates backup files and copies the conf files to the respective positions.
Then the LDAP directory backed up and removed and the new LDIF with the
modified data is written. The current directory now contains the following
additional files:
slapd.conf.backup
ldap.conf.backup
main.cf.backup
resolv.conf.backup
ldap.backup/
What To Do If Errors Occur?
If the script rename.sh terminates abnormally, most likely an error has occurred
during the data import in LDAP.
In order to restore the server to an operational state, please copy the backup copies back:
rcldap stop
rcpostfix stop
cp slapd.conf.backup /etc/openldap/slapd.conf
cp ldap.conf.backup /etc/openldap/ldap.conf
cp main.cf.backup /etc/postfix/main.cf
cp resolv.conf.backup /etc/resolv.conf
cp -a ldap.backup/* /var/lib/ldap/
rcldap start
rcpostfix start
Subsequently the server will be in the same state as previously
Keywords: OPENEXCHANGESERVER, SLOX, HOSTNAME, DOMAIN, CHANGE, RENAME
Categories:
SuSE Linux IMAP Server
Feedback welcome: Send Mail to srsimai@suse.de (Please give the following subject: SDB-rsimai_slox_rename
)
SDB-rsimai_slox_rename, Copyright SuSE Linux AG, Nürnberg, Germany
- Version: 19. Dec 2002
SuSE Linux AG - Last generated: 19. Dec 2002 by afaber (sdb_gen 1.40.0)