Mail for domain error if postfix installed before Virtualmin and maps in MySQL

Well, most of us here have installed Virtualmin as per the official documentation. You have elected to choose a different path and are in uncharted waters.

I wish you the best of luck.

Thank you @calport for your good wishes.

I am still hoping for an helping answer in a manner of what to check, what to alter, how to use mysql maping

This sounds like a bad idea. Are you sure you really want your postfix maps in MySQL? Why?

Hello @Joe
I have installed Postfix , MySQL server and Apache long before Virtualmin.
Everything is working fine. I added a new domain - website is working, mysql is working, I can read Mail for that new domain in Usermin… I can edit this new domain just fine except I can not enable Mail for domain.
The file: ‘/etc/postfix/’ mentioned above in my original post is the file Postfix is using to determine virtual mail domains.
I have setup Postfix following this tutorial: Postfix
For now I am managing virtual mail domains thru postfixadmin
but I would like to be able to enable Mail for domain in Virtualmin.

Yeah, that’s a mistake. Wildly complicated setup.

Anyway, you can’t manage mail with Virtualmin with this configuration. You’ll need to disable mail in Features and Plugins and keep managing your mailboxes as you have been.

Thank you @Joe for your replay.
What do you think if I install Virtualmin to my other Ubuntu machine which has no Postfix, and no LAMP installed and give it a try there?

That is a good idea @Markoamb. Just make sure:

  1. the server has a fresh install of Ubuntu
  2. Ubuntu is for a version that is included in the Class A supported - Virtualmin OS Support | Virtualmin
  3. You use the automated install procedure for Virtualmin - Automated Virtualmin Installation | Virtualmin
1 Like

Yeah @calport , I will try it…
You know how it goes…, you build your server over the years and there is a lot of working hours put into it and then you feel a bit disappointed when something like this mail mapping doesn’t work…

Thank you for your support though

Virtualmin doesn’t support maps in MySQL. I’m not trying to be discouraging, it’s just not something that can be done without a considerable amount of new code.

And, it is almost always worse from a technical perspective to put maps into MySQL. It is slower than regular hash maps (by an order of magnitude or so, probably, though map lookups are such a tiny part of the mail delivery process that it doesn’t matter), it is more resource-intensive (both memory and CPU, though less so if you already have MySQL in use on the system for websites or other stuff), it introduces a new potential point of failure, and adds a new potential vector of attack in terms of security. And, it is more complicated to setup and maintain. All for no benefit in 99% of deployments at the scale people use Virtualmin for.

I’m not saying no one should ever put maps in MySQL, but I am saying that almost no one should put maps in MySQL. If you don’t have an extremely good reason to do it, you should not do it. And, managing maps in MySQL is not something we’d have any interest in adding to Virtualmin (because I don’t think most Virtualmin users should put their maps in MySQL, and we’re trying to guide people into making reasonable choices to build servers that can be maintained by people of varying technical ability over many years without a huge investment of time). So, if someone wanted to use Virtualmin with maps in MySQL that someone would need to build it.

Hope this clarifies why we’re not trying to help you use your existing mail configuration. We just can’t. It isn’t a capability Virtualmin has, and because it is unnecessarily complex, it’s not a capability Virtualmin is likely to ever have.

Yes, I know exactly how you feel. Standardization is the answer if one wants to put in hours of work and then not see it go down the drain. Fortunately Virtualmin offers a degree of standardization in how a system is configured when the Virtualmin Automated Install process is used and there is a community of users and enthusiasts who support this standardized install of Virtualmin, so the working hours that we all, as a community, put into a common standardized system produces insight and experience that we can share with each other in order to help each other create and maintain a hosting environment that can work reliably for many years.

Additionally, Virtualmin supports multiple OSs and is not intrusive like many of the other web hosting control panels are, which I feel is a USP worth noting.

Let us know if you need assistance with your Virtualmin install on the other Ubuntu system.

I understand @Joe what are you saying.

But I am already near a solution.
I will post it later if everything goes well. For now just a hint:
I am already able to enable Mail for that new domain…
:wink: :wink:

1 Like

I am grateful for your effort to helping me out.
I will see if I can manage to configure current Virtualmin to work as it should.
As I already replayed to @Joe I am already able to enable Mail for that new domain.
I need to check if everything is working and then I will post an solution to my question.

Your title says this:
Mail for domain error if postfix installed before Virtualmin and maps in MySQL

The very first sentence in the instructions for your OS in advance of installing Virtualmin says this:
Do not pre-install or pre-configure any additional packages on your OS.

It never ceases to amaze me how many people post about problems that they themselves create for absolutely no reason on earth.

I should own up to this: I edited the topic to reflect the discussion as it developed in order to make it meaningful to humans as well as the bots.

The original topic was just “Mail for domain error” and the OP was probably not aware, when he installed Virtualmin, of many things that he now is.


Lesson learned - hard way.
And dear @Gomez_Adams thank you for drooping by.

I’m not the one that can’t follow very simple directions. You are.

Keep it friendly, y’all.


This is off-topic. Could you kindly begin a new topic with your comment / query please?

Hi @calport
removed off-topic question and opened new topic:

ERROR cannot verify’s certificate while trying to install

Waiting for some suggestions…

please delete.