We Fixed Quota Reporting. Then Dovecot 2.4 Happened.
Back in October I wrote about how we fixed Dovecot's quota reporting so it reflected real disk usage instead of imaginary numbers. If you missed it, the short version is that Dovecot was counting the declared size of messages rather than what they actually occupied on disk, and that caused some users to hit quota limits when they genuinely had space available. We fixed it. Felt good. Moved on.
Then Dovecot 2.4 came out.
Here's what you need to know about how we store your email. We compress it. That's not magic, it's just standard practice for running email hosting at a reasonable cost. Compression means that an email that takes up 2GB of declared space might only occupy 1GB on the actual disk. In Dovecot 2.3, we were able to configure quota to report based on real physical disk usage. So if your email was using 1GB on disk, that's what counted against your quota.
Dovecot 2.4 removed that ability.
In 2.4, quota is reported and enforced based on the uncompressed size. So that same email that physically occupies 1GB on disk gets reported as 2GB. Which means you could be sitting at half your quota in terms of real disk usage and Dovecot will tell you your mailbox is full. That is not a good user experience, and it's not accurate.
The servers currently running Dovecot 2.4 are: blizzard.mxrouting.net, chocobo.mxrouting.net, fusion.mxrouting.net, sunfire.mxrouting.net, taylor.mxrouting.net, and wednesday.mxrouting.net. The rest of the fleet will be there eventually.
I asked about this on the Dovecot mailing list. Nobody cared. That's not a dig, it's just the reality of open source software development. The people building it have priorities, and our specific use case is not at the top of that list.
The options I've identified are not great:
Stop compressing email. Let the larger size be the real size and the problem disappears. This benefits no one. Costs go up, and that eventually reaches you.
Report Dovecot's inflated numbers and enforce against them. This makes the numbers consistent, which matters more than people realize. If the quota system reports 2GB usage and Dovecot enforces at 2GB, at least you won't be surprised. But you're being held to a number that doesn't reflect reality, which means you're effectively getting less usable quota than you should.
Build a custom Dovecot quota driver that reports actual compressed disk usage. This is the right answer. It's also uninvestigated territory for me and not a quick fix.
What I'm not willing to do is end up in a situation where our quota system reports one number and Dovecot enforces a different one. That's what I fixed in October and I'm not going back to it.
Right now we're working through how to handle this in a way that's fair to you and honest about what's happening. We're not there yet.