Hi all, I'm trying to move a Dovecot installation from one server to another, specifically for the sake of one single user. Unfortunately despite all my efforts I am stuck getting "Mailbox isn't a valid mbox file" when testing the new installation by IMAP and POP. The error looks like this (for POP - same with IMAP except it is generated when I do 'select inbox' after logging in): Code: # telnet localhost 110 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. +OK Ready. user user +OK pass password +OK Logged in. -ERR Mailbox isn't a valid mbox file -ERR [IN-USE] Couldn't sync mailbox. Connection closed by foreign host. This is the Dovecot configuration on the old server (working): Code: # 1.0.7: /etc/dovecot.conf ssl_cert_file: /etc/pki/CA/dovecot.pem ssl_key_file: /etc/pki/CA/dovecot.pem login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_greeting: Ready. mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 auth default: passdb: driver: pam userdb: driver: passwd This is the configuration for the non-working server: Code: # 1.0.7: /etc/dovecot.conf ssl_cert_file: /etc/pki/CA/dovecot.pem ssl_key_file: /etc/pki/CA/dovecot.pem login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_greeting: Ready. mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 auth default: passdb: driver: pam userdb: driver: passwd The locations of what as far as I know are the important files are the same on both servers, namely: Code: # ll /home/user/mail/.imap/INBOX/dovecot.index* -rw------- 1 user user 13200 Aug 7 11:02 mail/.imap/INBOX/dovecot.index -rw------- 1 user user 38912 Aug 7 11:02 mail/.imap/INBOX/dovecot.index.cache -rw------- 1 user user 5176 Aug 7 11:02 mail/.imap/INBOX/dovecot.index.log -rw------- 1 user user 132964 Aug 7 10:02 mail/.imap/INBOX/dovecot.index.log.2 # ll /var/spool/mail/user -rw------- 1 nhs_feedback mail 211329403 Aug 8 11:25 /var/spool/mail/nhs_feedback Permissions are also the same. I have tried deleting the dovecot.* files in the INBOX directory based on some suggestions online, and restored them again when this made no difference (same error); I have also restarted dovecot a large number of times. Does anyone have any ideas? I am happy to supply more information if required. Thanks! SuaSwe
Hi everyone, This is now fixed - I removed a leading line break in the /var/spool/mail/user file and can now log on using telnet to 110. Cheers! SuaSwe