dovecot not moving mail from Maildir/new to Maildir/cur

Discussion in 'Installation/Configuration' started by rbartz, Apr 27, 2019.

  1. rbartz

    rbartz Member HowtoForge Supporter

    I set up a Centos 7.6 perfect server last week and used ispconfig migrate to move clients/sites/email to the new server. Everything looked good to start with, all moves were a success. The only issue I had was having to change the postfix smtpd_helo_restrictions so it would accept mail from invalid or unknown hosts.

    email is coming into the system and is being put in the user's Maildir. HOWEVER, the email is not being delivered to the /var/vmail/domain.tld/user/Maildir/cur directory.

    It is going into the /var/vmail/domain.tld/user/Maildir/new directory and staying there. Dovecot is not delivering the mail to our pop3 users.
    I have no clue what could be different. I have compared the dovecot.conf files with our other server and they are the same but for server names. I have checked the logs and the mail shows it is sent through amivisd and put in the INBOX.
    I have tried manual POP3 logins with telnet and it logs in fine. IMAP works from roundcube.

    Thank you for any help. This was unexpected.
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    It is normal and correct for new mail to show up in a "new" directory first, and then once it has been seen by a mail client it moves to "cur". You have verified that the mail is sitting on disk in "new"? It is most likely a file/directory ownership/permission problem, what do you see as the user/group and permissions for a file in "cur" which a mail client can see vs. one in "new" which a client cannot see?

    Check the ISPConfig setting under System > Server Config > {server} > Mail > Use Websites Linux uid for mailbox, is that checked? Do you still have access to the old server's control panel? If so compare the setting there. That setting is usually off, and mail files/directories will all be owned by the user/uid and group/gid listed just above there, which might be worth a quick verify (ie. make sure that user and group both exist and the uid/gid are correct.) Unless you know you want that setting enabled, I would recommend turning it off and running chown of the /var/vmail directory contents (for debian, "chown -R vmail:vmail /var/vmail/*" would probably get it, but I don't know if centos uses the same 'vmail' user for ISPConfig setups), followed by a chown to set everything to known permissions.

    If you still have a problem after that, check the maillog and see if you get any errors when a message delivers.
  3. rbartz

    rbartz Member HowtoForge Supporter

    Thank you. After rebooting the new server after a final sync and shutting down the old server, things began to work as expected.

Share This Page