Mail for domain failed!


When I want to enable mail for a domain, Virutalmin reports:

Adding to email domains list .. .. Mail for domain failed! :

Updating Webmin user …
… done

Saving server details …
… done

Re-loading Webmin …
… done

I’m running on Ubuntu 8.04 and when I check the virtualmin config it sais:

Mail server Postfix is installed and configured.

Everything else is working fine.

On this page:,com_openwiki/Itemid,48/id,troubleshooting_common_problems/#email
you mention the DNS configuration needs to have MX records, but they are missing in my DNS record file.
Do I need to add them myself? Or are these added when enabling mail on the domain?

Oh, and initialy postfix had an error saying the file /etc/postfix/virtual.db was missing.
But I added it with the help of the postmap command.

This one is not a common problem…so you won’t see it in the troubleshooting guide. But thanks for actually having read it! :wink:

MX records are handled by Virtualmin. You don’t need to add them.

This particular problem is way before DNS could become an issue.

I’m not actually sure what could cause this.

Did you install using the automated install script? ( from the Download page here at Or did you do a manual install using packages downloaded from

Thank you for answerng!

I followed the “Setting up Virtualmin” instructions on

But maybe it was better to run the automated install script? I was not sure about it because in my case it was not a "fresh" system.

Should I post some log file so you can help me find the solution?

If it’s not a freshly installed OS, then you probably don’t want to run the install script. It could break stuff.

But, you do have to perform a lot more configuration if you don’t use

You might have a look at the script, in particular at the Postfix section, to be sure you have a pretty sane configuration to start with:

I’m guessing the virtual map isn’t configured correctly…though I’m surprised the Config Check didn’t complain about it.

I have just set up a new server with the script. After setting up one test domain, I converted authentication to LDAP and deleted the domain and trying to re-add I get the same message. I too am on Ubuntu 8.04.

How would I go about checking the virtual map you mentioned?


Hi Neal,

I’m unfortunately not too familiar with setting up LDAP alongside Virtualmin, but if you haven’t already, you may wish to check this out:,combining_virtualmin_and_ldap/

Of particular note, there’s a section there for setting up Postfix, perhaps that will get you pointed in the right direction.