removing a domain with mailboxes wipes the OS

When I delete a domain with mailboxes attached virtualmin wipes the whole drive.

deleting a domain without additional mail users gives the following result

[code:1]Deleting mail aliases …
… done

Deleting AWstats configuration file and Cron job …
… done

Deleting Webmin login …
… done

Deleting MySQL database testdomain_com …
… done

Deleting MySQL login …
… done

Disabling log file rotation …
… done

Deleting scheduled Webalizer reporting …
… done

Deleting virtual website …
… done

Deleting DNS zone …
… done

Removing from email domains list …
… done

Deleting home directory …
… done

Deleting administration user …
… done

Deleting administration group …
… done

Deleting server details for
… done

Applying web server configuration …
… done

Re-loading Webmin …
… done

Applying web server configuration …
… not running!

Re-starting DNS server …
… done[/code:1]

Deleting a domain WITH additional mail users gives the following result

[code:1]Deleting mailboxes …
module mailboxes does not exist
Return to previous page [/code:1]

When I go to remove the domain it wipes the OS at this point.
"Deleting mailboxes …"

I am using Virtualmin GPL with the following setup.
CentOS 5.1
No modification to webmin / virtualmin code
Am using mail format to /home/
can read mail, send mail to other users ok
All seems to be working except when the system is wiped
Any Ideas?

Please let me know what information you would like,

Thanks for any help.

Phill<br><br>Post edited by: XtremeX, at: 2008/04/01 03:32

Howdy Phill,

Wow. I’ve never heard of anything like that, but it’s obviously pretty serious.

Is it possible you’ve chosen “root” as the administrator for the virtual server, and “root” has no home directory configured (set to / perhaps, as it is on older style UNIX systems)?

I’m having a hard time imagining a scenario where things could play out that way unless the home directory of one of the users in the process is “/” (which, obviously, is not the default).

I think I’d have to see this system for myself to figure this one out. Could you send over login details to

I just had a look at this, and found the cause of the problem. It was a combination of two things :

  1. In Webmin’s Sendmail Configuration module on the Module Config page, the Mail file in home directory field was empty … it should have been set to mail

  2. A bug in Virtualmin caused the home directory to not be prefixed when deleting the user’s mail file, which led to the command rm -rf / being run!

This bug seems to have existed for a while, but it only happens when using Sendmail with email delivered to a file in users’ home directories, which isn’t typically the default.

I will include a proper fix in the upcoming 3.55 Virtualmin release.

Thanks for taking the time to have a look!!
And for being so quick!!