dovecot in Red Hat Enterprise Linux 6 may fail the first time a user access mail via POP or IMAP

Solution Verified - Updated -

Issue

The dovecot mail server may not work correctly when a mail client connects to a mail server over POP3 or IMAP. In either case, the behavior of dovecot may change according to how many times the mail user has attempted to access to the mail server. The details are described below. "[First/Second/Third]" refers to how many times the mail user has attempted to access to the mail server.

For POP access, the following events occur:

  • First Time : The user may not be able to login to the mail server. The following error message may be reported to the console:

    -ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2010-08-09 17:21:18]
    

    In addition, lines similar to the following may appear in /var/log/messages:

    dovecot pop(popuser): Error: chown(/home/popuser/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=509(popuser), group based on /var/mail/popuser)
    dovecot: pop3(popuser): Error: mkdir(/home/popuser/mail/.imap/INBOX) failed: Operation not permitted
    dovecot: pop3(popuser): Error: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2010-08-09 17:21:18]
    
  • Second Time:The user can login to the mail server, but may not be able to access their inbox.  Messages similar to the following may appear in /var/log/messages:

    pop3(popuser): Error: fchown(/home/popuser/mail/.imap/INBOX/dovecot.index.logewlock, -1, 12(mail)) failed: Operation not permitted (egid=509(popuser), group based on /var/mail/popuser)
    
  • Third (and subsequent) Times:The user can login to the mail server. No error message is reported

For IMAP access, the following events occur:

  • First Time: The user can login to the mail server, but may not be able to access the mailbox. The following error message may be reported to the console:

    2 select inbox
    2 NO [SERVERBUG] Internal error occurred. Refer to server log for more information. [2010-08-11 15:57:48]
    

    In addition, lines similar to the following may appear in /var/log/messages:

    dovecot: imap(imapuser): Error: chown(/home/imapuser/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=510(imapuser), group based on /var/mail/imapuser)
    dovecot: imap(imapuser): Error: mkdir(/home/imapuser/mail/.imap/INBOX) failed: Operation not permitted
    
  • Second Time: The user can login to the mail server, and can access to the mailbox, but the following messages may appear in /var/log/messages:

    dovecot: imap(imapuser): Error: fchown(/home/imapuser/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 12(mail)) failed: Operation not permitted (egid=510(imapuser), group based on /var/mail/imapuser)
    
  • Third (and subsequent) Times: The user can login to the mail server and can access to the mail server. No error message is reported.

Environment

  • Red Hat Enterprise Linux 6
  • dovecot-2.0-0.8.beta6.20100630.el6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content