How to "soft" disable a virtual server (for billing purposes)

How do you "soft" disable a virtual sever, or virtual sub-server? Using the command line, or web interface? Without installing any additional software such as billing.

In other words, here is the scenario. The virtual server/sub-server is running the usual web, dns, mail, and ftp.

the way I see to currently disable a virtual server, is one where the web server is showing raw error messages, and you cannot specify how you want logins to be disabled, you can only turn on/off mail and ftp, you cannot temporarily disable all user logins, but you should be able to continue accepting mail while user access would be temporarily disabled.

How to, by command line or web interface, make DNS continue to resolve for the domain, mail is being accepted, but all mail and ftp logins are temporarily disabled, and web browsing shows a nice looking page that says, "This site is offline currently, please try again later." or some similar message not just an apache raw 503 or 404 HTTP error. And when re-enabled, the original passwords start working again for all ftp and mailboxes..

Status: 
Closed (fixed)

Comments

You can control in Virtualmin what features of a domain get turned off when it is disabled - this is at at System Settings -> Virtualmin Configuration -> Features to deactivate when disabling.

Does that help?

It helps somewhat but not completely.

For example, for mail, I don't want to disable Postfix for the domain. I just want to make IMAP/POP3 fail for all usernames on that domain, while retaining all passwords as they are. So mail continues to flow in from the internet and accumulate. But user login via imap/pop3 fails. Later, after you enable the server (ie undo the soft diable), the IMAP/POP3 logins start working again, with their original passwords, as if nothing happened. No passwords are ever lost, nor any data.

Same for the ftp server logins. All logins fail but only because it's in this soft disabled mode, not because the passwords have actually been erased and login really failed.

Same thing for the web server. The web sever is still running, but it's returning for all pages "sorry the site is temporarily offline please come back again later." No data is lost, nor any settings, nor is the web sever truly disabled to the point it'd be returning a 404 or 503. Instead it's just returning a polite "site is temporarily offline" message.

Ok, so you just want to block the website and logins to download email, but not stop mail delivery?

Yes exactly. Don't want anything catastrophic like MTA flat out refusing mail for that domain and after 4 days of the originating mail server trying to send, it returns a message status notification failure message back to sender. Just a softer disabling where it would prevent users from logging in and prevent web sites from displaying content, probably a nice looking graphical responsive 503 page. Otherwise functions perfectly normal (accepts mail) but users can't login to mail so users can't send or read mail. Nor login ftp. No password hashes are touched. But login is prevented possibly with a special error code "service unavailable". The reason is billing not anything technical nor actual passwords not matching. Just "out of service for non technical reasons".

Ok, in the next release of Virtualmin I will add an option to allow disabling of a domain without turning off mail delivery, but while still preventing email access via IMAP / SMTP.

OK great sounds good regarding the email but what about soft block (ie not to alter the password hashes) on the ftp logins associated with the subserver (or virtual server) and temporarily 503 (again without clobbering any htaccess web config files) all web sites associated with the subserver (or virtual server).

So the lock will not cause password hashes to be lost - it just modifies them slightly so they can be restored.

For the website, it should put up an admin-editable message saying that the site has been disabled.

Automatically closed -- issue fixed for 2 weeks with no activity.