Duplicate users bug


If I create a new mail user in Virtualmin, and then go to the Read User Mail page there are two users showing instead of one, in the following formats:


In the /home/domain.com/homes directory, only one folder exists (correctly).

If I send mail to the user, then the Read User Mail page displays as follows:

user-domain.com (47.78 kB in 1)
user@domain.com (47.78 kB in 1)

If I try to login via POP3, only the user-domain.com is accepted (incorrectly - it should be user@domain.com).

Virtualmin is setup for user@domain.com format.

How can I get rid of this second unwanted user-domain.com mailbox?

This is a FAQ:


Thanks Joe - I thought you might say that!

I have read this FAQ, but I don’t think it is related. I do already have the -r flag, it was already there when I installed my Fedora 8.

Even though there is only one mailbox, Virtualmin is showing two, and it is confusing my system!


Thanks for the lengthy reply. By the way, I didn’t have the ‘-r’ flag installed… I was looking at the wrong server. But I do now.

Nonetheless, there does appear to be a bug here, with duplicates in Read User Mail.

I can give you access to my Webmin installation if you like - you’ll see that in Read User Mail there are two users where there should only be one :

info-davidroder.co.uk (1.55 kB in 1)
info@davidroder.co.uk (1.55 kB in 1)

It does appear to be confused!


Yep, that’d be a bug. I’ll file it.

Hi Lewis,

Do these users get their mail delivered to ~/Maildir , or files under /var/mail ? In the former case, Virtualmin should already be skipping the duplicates, as they would have the same mailbox file…

OK, my apologies.

My mail was being delivered to /var/mail.


home_mailbox = Maildir/

to /etc/postfix/main.cf seems to have solved the duplicate mailbox problem, so thanks very much.

Sorry for shouting ‘bug’ so quickly!

It was a bug though - webmin shouldn’t display duplicate users even when /var/mail is being used, as normally the mailboxes for - and @ format usernames are linked together. I’ll fix this in the next release.

This is mildly disturbing, as I also use user@domain for my users. The reason I use that form is that its far easier for my users to remember their email address and login with it than to remember user.domain or user-domain.

I’ve had no issue with it. I’m just wondering if this functionality will stick around, or if you guys will go the way of Wietse and deprecate it at some point?


The user@domain format will be fully supported in future - I know a lot of people like it, as it is easier for mail users. So even though Virtualmin has to do a lot of behind the scenes trickery to implement it (which causes bugs like the one reported in this thread), it is still worth the effort.

I've had no issue with it. I'm just wondering if this functionality will stick around, or if you guys will go the way of Wietse and deprecate it at some point?

As Jamie mentioned, it’ll stick around. There’s no risk of us deprecating it. Jamie worked too hard to support it so well! :wink:

The complaint Wietse has with it is actually solved by our two-user workaround. The two users makes some folks uncomfortable, but it’s a harmless little workaround and most tools never need to know about it. And, if you use Maildir, it’s almost foolproof. Old style mbox mail spools are still a bit problematic, and I’m not sure there’s anything we can do to solve that particular problem. Luckily, pretty much everyone agrees on the benefits of Maildir these days–even if arguments over performance remain, it’s hard to argue that Maildir doesn’t work better for large mailboxes in a virtual hosting environment (benefits range into many disparate areas like backups, folder management, mass deletions for spam, etc.).

Anyway, now I’m just rambling. Don’t worry. We support user@domain mailboxes and will forever and ever, amen.

I have read this FAQ, but I don't think it is related.

Nope, it’s definitely related:

Virtualmin has several clever hacks to workaround this particular feature of Postfix, revolving around the creation of a second user with the same UID and paths, which Postfix can deliver to. This has many potential problems and might confuse other software that isnâ