Postfix/Dovecot email address transformation bidirectional?

I've been moving a family of businesses off Plesk and onto Virtualmin. The email service they had been using permitted them to tell their email clients (Gmail, Thunderbird, Outlook, etc.) to enter their email address in the POP credentials prompt. So they have a lot of computer illiterate folks that I must now tell to go in and modify their POP email credential that was, say:

joeblow@acme.com

to:

joeblow.acme

Now I did read over What's the deal with @ in mailbox usernames? but it left me with a question:

Since there is a standard transform going from email address to mailbox name and, realistically speaking, it is reversible (even though VirtualMin Virtual Hosts clip off the TLD), why is it that the hapless users can't -- in their pop email credential at least -- use either joeblow.acme OR joeblow@acme.com?

Status: 
Active

Comments

Unfortunately, the Dovecot IMAP/POP3 server doesn't support transforming usernames - it only works with the actual usernames, which may be in user@domain format if that's how you've configured Virtualmin.

What I would do in your case, is just use user@domain.tld as the username (in spite of what's mentioned in the article you read).

I use that on all my personal systems, and it works quite well.

You can make that change in System Settings -> Server Templates -> Default -> Mail for Domain, and there you can change the "Format for usernames" at the very bottom of the page there.

I discovered the problem after I had deployed the site -- presumably from the default template.

Are you saying that if I change the default template this affects already deployed sites?

No, it doesn't effect existing sites, unfortunately.

Is it an option to re-perform the restore? Doing the restore again, after making that change, should create the usernames using the new format.

Unfortunately, the difficulties in getting things to work as they stand were substantial enough that the customer is not likely to put up with another "restore" and is more likely to accept telling the email users to get tech support to change their email addresses for POP authentication -- which is a royal pain.

I'm looking at writing a shim of some sort to do the transform for Dovecot authentication. It's a trivial transform and would be lower risk than doing another "restore".

It really should work the way Usermin works -- which, for joeblow@acme.com accepts (at https://webmail.acme.com) joeblow@acme.com, joeblow and joeblow.acme.

But I don't have much time. People like their email.