Remove all mail server functionality and set up SMTP auth relay

Hi.

I’ve set up virtualmin and I’m successfully using it to create apache virtual servers.

The default installation seems to set up a postfix server and all kinds of stuff that I don’t need.

I basically have two questions:

  1. As I said I don’t need a lot of the services that my virtual-/webmin installation seems to have installed. I wouldn’t mind removing those modules that I have but I’m just not sure where to do that. I would like to get rid of the Postfix stuff alltogether if I can to unclutter the UI.

  2. The server still needs to send out emails to people once a virtual server gets created etc. This isn’t working currently because of a complication in the network setup that isn’t easily solved. What I need is to set up the server so that email being sent out is sent via an external SMTP server. For that to work I need to connect to it using SMTP authentication and SSL. Does anybody know how to configure this? I’m not sure what mechanism virtual-/webmin uses to send out emails (does it use sendmail or the php mail functions)? Is it possible to configure the smtp server to connect to and use smtp auth + SSL from within webmin?

Best regards, Stefan Freyr.

you want to start by disabling Mail for domains and add the mx records in the dns zone to point to the other mailserver. This can be done through virtualmin-system settings-features and plugins and the server templates
Instead of removing postfix you can just shut it down and not have it start up at webmin-system-Bootup and Shutdown
removing modules can be done at webmin-webmin-webmin configuration-Webmin Modules

Thanks for your answer.

I did disable the mail for domains and then I went and removed all the modules that I don’t need, this included the Postfix mail server.

But when I logged back into webmin it and a few others had popped back in. Then I did some experimenting and found out that I do not seem to be able to remove any Virtualmin X modules (I tried both the “Virtualmin Domain Registration” and “Virtualmin Mailman Mailing Lists”). The weirdest thing is that when I try deleting these modules I get a message saying that the deletion was successful… but when I go back into that list the module I deleted is still there.

Can I delete modules in any other way? Can I remove the /usr/libexec/webmin/virtualmin-mailman/ directory on the server for example? Or does that mess everything up?

I wouldnt remove files from the server.
When you disable the function in Features and Plugins, then remove the module via webmin, then do a refresh modules… does that solve the issue?

That’s the main problem… this does not solve the problem.

I did go ahead and move the directories I was talking about out of the /usr/libexec/webmin directory and into the root home directory (just to keep a backup) and it doesn’t seem to have much undesirable effects.

It’s clear however that these Virtual-/Webmin modules are a bit undefined. Even though I remove some functionality, remnants of it linger in the UI. For example, I’ve removed the whole BIND module but the UI is still filled with configuration pages that complain that this module doesn’t exist and some configuration pages have fields that are obviously dependent on the BIND module (or some DNS thing at least).

But I’ve managed to simplify the UI as much as I think is possible and even though there are some non-functioning elements in it I think it’s better this way.

Regarding the Postfix module though… I ended up keeping it in there and I have the Postfix service running. It seems that I don’t need the relay functionality after all, I was under the impression that I could stop the Postfix service but still be able to send email out. This doesn’t seem to be the case as mail sent out from the server gets put into the Postfix queue. So I keep it running but it isn’t actually accepting mail from outside on port 25.

Thanks for your help.