-
-
Notifications
You must be signed in to change notification settings - Fork 3
vrenamedomain.1
vrenamedomain - rename a virtual domain or an alias_domain to a new name
vrenamedomain old_domain_name new_domain_name
vrenamedomain renames a virtual_domain or an alias domain to a new name. In case of an alias domain it adds new_domain_name as a new alias domain and deletes the old alias domain old_domain_name. vrenamedomain has setuid bit set and can be run by the root user, by user having uid/gid of the domain in /etc/indimail/users/assign or if the user has the gid of the domain as a supplementary group. In case of a real domain, it does the following.
renames the domain directory.
[step]
renames entries having old_domain_name to new_domain_name in the
following tables. indimail, indibak, valias dir_control, and
filesystem specific dir_control tables, lastauth, smtp_port,
userquota
[step]
adds the entry for new_domain_name in qmail's assign file.
[step]
deletes the entry for old_domain_name in qmail's assign file.
[step]
creates domain directories in the BASE_PATH for A2E, F2K, L2P, Q2S,
T2Zsym.
[step]
runs qmail-newu to recreate the assign cdb file.
[step]
relinks all alias domains aliased to old_domain_name to
new_domain_name.
[step]
creates a file .domain_rename in the new_domain_name's domain directory.
If this file is present and a user logs in through IMAP4 or POP3, the
file .domain is recreated during the login process also. This ensures
that when a user logs in, the .domain file contains the correct domain
name.
[step]
recreates .domain file in user's Maildir to with new_domain_name as the
entry.
[step]
deletes the file .domain_rename when .domain file has been recreated for
all the users.
If the environment variable POST_HANDLE is set, vrenamedomain executes the program defined by the POST_HANDLE environment variable with uid/gid of the domain in /etc/indimail/users/assign. If POST_HANDLE is not defined, the program/script /usr/libexec/indimail/vrenamedomain will be executed with root user privileges. The POST_HANDLE program is passed old_domain_name and new_domain_name as arguments. The POST_HANDLE program is executed as the last step after all earlier steps have been successful.
old_domain_name
Name of an existing domain which is to be renamed.
new_domain_name
Name of a non-existing domain which needs to be given to old_domain_name
0 for success, 1 for any failure.
vadddomain(1), vdeldomain(1), vdominfo(1), vaddaliasdomain(1), valias(1), vgroup(1), vadduser(1), vdelivermail(8), vreorg(8),