This documentation is for Dovecot v1.x, see wiki2 for v2.x documentation.
Differences between revisions 51 and 52
Revision 51 as of 2007-03-19 20:49:32
Size: 3213
Editor: TimoSirainen
Comment:
Revision 52 as of 2007-03-20 21:38:36
Size: 3626
Editor: TimoSirainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Dovecot is one of the easiest IMAP servers to migrate to because of its very powerful configuration options. Dovecot can store email in both MBOX and MAILDIR formats, making it compatible with most other mail storage formats. Dovecot is also very flexible as to where it stores the email. It supports many methods for storing user data and password authentication. You can set it up to authenticate against multiple databases.
Line 4: Line 3:
Migration involves several separate tasks. You either need to convert your data or make Dovecot read your existing data. Dovecot is very good at being compatible and configurable so that it is likely to read your existing mail folders and user and password configurations. Tasks for conversion include:

 * Where and how to store the email
 * User configuration - home directory structure - UID/GID - password storage
 * Authentication of users

When migrating from another IMAP server, you should make sure that these are preserved:

 1. Message flags
  * Lost flags can be really annoying, you most likely want to avoid it.
 1. Message UIDs (and for IMAP, the UIDVALIDITY value)
  * If UIDs are lost, at the minimum clients' message cache gets cleaned and messages are re-downloaded as new.
  * Some IMAP clients store metadata by assigning it to specific UID, if UIDs are changed these will be lost.
 1. Mailbox subscription list
  * Users would be able to manually subscribe them again if you don't want to mess with it.

When migrating from another POP3 server, you should make sure that POP3 UIDLs are preserved, otherwise if client had kept mails in the server all the mails are downloaded again as new mails. `pop3_uidl_format` and `pop3_reuse_xuidl` will help you here. If your existing server used IMAP UIDs for the POP3 UIDL, you'll also need to make sure the IMAP UIDs stay the same.

Here are the more server-specific instructions:
This page contains generic information related to migrating from another IMAP or POP3 server to Dovecot. You should read this page, and then look at the server-specific instructions:
Line 29: Line 10:
== Other POP3 servers (X-UIDL) ==
Some POP3 servers generate the X-UIDL header. To use this header when available and ease migration, use:
Dovecot is one of the easiest IMAP servers to migrate to because of its powerful configuration options. Dovecot can store email in both [:MailboxFormat/mbox:mbox] and [:MailboxFormat/Maildir:Maildir] formats, making it compatible with many existing servers. Dovecot is also very flexible as to where it stores the email. It supports many different databases for storing [:PasswordDatabase:passwords] [:UserDatabase:user information].
Line 32: Line 12:
{{{
# Use X-UIDL header if available
pop3_reuse_xuidl = yes
}}}
Different POP3 servers generate UIDs differently. If you want to preserve them to avoid users downloading their mails twice, you'll need to figure out how the server generates the UID and patch Dovecot accordingly to do the same.
Migration involves several separate tasks. You either need to convert your data or make Dovecot read your existing data. Dovecot is very good at being compatible and configurable, so it is likely to read your existing mailboxes and user and password configurations. Tasks for conversion include:

 * [:MailLocation:Where and how to store the email]
 * [:PasswordDatabase:User authentication]
 * [:UserDatabase:User database configuration] (home directory structure, UID and GID)

== IMAP migration ==

When migrating mails from another IMAP server, you should make sure that these are preserved:

 1. Message flags
  * Lost flags can be really annoying, you most likely want to avoid it.
 1. Message UIDs and UIDVALIDITY value
  * If UIDs are lost, at the minimum clients' message cache gets cleaned and messages are re-downloaded as new.
  * Some IMAP clients store metadata by assigning it to specific UID, if UIDs are changed these will be lost.
 1. Mailbox subscription list
  * Users would be able to manually subscribe them again if you don't want to mess with it.

== POP3 migration ==

When migrating mails from another POP3 server, you should try to preserve the old UIDLs. If POP3 client is configured to keep mails in the server and the messages' UIDLs change, all the messages are downloaded again as new messages.

Some servers (UW, Cyrus) implementing both IMAP and POP3 protocols use the IMAP UID and UIDVALIDITY values for generating the POP3 UIDL values. To preserve the POP3 UIDL from such servers you'll need to preserve the IMAP UIDs and set {{{pop3_uidl_format}}} properly.

If the server doesn't use IMAP UIDs for the POP3 UIDL, you'll need to figure out another way to do it. One way is to put the UIDL value into X-UIDL: header in the mails and set {{{pop3_reuse_xuidl=yes}}}. Some POP3 servers (QPopper) write the X-UIDL: header themselves, making the migration easy.

Some POP3 servers using Maildir uses the maildir base filename as the UIDL. You can use {{{pop3_uidl_format = %f}}} to do this.
Line 40: Line 42:
 * [http://www.openwall.com/popa3d/ popa3d] Generates MD5 sum from a couple of headers. Dovecot uses compatible MD5 sums internally but converts them into strings in a bit different way.
 * [http://www.ex-parrot.com/~chris/tpop3d/ tpop3d] When used with maildir, tpop3d UIDL is a hexadecimal representation of first 16 2-byte words of md5 sum of the message filename. When used with mailbox, tpop3d UIDL is a hexadecimal representation of first 16 2-byte words of md5 sum of first 512 bytes of message (or full messsage if it less then 512 bytes).
[[Anchor(convert)]]
 * UW-POP3: {{{pop3_uidl_format = %08Xv%08Xu}}}
 * Cyrus <= 2.1.3: {{{pop3_uidl_format = %u}}}
 * Cyrus <= 2.1.4: {{{pop3_uidl_format = %v.%u}}}
 * Dovecot 0.99: {{{pop3_uidl_format = %v.%u}}}
 * [http://www.ex-parrot.com/~chris/tpop3d/ tpop3d]:
  * Maildir: {{{pop3_uidl_format = %Mf}}} (MD5 sum of the maildir base filename in hex)
  * mbox: MD5 sum in hex of first 512 bytes of the message (or of the full message if it's less than 512 bytes).
 * [http://www.openwall.com/popa3d/ popa3d] Generates MD5 sum from a couple of headers. Dovecot uses compatible MD5 sums internally, but converts them into UIDL strings in a bit different way.

Migration to Dovecot

This page contains generic information related to migrating from another IMAP or POP3 server to Dovecot. You should read this page, and then look at the server-specific instructions:

  • [:Migration/UW:UW-IMAP / UW-POP3]

  • [:Migration/Linuxconf:Linuxconf / VIMAP]

  • [:Migration/Courier:Courier IMAP and POP3]

  • [:Migration/Cyrus:Cyrus IMAP and POP3]

Dovecot is one of the easiest IMAP servers to migrate to because of its powerful configuration options. Dovecot can store email in both [:MailboxFormat/mbox:mbox] and [:MailboxFormat/Maildir:Maildir] formats, making it compatible with many existing servers. Dovecot is also very flexible as to where it stores the email. It supports many different databases for storing [:PasswordDatabase:passwords] [:UserDatabase:user information].

Migration involves several separate tasks. You either need to convert your data or make Dovecot read your existing data. Dovecot is very good at being compatible and configurable, so it is likely to read your existing mailboxes and user and password configurations. Tasks for conversion include:

  • [:MailLocation:Where and how to store the email]

  • [:PasswordDatabase:User authentication]

  • [:UserDatabase:User database configuration] (home directory structure, UID and GID)

IMAP migration

When migrating mails from another IMAP server, you should make sure that these are preserved:

  1. Message flags
    • Lost flags can be really annoying, you most likely want to avoid it.
  2. Message UIDs and UIDVALIDITY value
    • If UIDs are lost, at the minimum clients' message cache gets cleaned and messages are re-downloaded as new.
    • Some IMAP clients store metadata by assigning it to specific UID, if UIDs are changed these will be lost.
  3. Mailbox subscription list
    • Users would be able to manually subscribe them again if you don't want to mess with it.

POP3 migration

When migrating mails from another POP3 server, you should try to preserve the old UIDLs. If POP3 client is configured to keep mails in the server and the messages' UIDLs change, all the messages are downloaded again as new messages.

Some servers (UW, Cyrus) implementing both IMAP and POP3 protocols use the IMAP UID and UIDVALIDITY values for generating the POP3 UIDL values. To preserve the POP3 UIDL from such servers you'll need to preserve the IMAP UIDs and set pop3_uidl_format properly.

If the server doesn't use IMAP UIDs for the POP3 UIDL, you'll need to figure out another way to do it. One way is to put the UIDL value into X-UIDL: header in the mails and set pop3_reuse_xuidl=yes. Some POP3 servers (QPopper) write the X-UIDL: header themselves, making the migration easy.

Some POP3 servers using Maildir uses the maildir base filename as the UIDL. You can use pop3_uidl_format = %f to do this.

Here is a list of POP3 servers and how they generate their UIDs. Please update if you know more:

  • UW-POP3: pop3_uidl_format = %08Xv%08Xu

  • Cyrus <= 2.1.3: pop3_uidl_format = %u

  • Cyrus <= 2.1.4: pop3_uidl_format = %v.%u

  • Dovecot 0.99: pop3_uidl_format = %v.%u

  • [http://www.ex-parrot.com/~chris/tpop3d/ tpop3d]:

    • Maildir: pop3_uidl_format = %Mf (MD5 sum of the maildir base filename in hex)

    • mbox: MD5 sum in hex of first 512 bytes of the message (or of the full message if it's less than 512 bytes).
  • [http://www.openwall.com/popa3d/ popa3d] Generates MD5 sum from a couple of headers. Dovecot uses compatible MD5 sums internally, but converts them into UIDL strings in a bit different way.

None: Migration (last edited 2010-11-02 22:24:58 by TimoSirainen)