Stop Apples Dovecot allowinf all users on a Virtual Domain

Dragging up an old post, but for those that stumble upon this I found a solution for allowing users to login with their email address. The issue is that Apple configures Dovecot to strip the ‘@’ and anything after it from the username before looking up the account.

 

The solution is to override this configuration by creating the following file: ‘/ect/dovecot/local.conf’ with the following content.

# Username formatting before it's looked up from databases. You can use
# the standard variables here, eg. %Lu would lowercase the username, %n would
# drop away the domain if it was given, or "%n-AT-%d" would change the '@' into
# "-AT-". This translation is done after auth_username_translation changes.
auth_username_format = ''

Apple has this config set to %n by default.