UIDs and seen database format
Ted Cabeen
secabeen at pobox.com
Wed Nov 26 15:37:58 EST 2003
"Michael F. Sprague" <mfs at sanellc.net> writes:
> Hi folks,
>
> I got a response to my question yesterday RE POP UIDs and it was confirmed
> that the way Cyrus generates UIDs is different than the way the old POP
> daemon does. I imagine it is possible to modify the cyrus source to generate
> UIDs the same way the other daemon does.
>
> The old POP daemon is running on Tru64 and seems to be an implementation of
> Qualcomm's qpopper. The generated UID seems to look like this:
>
> 3afd3cf6e70c597d217195d42b973ee
>
> Whereas cyrus generates a UID based on the timestamp and message number:
>
> 106979841.1
>
> Anyone on this list know how qpopper generates its UID and/or of any code
> snippets to get cyrus to generate it the same way? I suspect this is possible
> b/ we had to do something similar for cucipop at an ISP I worked at in the
> late 1990's.
There are two ways that qpopper can generate UIDs, depending on how
you have it configured. They're both hashes of the body and a few
header fields. Depending on how you have it configured, there may
also be a random string added to the hash input. If you have it
configured to add the random hash, then the UID is generated once when
the message is first downloaded, and then stored in the message in the
X-UIDL header. If you don't want every downloaded message to have to
edited to add the X-UIDL header, you can tell qpopper to generate the
UID without the random input part and it will re-generate the UID
off of the message data every time.
The best place to find the details is in the qpopper source. The
file popper/pop_uidl.c has all of the gory details.
> Another option for me is to force all users to use IMAP (which would be nice).
> The problem here is that the first time a user connects ALL of the messages
> will be marked as 'unread'. I think I can get around this by modifying
> the seen flat file as I import the messages, but I cannot find documentation
> of the format of this file anywhere. Do I have to read through the source or
> can someone point me to a document or post on this topic?
If you have qpopper setup to add Status headers to the messages on the
server, there is a patch to reconstruct floating around that will use
the Status: header in the message to set the seen data and the like
during the reconstruct. Check the list archives, as I think it was
posted recently and should make it into the next stable release.
--
Ted Cabeen http://www.pobox.com/~secabeen ted at impulse.net
Check Website or Keyserver for PGP/GPG Key BA0349D2 secabeen at pobox.com
"I have taken all knowledge to be my province." -F. Bacon secabeen at cabeen.org
"Human kind cannot bear very much reality."-T.S.Eliot cabeen at netcom.com
More information about the Info-cyrus
mailing list