remove/deactivate all email related services


I bought a google G suite and hence I wanted to keep all email related service in gsuite only.

Hence I would like to deactivate or even remove all these services installed by default from virtualmin.

can anyone help me to achieve it.


First up: Do not remove the MTA. You need it. Any time your applications send mail, etc. they probably go through the local MTA. Lots of things expect to be able to send mail. You can configure it all to use a remotre SMTP server, but, it’s almost certainly more trouble than it’s worth, and Google probably won’t make it easy to allow sending from things like “root@domain.tld” for system mail, etc.).

Disabling mail service is easy, however. Just turn off the Mail, Antivirus, and Spam filtering features for each domain, and once they’re all disabled, you can disable them entirely in the Features and Plugins page.

You can turn off the ClamAV daemon and SpamAssassin daemons, in the Webmin Bootup and Shutdown module (or you can re-run the post-install wizard to tell Virtualmin to turn them off). But, I would keep Postfix around and running. It’s the smallest part of the mail stack; it doesn’t take a lot of resources.

And, of course, you need to configure DNS to point your MX records to Google mail servers, but the docs for Google will tell you what those need to be (after you turn off mail features, the MX records in Virtualmin will be done, so you just need to add new ones in the Webmin BIND module). It’s also possible to add to the Server Templates for BIND, if all new domains will be using the same MX servers.