[Dovecot] dsync and pop3 migration plugin fails for large inbox due to idle timeout

Nikolai Schupbach nikolai at net24.co.nz
Fri Aug 3 10:04:36 EEST 2012


Timo,

There is a problem with the dsync POP3 migration plugin when syncing a large INBOX. What happens is dsync establishes a connection to the POP3 server at the beginning of the sync, but then it sits there idle until it's used to sync the UIDLs. On a very large inbox with many thousands of messages it will be idle for longer than a POP3 server's idle timeout setting. 

When the UIDL sync occurs dsync produces the following errors (because the connection has been lost due to the POP3 server's inactivity timeout):

dsync(first.last at test.co.nz): Error: pop3c(pop3.test.com): Server disconnected unexpectedly
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 13: Disconnected
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 14: Disconnected
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 15: Disconnected
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 16: Disconnected
...
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 14492: Disconnected
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 14493: Disconnected
dsync(first.last at test.co.nz): Error: pop3_migration: Failed to get header for msg 14494: Disconnected

Also at the end of the dsync it actually has an exit status of 0, but it shouldn't because the POP3 sync failed, and none of the UIDLs are retained.

Dsync should try to keep the POP3 connection alive, by sending a regular 'NOOP' command to the POP3 server, or it should simply reconnect if sees the connection is lost.

At the moment the only work around is to increase the POP3 server's idle timeout to a multi hour value, which isn't a good work around as it causes a lot of inactive POP sessions to bank up.

Regards, Nikolai.


More information about the dovecot mailing list