I have a mail server set up on a Debian 7.2 machine running Dovecot 2.1.7 and Postfix 2.9.6. I have both Dovecot and Postfix set up to load virtual users from a database populated by Postfixadmin.

Currently the mailboxes are stored at /var/mail/example.com/username for each user for each domain, and Dovecot (IMAP) requires the full username@example.com to be given for authentication.

Would it be at all possible to add the ability to add alternative logins for certain e-mail addresses? Such as being able to login with admin instead of admin@example.com?


Dovecot: Adding missing domain to login

Have you tried to use auth_default_realm configuration option to fill missing domain?


  • Most excellent! Any idea how I get Roundcube webmail to do the same thing? Now when I login with username to Roundcube I get the e-mail for username@example.com but the identity is username@localhost. – DanielGibbs Dec 30 '13 at 7:58
  • Got it! You need to set $rcmail_config['username_domain'] = 'example.com'; to get Roundcube to work properly. – DanielGibbs Dec 30 '13 at 8:14

It's possible. I'm assuming that in this case, the mailbox will be at a different directory than for the domain users?

You would need to add that user to the userdatabase, and make sure that the MailLocation field points to the right place.

There's some more information about the userdatabase at the dovecot wiki.

  • Nope. It would just be a convenient shorthand login for certain domain users. It would still be associated with the domain mailbox. – DanielGibbs Dec 16 '13 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.