Solved: Broken Postfix configuration, possibly related to renamed domain

There was something badly broken in my Postfix setup, and I hadn’t touched it, so whatever was there was put there by Virtualmin. I am on the latest, 3.72 Pro, but not sure exactly when the original domain was created.

Anyway, as the doc says, mail is an area that is probably best described as “fraught with peril”, like in an Odyssean sense.

This was on a domain that I had renamed, from a .info to a .com

The symptom was that I could not see email in Squirrelmail.

My hosting company did a stellar job, I think, in ferreting out this issue. Here is the fix:

/etc/postfix/ was missing a virtual_alias_maps directive. I’ve
added that, removed that domain from the mydestination line and placed
the system hostname in the mydestination line. After doing that and
restarting postfix, it’s receiving email.

Well, it’s mostly Greek to me (continuing the reference above, I guess), but the line to be added is something like:

virtual_alias_maps = hash:/etc/postfix/virtual:

To add a new domain for mail service:

To add {newdomain.tld} here, you’ll need to adjust that virtual_alias_domains = line- Add newdomain.tld to that line- it’s a comma separated list- and then restart postfix with:

/etc/init.d/postfix restart

If you had any address changed in /etc/postfix/virtual, you’ll need to
change the mapping there via:

postmap /etc/postfix/virtual && /etc/init.d/postfix restart


I hope that this helps someone. I can’t make any guarantees of accuracy or completeness.

This issue was one of those which took hours from my life which I will never get back, or even be able to bill. My hope is that Jamie, Joe, Eric…someone of the “powers that be” will take a serious look at this issue, and make it work better. Specifically, I would hope that if I have Postfix enabled, and I install Squirrelmail, Horde, etc., it should, ideally, “just work”. Failing that, the Install Scripts wrapup instructions should list the config changes to make it work.

Or maybe it’s just user error…but that’s never happened before :slight_smile:


Anyone seen an issue like this? It appears that Virtualmin generated or copied, at an unknown time, a slightly defective /etc/postfix/, which rendered all real mailboxes on my server non-functional. Forwarders seem to have always worked.

I didn’t discover this breakage until people wanted to start using real mail addresses on my server.

I couldn’t find any documentation or forum threads that I could make sense of. I did get the impression from the forums that there were numerous problems with mail setup, and that it’s definitely a messy area.

Still, I am of the impression at this time that Virtualmin failed me. It seems optimal that Postfix should not install broken, as seems to have been the case.

Can anyone help to clarify, or perhaps at least commiserate?


Hi Ken,

Well, the goal of the installer is to actually set you up with a fully working server – including working email, amongst other things.

Having to add in a “virtual_alias_maps” is odd, as the installer should definitely be doing that by default – it did on the last few installs I’ve done!

So if it doesn’t work in all cases, we’d certainly want to figure out what went awry :slight_smile:

Can you say a few words about your setup? A few questions I have are:

  • Which distro/version are you using?

  • Was it a fresh install?

  • Who performed the distro install, you or your provider?

  • Do you have a copy of how the looked immediately after the install?