dovecot Mail delivery System returns “unknown user” and client authentication fails-Collection of common programming errors

I have dovecot installed on Ubuntu 12.04. I am using Ispconfig3 to manage the virtual users. I have been through the http://wiki2.dovecot.org/TestInstallation process and everything (except the ssl) works: I can log in using telnet. I can open the inbox.

However when I try to send an email to one of the accounts from gmail, the email gets returned from “Mail Delivery System” saying “unknown user: ‘test'”. Trying to receive mail using a client gives an authentication error.

There don’t seem to be any relevant errors in /var/log/ mail.err or mail.log.

One thing I am suspicious of is that I have not used a sub domain for my mail server and I am not sure if this causes problems. (Now or in the future).

What should I do to troubleshoot this further?