Mark Zealey
2013-Apr-11 08:28 UTC
[Dovecot] [PATCH proposal] make dsync preserve pop3_uidl_format
Hi there, I ran into an issue yesterday (dovecot 2.0) whereby when we dsync messages from a local machine (sdbox) to a remote (Maildir) which have different pop3_uidl_formats configured, the uidl format is not preserved. There doesn't seem to be any way to force this in the code, although I suspect that Maildir sources with saved pop3 uidls would pass them correctly. Attached is a rough patch against 2.0.21 dsync which will generate the uidls on the client before passing them over to the destination. This only works for %u and %v currently, also because dsync doesn't read the whole config file you need to specify -o pop3_uidl_format=... to dsync. Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: dsync-save-uidl-format.patch Type: text/x-patch Size: 1694 bytes Desc: dsync-save-uidl-format.patch URL: <http://dovecot.org/pipermail/dovecot/attachments/20130411/a49e3ba6/attachment.bin>
Timo Sirainen
2013-Apr-11 10:25 UTC
[Dovecot] [PATCH proposal] make dsync preserve pop3_uidl_format
On Thu, 2013-04-11 at 08:28 +0000, Mark Zealey wrote:> I ran into an issue yesterday (dovecot 2.0) whereby when we dsync messages from a local machine (sdbox) to a remote (Maildir) which have different pop3_uidl_formats configured, the uidl format is not preserved. There doesn't seem to be any way to force this in the code, although I suspect that Maildir sources with saved pop3 uidls would pass them correctly. Attached is a rough patch against 2.0.21 dsync which will generate the uidls on the client before passing them over to the destination. This only works for %u and %v currently, also because dsync doesn't read the whole config file you need to specify -o pop3_uidl_format=... to dsync.Hmm. Tricky. The UIDL generation in pop3 code would have to be moved to somewhere more generic for this to fully work. That's a little bit annoying to do. Another possibility would be to use v2.1+ and imapc+pop3c, which would preserve POP3 UIDLs: http://wiki2.dovecot.org/Migration/Dsync