Mail.app and 32-bit signed integers

Mail.app does not like it when a mail server reports the NEXTUID to be greater than 2^31 (which is the limit for signed 32-bit integers). I could end this post here, but it’s worth explaining how I got here, and how I fixed it… just incase.

A few weeks back, a faculty member hit quota for his email. This isn’t unheard of, but for some reason, this faculty member hit quota in such a way as to cause Dovecot (the central mail server’s mail service) to rapidly increase the UIDs for his email. I’m guessing something like the following happened.

  1. User is near quota, and receives message
  2. Dovecot writes out message to Inbox, but lazily updates dovecot-uidlist
  3. Delivery of message causes quota full
  4. Dovecot goes to update uidlist, but can’t since the quota is full. Which causes a race condition where it tries repeatedly to write it out, and in the process, increasing the base UID each time
  5. After this repeats a few thousand times, the user gets below quota again, and we end up with a NEXTUID of 3829200751 (yes, 3.8 Billion).

Now, there are two things you can think about this. One, is “this is a dovecot problem”. Well, yes, but… they’ve warned users not to store the uidlist files on quota enforced volumes:

Dovecot can’t currently handle not being able to write the control files, so it will cause problems with filesystem quota. To avoid problems with this, you should place control files into a partition where quota isn’t checked.1

[Read more...]

  1. http://wiki2.dovecot.org/MailLocation/Maildir []

Return of website optimization

UPDATE (10/27/2011): As of today, I’m scoring a 99/100 on PageSpeed (missing point is an erroneous error about images being unoptimized), and a 99/100 on YSlow (missing point is about Cloudflare setting cookies on static content, which isn’t a huge issue). So at this point, I can finally say “USE CLOUDFLARE”. It’s more than worth it (which, since it’s free….).


So in a fit of boredom last night, I decided to take a look at page speed increases again.

This time is a bit different as I’m not using Cloudflare and I’ve changed themes. Since moving to the new theme, and an update to W3TC, I’d been getting in the mid-80′s for both Page Speed, and YSlow. Which shouldn’t be the case with Cloudflare. Everything says it should have greatly improved my speeds, and score… so something was clearly up.

So, some testing later, and I’ve figured out what was up. First, was disabling the automatic settings in W3TC. I’m guessing this (automatic minify) would work if you weren’t using a WP_CONTENT_URL (which I guess I probably don’t need anymore with Cloudflare… but changing to not use it would take a bit of work at this point.). The point of the WP_CONTENT_URL, however, is to “parallelize” the browser download process… so Cloudflare probably doesn’t solve this issue.

Anyway, disabling it, then going into W3TC’s minify section and adding all the URLs for your CSS and JS files that are loaded on your home page. Also, I went into my thematic child theme’s style.css, and removed all the @import’s, and added those CSS files to the minify settings. Reordering the CSS and JS was then a trial and error, but got it working.

Now, page loads are damn fast. And YSlow gives me 99/100, and Page Speed gives me a 97. Cloudflare gives me the CDN points, so the only thing hurting my YSlow score is Google Analytics not having long distance expiration.

Optimization takes time, but it works. I’m not positive why Page Speed is knocking off the 6 points, but I think it’s some CSS inefficiencies. *shrugs*

Good luck, and feel free to ask if you run into any issues. Might just redirect you to somewhere else, but it’s working.

Inbox Zero

Time was that mail management for me, was a nightmare. My inbox was between 1-2k messages, and while I sorted my mailing list traffic, everything else that came into my inbox was read, and then left there. It was a losing battle, and everyone else I’ve seen at work does the same thing. There are faculty at work that have 10k+ messages in their inbox, and at least 1k of those are unread. How on earth do they function? Answer: They largely don’t. They miss emails from students, colleagues, etc.

So, a few years back, I picked up an EXCELLENT book called Time Management for System Administrators (review). While the whole book is great, and I’ve changed a lot of how I work from this book, one of the biggest changes has been my email management. And all it took was one day.

After a friend made a comment about switching to “Inbox Zero“, I decided to bite the bullet and do it. So, I took everything in my inbox, and threw it in another IMAP folder (which I came back to a month or two later to sort/delete). My inbox was then completely empty. Then, each time I checked my email, and had something new, I either acted on it and filed it, filed it, or deleted it (I delete very little email unless it’s advertisements). Now email isn’t a “to do” list. You shouldn’t just leave stuff in your inbox to remind you to do things long term, as that will cause “Inbox Zero” to fail (if your list gets too long). But, I don’t think there’s any harm in leaving short term “reminders” in your inbox.

I made the switch to “Inbox Zero” over 4 years ago. In that time, I’ve missed less than half a dozen emails (realistically, I think it’s been 3, or less than 1 per year). Every day, I try to leave my inbox at 10 items or less. Often many of the emails in my inbox are emails I send to myself with interesting links I’ve found on my iPhone/iPad, which I then file after looking at them again in detail. Most people look at the idea and just shrug it off as too much work, or daunting. It really isn’t, and just takes that initial “I’m going to do this” to start them on the path. I know it sounds like some type of religious conversion, and in some ways it is. It’ll change how you look at email. Email will go from “Oh god, look at all this” to “one at a time, there’s only 10 of them”.

Give it a try. I guarantee1 you won’t regret it. I haven’t looked back in more than 4 years, and I often give my friend snarky comments when he brags about how he’s down to 20-25 emails (which, for him as middle management at a major corporation, is damn impressive) about how I’m at 2 or 3 emails. =)

  1. As much as my guarantee is actually worth []