seen database format

Etienne Goyer etienne.goyer at
Wed Nov 26 10:13:50 EST 2003

On Tue, Nov 25, 2003 at 05:17:12PM -0500, Michael F. Sprague wrote:
> The problem is that many of the users had 'leave mail on server' checked in
> their POP client.  When I check mail to the Cyrus server, it uploads all of
> the messages in their INBOX that they have already seen.

We had exactly the same experience when migrating from qpopper -> Cyrus
about a month ago.  There is nothing you can do about it.  Here's why.

The Seen state have nothing to do with Cyrus pop3d.  It just present all
the mail in INBOX.

Your mail client "remember" the old UIDL presented by popper (maybe by
reading X-UIDL header in already downloaded mail, or by keeping track of
them out-of-band).  Cyrus does not use the UIDL as stored in the X-UIDL
header; the UIDL is the UIDVALIDITY of the user's INBOX followed by a
dot, followed by the message's UID.  You can see for yourself by
telneting your POP3 server and sending the UIDL command.

As such, it will never be what your clients expect them from when you
where using popper. All the messages will be downloaded again, but
should not anymore from there on.  Maybe you would need to strip the
X-UIDL header from message for some client; if it is your case, I know
somebody who have a script for doing it.  From there on, I suggest your
client delete the old copy from their mail client and keep the one sent
by Cyrus.

The code that generate the UIDL for message in Cyrus is quite simple,
and could be changed easily I suppose.  However, retrieving the UIDL
from the X-UIDL header would be a *massive* performance hit; each 
message would have to be opened and the X-UIDL header looked up.  I 
guess it would be any worse from what popper was doing, but still a big 
Ouch ...

BTW, POP3 "leave mail on server" is really a kludge.  If at all
possible, I suggest you migrate your user to IMAP as it offer the same
functionnality (and then some) and work much better overall.

Also, there is a bug with Oulook 2002 and the "leave mail on server"
feature.  Outlook 2002 get very confused about having UIDL of varying
length.  A client of mine have this problem, and MS support refuse to
aknowledge it at this time (obvioulsy, they blame Cyrus for that, 
althought Cyrus is perfectly RFC-compliant on the subject).  So, if some 
of your client use this version of Outlook, your only option is to 
migrate them to IMAP as Outlook 2002 will *not* work with Cyrus for 
"leave mail on server" at all.

Good luck with your migration ... some thing can only be learned by
(painful) experience !

Etienne Goyer                    Linux Québec Technologies Inc.       etienne.goyer at

More information about the Info-cyrus mailing list