#!/bin/cat $Id: FAQ.Dovecot.txt,v 1.15 2024/03/14 12:56:36 gilles Exp gilles $ This documentation is also available online at https://imapsync.lamiral.info/FAQ.d/ https://imapsync.lamiral.info/FAQ.d/FAQ.Dovecot.txt ======================================================================= Imapsync tips for Dovecot. Specific issues and solutions. ======================================================================= Questions answered in this FAQ are: Q. Is there imapsync specific options to deal with Dovecot? Q. The login fails with the error: Err 1/1: Host2 failure: Error login on [...] with user [...] auth [LOGIN]: timeout waiting 120s for data from server (5x) What can it be? Q. Subfolders are not created by imapsync and the error is "Mailbox doesn't allow inferior mailboxes" Q. How to migrate to Dovecot with an admin/MasterUser account? Q. I have a mailbox that "dovecot backup" gives errors on that I can't get rid of: "UID inserted in the middle of mailbox". What can I do? Q. Imapsync encounters timeouts and Dovecot log says "mailpiler dovecot: imap(xxx): Error: Timeout (180s) while waiting for dotlock for transaction log file ..." What can I do? Now the questions again with their answers. ======================================================================= Q. Is there imapsync specific options to deal with Dovecot? R. Dovecot is ok with imapsync, nothing special is needed, just the basic options, ie, the credentials, are needed. ======================================================================= Q. The login fails with the error: Err 1/1: Host2 failure: Error login on [...] with user [...] auth [LOGIN]: timeout waiting 120s for data from server (5x) What can it be? R. It can be special characters in the password. Change it with only normal characters, characters from a-z A-Z 0-9 ======================================================================= Q. How to migrate to Dovecot with an admin/MasterUser account? R. Dovecot uses the same syntax as uw-imap imapsync ... --user2="loginuser*admin_user" --password2 "admin_user_password" To setup a Dovecot MasterUser follow the document https://doc.dovecot.org/configuration_manual/authentication/master_users/ If you encounter this error message from imapsync: Err 1/18: Host1 Folder INBOX: Could not select: 16 NO [SERVERBUG] Internal error occurred. Refer to server log for more information. See then: https://github.com/imapsync/imapsync/issues/148#issuecomment-1982241694 I quote budiantoip ``` This happened because I use a master user to transfer the mailboxes, and the master user does not have access to the user's mailboxes. The solution is to modify the dovecot config and add these 2 lines: plugin { # lines of the existing plugin block ... acl_user=%u master_user=%u } Save the changes, and validate the config with this command: doveconf >/dev/null && echo OK If it returns no error or warning messages, restart the dovecot service. You should be able to proceed after that. ``` ======================================================================= Q. I have a mailbox that "dovecot backup" gives errors on that I can't get rid of: "UID inserted in the middle of mailbox". What can I do? Q. Solution, run: doveadm -v deduplicate -m -u martin mailbox A/Posted it will get rid of the duplicates (I can also be run without "-m") and this also allows "dovecot backup" to work. Thanks to Martin Ward for this input! ======================================================================= Q. Subfolders are not created by imapsync and the error is "Mailbox doesn't allow inferior mailboxes" R. Dovecot usually supports subfolders with messages and subfolders, it's a Dovecot configuration issue. If you can change the Dovecot configuration dovecot.conf, then try this: mail_location = maildir:~/Maildir:LAYOUT=fs See details at: https://superuser.com/questions/813362/sub-folders-in-dovecot https://wiki2.dovecot.org/MailLocation/Maildir ======================================================================= Q. Imapsync encounters timeouts and Dovecot log says "mailpiler dovecot: imap(xxx): Error: Timeout (180s) while waiting for dotlock for transaction log file ..." What can I do? R. It looks like an NFS issue with Dovecot. Solve it with Dovecot support or use something else than NFS. I'll be glad to share here any solution you find. (Thanks to Mate Skoblar for reporting this issue) ======================================================================= =======================================================================