1410065408S

Do you deliver your mail with maildrop? If not, this post is only for your "amusement".

My mailserver runs Postfix as MTA and maildrop as MDA, a pretty common setup I'd say. And it happens that maildrop supports quota. It supports it so good, that I have no idea how to disable that support, but I also actually never cared, as my user database declares each user has 10GB quota for mails (courier's authtest says "Quota: 10000000000S", so does the configuration). And 10GB should be enough for everybody, right?

Well, so I thought until I noticed that my Icedove indicated a 99% full mailbox and shortly afterwards maildrop stopped delivering mails with "maildir over quota". Looking at the maildirsize file in my maildir, I noticed that the quota is set to 1410065408S, a mere 1.4GB. Where does this number come from? The proficient reader will quickly see that 10000000000 mod 2^32 = 1410065408, so this is actually an integer overflow happening somewhere in the code handling the maildirsize file (read: in maildrop). A short dig through the Debian BTS revealed a bug from 2003, saying exactly the same. The bug also indicated, the issue is fixed since maildrop 2.5. A short cowbuilder run later, I had a maildrop_2.5.5-2_i386.deb, installed it and after the next mail delivery, my quota was at 10GB as it should.

TL;DR: If you run into strange "maildir over quota" errors with maildrop on Debian Squeeze, get a newer maildrop (or backport that single patch to Squeeze's maildrop).

Comments