Mail on another server...?

I have web server and mail server (running Qmail) separated, for reliability reason.

Is there any way to set up a virtual domain to be configured so as to support that?

Hey Harald,

Probably. Just depends on what you’re after. Do you want Virtualmin to create your mailbox users? Are they stored in an LDAP database, or as system users on the other machine? Both can probably be setup pretty easily, though I’ve never done it with QMail, I have setup a system that used Cluster Users and Groups to create users on both systems.

If we figure out exactly how it needs to work–and how a user is normally created on the QMail box, I bet we can come up with a way to tie it into Virtualmin pretty quickly.

My personal need is actually pretty easy - just need to have WebMin/Virtualmin be aware that my mail is on a separate server - i.e. allow it to configure the DNS record with the appropriate pointer to the alternate mailbox’ URI and IP address. That’s pretty much all I would need, right now.

If that can be set on a per domain basis, I’d be pretty happy.

I do imagine that folks with larger or more mission critical installations would prefer to break out some of the functionality to different servers - thus, a separate mail server, and maybe even a separate MySQL server. If there were some way to easily accomodate that in Virtualmin (including interbox communication, so the main instance of Virtualmin could ‘talk’ to the mail server and the SQL server to create the appropriate settings, that would be even cooler.

Qmail support, in such a manner, would even be best (simply because I’m setting everything up with QmailToaster, which is a very easy installation, and offers a great deal of features and functionality built-in)

But, as I said, per domain/server settings to have Virtualmin configure different IP and MX for an outside server would be ideal right now.

This is much the setup I’m looking for also. I’ve yet to setup the Qmail Toaster, but it looks like a nice solution that will work well in my situation.

It would be nice to have services separated on different boxes (for instance I have 2 separate boxes just for DNS and another box for backup mail that I manage via Webmin) and have them tied in together so it’s easier to manage.

I’m hoping some features like these will make it into Virtualmin. I know Jamie/Joe are working hard to get this product up and rolling and I’m excited about the potential it has!

Hey guys,

The simplest configuration, which seems to be what Harald is asking for, is extremely easy to setup Virtualmin for.

First step is to setup the Server Template(s) to include mail configuration (MX and mail.domain.tld) pointing to your other box.

Click on the Server Templates icon in Virtualmin, and scroll down to the "BIND DNS records for new domains" field.

Insert the following:

mail IN A 192.168.1.1
@ IN MX 5 mail

Where you’ll replace 192.168.1.1 with your mailserver.

Save it.

Now, simply disable mail, spam filtering, and virus filtering so that Virtualmin doesn’t add those records for you, and you’ll be working the way you want in no time.

To take it one step further, we’d need some kind of mechanism on the mail machine to allow us to easily add users…But this will be highly specific to the mail server, and your environment, but I can help you come up with a script if you’d like. In short, it would just be something we could call via ssh or via some other RPC mechanism (the one in Webmin is easy to use for Perl programmers) to call an account creation utility on the mail machine. It could easily pass the username and password, because that information is available when the “Command to run after making changes to a server” is executed.

See, easy! But maybe not obvious, if you aren’t yet familiar with the Server Templates concept in Virtualmin. They are incredibly powerful, but with great power often comes great complexity. The good news is that the knowledge you gain from poking around in the Server Templates will apply to the underlying services themselves, since in many cases you are simply creating little configuration file snippets that do what you want, and Virtualmin adds them to the right places with some variable substitutions. It makes Virtualmin the most generally useful tool in the field, though for any specific task it might not be immediately obvious how to do it! We’re working on the latter issue as fast as we can. The good news for us, though, is that we’re finding people desperately want the flexibility, that only Virtualmin is offering. If only we can get extreme ease of use in there without killing the flexibility, we’ll be golden. :wink:

Wow Joe - thanks for the excellent solution and help with this. I just started to investigate the templates, and I agree – mucho power, but a bit daunting at first.

> but I can help you come up with a script if you’d like. In short, it would
> just be something we could call via ssh or via some other RPC mechanism
> (the one in Webmin is easy to use for Perl programmers) to call an
> account creation utility on the mail machine. It could easily pass
> the username and password, because that information is available
> when the “Command to run after making changes to a server” is executed.

Well, I’m running QmailToaster on my mail server - and with the vpopmail extension for virtual account creation, it should be ‘easy’ to do account creation and user name creation remotely, then… There’s a command for everything.

For creating new domain and postmaster account:
vadddomain test.com password-for-postmaster

For creating new user:
vadduser newuser@test.com [[password-for-newuser]]

For deleting a user:
vdeluser newuser@test.com

For deleting a domain:
vdeldomain test.com

For changing a user’s password:
vpasswd user@domain.com [[password-for-user@domain.com]]

The above should cover pretty much all possible scenarios.

Yes, sure, if you can help with a script to bring the above functionality and make it accessible from the proper template, that would be awesome.

> If only we can get extreme ease of use in there without killing
> the flexibility, we’ll be golden.

I could help you with that - seriously.

Harry

Any follow up on this issue as i am also looking forward for something similar thou. Would appreciate if some help could be provided. Thanks.

dear…

i want to ask " how to backup the mail address and password my client on qmailtoaster server(my mail server)???

coz i want migrate the mail server from qmailtoaster(redhat9) to qmailtoaster(centos5) !

thanks for your answer …

dani