Hi everyone, I have a question concerning UIDs. How persistant are they? I am thinking about building some form of webmail specialized for some specific business purpose and I am thinking of building a sort of cache in a DB by storing the email addr, date, subject and UID for quick lookups and search of correspondance. I am doing this because I am having issue with multiple people searching thru email folders that have 100k+ emails (which is another problem in itself, searches don't seem to scale well when folder goes above 60k emails). So to come back to my question, can I store the UIDs and reuse those UIDs later on to obtain the body of the email??? Or can the UIDs change on the server and they will not be valid anymore?. My setup is: - dovecot 1.x (will migrate to 2.x soon) - maildir - everything stored on an intel 320 SSD (index and maildir folder) Thanks, -JD
Quoting Jean-Daniel Beaubien <jd.beaubien at gmail.com>:> I have a question concerning UIDs. How persistant are they?[snip]> So to come back to my question, can I store the UIDs and reuse those UIDs > later on to obtain the body of the email??? Or can the UIDs change on the > server and they will not be valid anymore?.You really need to read RFC 3501 (http://tools.ietf.org/html/rfc3501), specifically section 2.3.1.1. Short answer: UIDs will almost always be persistent, but you always need to check UIDVALIDITY in the tiny chance that they may be invalidated. michael
On 25.1.2012, at 5.22, Jean-Daniel Beaubien wrote:> I have a question concerning UIDs. How persistant are they?With Dovecot persistent enough. But as Michael said, check UIDVALIDITY.> I am thinking about building some form of webmail specialized for some > specific business purpose and I am thinking of building a sort of cache in > a DB by storing the email addr, date, subject and UID for quick lookups and > search of correspondance.Dovecot should already have such cache. If there are problems with that, I think it would be better to fix it on Dovecot's side rather than adding a second cache.> I am doing this because I am having issue with multiple people searching > thru email folders that have 100k+ emails (which is another problem in > itself, searches don't seem to scale well when folder goes above 60k > emails).Maybe enable fts-solr or fts-lucene? (Both work much better in v2.1.)