On Tue, 2003-05-06 at 16:50, Sebastian Pachuta wrote:
second, there is a problem when user exceed their quota
Yes, there's several problems. Biggest one is what to do if we can't update dovecot-uidlist file.
If we continued normally but without storing the UIDs permanently, then expunged some messages, logged out and logged in again, the UIDs are different from last time and that breaks client's cache.
If we just overwrote next-UID field in dovecot-uidlist we'd get new UIDs next time which is fine, except if client selects the mailbox multiple times it gets different UIDs for the messages. That probably breaks some clients (OE I think).
One kludgy solution is to overwrite next-UID field only when messages are expunged and then force all clients that have selected the mailbox to log out.
Overwriting next-UID isn't too safe either since readers don't do any kind of locking for the file, but I'd hope writing 1-10 bytes is usually atomic? Well, we could use fcntl() locking in out-of-diskspace conditions but I'm not sure if it's worth it..