Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to login to my IMAP Dovecot server on my Amazon EC2 instance. I am attempting to login as root and I recieve this error in the mail log:

dovecot: imap: Error: user root: Invalid settings in userdb: userdb returned 0 as uid

What should I do? Thanks.

share|improve this question
up vote 5 down vote accepted

Don't login to IMAP as root ($10 says you're not using TLS either, so your root password just went across the Internet en-clair). Redirect mail destined for the root account to a non-privileged account, collect the mail from that account, change your root password, and setup TLS.

share|improve this answer
I figured using root for login would not be a good idea. I am trying to setup the mail handling for the user "postmaster" now which I assume is the default account postfix creates. Have no idea how to setup TLS. – john Jul 19 '11 at 0:53
I can't get postfix to receive mail as a different user other than "root". In the alias file I changed the email alias to "postmaster". I reloading postfix but it still continues to use instead of – john Jul 19 '11 at 1:12
If you don't know how to do something like setup TLS, ask a question on Server Fault. Did you run newaliases after you edited /etc/aliases? Also, postmaster is a "role account" too; you should feed that to a real user account as well. – womble Jul 19 '11 at 1:17
Yes I ran newaliases. Should I not use postmaster and make another account? I don't know why it keeps sending to root – john Jul 19 '11 at 1:20
You should already have a regular account on the system for you to use; redirect all the mail to that. Please don't ask extended questions in comments; reformulate your question into something comprehensive and answerable and ask it as a new question. – womble Jul 19 '11 at 1:21

I had this issue today. It occurred when I added more than one domain to the server. So, I followed this help: and referenced to the ispconfig manual at page 193. After that I update all email accounts and it's working!

Hope it helps.

share|improve this answer
Welcome to Server Fault! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Frederik Nielsen Dec 21 '15 at 9:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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