Skip to content

vdeldomain.1

Manvendra Bhangui edited this page Feb 25, 2024 · 4 revisions

NAME

vdeldomain - Delete a virtual domain

SYNOPSYS

vdeldomain [ cTvV ] virtual_domain

DESCRIPTION

vdeldomain Completely removes a virtual domain from the system. It deletes all qmail files for the domain and removes all email users and their directories. For a clustered domain, vdeldomain should be run on the host having the postmaster account. vdeldomain 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.

For real domain, it does the following

Delete all domains aliased to the real domain being removed (from the file

[step]
Remove entry for real domain in qmail assign file

[step]
Recursively remove directories in all filesystems pertaining to the real domain.

[step]
Remove entries in dir_control tables pertaining to the real domain.

[step]
Remove the Domain directory

[step]
Remove all entries for domain in tables indimail and indibak.

[step]
Remove entries for domain in rcpthosts, morercpthosts, virtualdomains, chkrcptdomains

[step]
Remove entry from table dbinfo and mcdfile for a clustered domain.

[step]
Send SIGHUP to qmail-send

For alias domains, it does the following

Delete entry from aliasdomain table on the Control Host.

[step]
Remove entry from .aliasdomains

[step]
Remove entry for alias domain in qmail assign file

[step]
Recursively remove directories in all filesystems pertaining to the real domain.

[step]
Remove entries in dir_control tables pertaining to the alias domain.

[step]
Remove the Domain directory (symbolic link)

[step]
Remove all entries for domain in tables indimail and indibak.

[step]
Remove entries for domain in rcpthosts, morercpthosts, virtualdomains

[step]
Send SIGHUP to qmail-send

For domain with AUTOTURN support, it does the following

Recursively remove Maildir for the domain

[step]
Remove entries for domain in rcpthosts, morercpthosts, virtualdomains and etrnhosts.

[step]
Send SIGHUP to qmail-send

POST HANDLE

If the environment variable POST_HANDLE is set, vdeldomain 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 /usr/libexec/indimail/vdeldomain will be executed with root privileges. The POST_HANDLE program/script is executed with virtual_domain as the command line argument. The POST_HANDLE program is executed as the last step after all earlier steps have been successful.

OPTIONS

-v
Print verbose messages on the screen.

-T
Deletes a domain enabled with AUTOTURN support.

-c
Deletes a domain information from dbinfo table as well.

virtual_domain
The domain name to remove.

RETURN VALUE

0 if all steps were successful, non-zero otherwise. If any of the steps fail, a diagnostic message is printed.

SEE ALSO

vadddomain(1), vaddaliasdomain(1), vmoddomain(1), vadduser(1), vdeluser(1), vdominfo(1), dbinfo(8),

Clone this wiki locally