I would rather not modify the code unless the solution I come up with would be accepted into the mainline code base.
Prior to your reply, I've been running with the following settings:
virtdomains: userid defaultdomain: imap.sample.domain.com loginrealms: imap.sample.domain.com
This allows logging as either "person" or "person@xxxxxxxxxxxxxxxxxxxxxx"
Changing the configuration as you suggested:
virtdomains: userid defaultdomain: sample.domain.com loginrealms: imap.sample.domain.com
Allows logging as either "person", "person@xxxxxxxxxxxxxxxxx", or "person@xxxxxxxxxxxxxxxxxxxxxx", but in the final case I get a "Mailbox not found" error.
And you are correct, simply removing the loginrealms statement:
virtdomains: userid defaultdomain: imap.sample.domain.com
still allows logging as either "person" or "person@xxxxxxxxxxxxxxxxxxxxxx". I will simply have to do without the ability to login as "person@xxxxxxxxxxxxxxxxx".