There's a basic problem combining Lion's Mail with GMail: if you need to keep the web interface working in a sensible manner and you use the server-side filtering and labels, then you're kind of screwed.

Either you go with the defaults Mail sets up and you lose access to everything that isn't in your inbox, or you remove the IMAP prefix setting and you get doubles of everything.

There is a way around it, but it's probably not a great idea for the non-tech people out there. You need to use offlineimap and an IMAP server on your local machine.

I use Homebrew for random open sauce applications. If you want to treat this post as a recipe, I suggest installing that. It's dead easy, just make sure you have Xcode installed, then run the one-liner they provide in their install instructions.

To install offlineimap, run (as yourself) "brew install offlineimap". I'm using Dovecot as my IMAP server, to install that run "brew install dovecot".

You next need to configure Dovecot. Go into /usr/local/etc, copy dovecot-example.conf to dovecot.conf. I changed "protocols" to "imap", "ssl" to "no", "login_user" to "_dovecot" (as this already exists), and "mail_location" to "milder:~/Maildir".

Then go into /etc/pam.d and copy "login" to "dovecot" so Dovecot can authenticate you.

Finally, do the last two steps (3 and 4) you get from "brew info dovecot" to set up and enable the IMAP service.

At this point I suggest configuring Mail to talk to your local server. Give it your GMail address and your local password, it should fail to connect to GMail (you do use different passwords, yes?), just keep on going through with it failing and it will eventually give you a dialog where you can set the username to your local username and the host to "localhost". It should then connect and find nothing.

You can confirm it connected by looking in ~/Maildir, you should now see the usual stuff you'd find in an empty maildir, e.g., "cur", "new", and "tmp" directories.

If you haven't got this much working, you need to debug it and figure out why not before going any further!

Now you want to get offlineimap to suck mail from GMail and stick it in your local IMAP folders. Drop something not entirely unlike this in ~/.offlineimaprc:


[general]
accounts = GMail
ui = Noninteractive.Quiet

[Account GMail]
localrepository = LocalImap
remoterepository = Remote
autorefresh = 10
quick = 5

[Repository LocalImap]
type = IMAP
remotehost = localhost
remoteuser = me
remotepass = password
maxconnections = 2
ssl = no

[Repository Remote]
type = IMAP
ssl = yes
remotehost = imap.gmail.com
remoteuser = me@gmail.com
remotepass = gmailpassword
holdconnectionopen = yes
maxconections = 1

# pick one of the below:
# (for a single server)
nametrans = lambda foldername: re.sub('^INBOX', 'INBOX', foldername)
folderfilter = lambda foldername: not re.search('(^\[Google Mail\])', foldername)


Then do a first run to sync it all and make sure everything's happy by running "offlineimap -u TTY.TTYUI". This may well take a very long time if you've got a fair bit of mail. That's okay, just let it run and you'll be fine.

Once it finishes syncing for the first time, follow the instructions Homebrew gave you when it finished installing offlineimap to create a launchd item. This will make sure offlineimap starts up every time you log in.

One small quirk I noticed is that offlineimap gets the timestamps on some of the maildir files wrong and Mail uses that rather than the header contents to get the received date. You can work around this after Mail does its first sync by quitting Mail, then deleting the files "Envelope Index*" in ~/Library/Mail/V2/MailData. Restart Mail, it'll think it has to import your mailbox, which just makes it reindex the cache, and then you're golden!

Lion

Jul. 25th, 2011 06:34 pm
I've been running Lion on my 2010 Macbook Pro since release day. Yeah, I'm a sucker for the new shiny. I know.

Anyway. There are plenty of good reviews online. I recommend the ArsTechnica review as it's every bit as thorough as their full OS reviews usually are.

The install was of course very easy. The App Store placed an installer in the Dock, I went in to the package and snarfed the disk image before starting, then ran it. It did its thing, and a while later I had a Lion system up and running.

I did however make one big mistake: I fired off the full-disk encryption on the boot volume, then started deleting lots of stuff in an effort to clean up cruft. This seems to have confused matters in some way, as I wound up with it insisting there was only 80GB free no matter how much stuff I deleted. Rebooting into the shiny new recovery partition and letting it do a filesystem repair (there were some errors) seemed to fix things, but then it was back to the same once I rebooted into the OS again.

So, as I have Time Machine backing everything up, and wanted to reclaim the space I'd allocated to Boot Camp anyway, I decided to do a clean install.

Trying to do this from the recovery partition was a non-starter as Disk Utility can't repartition the disk it's booted from. But it can burn an image to DVD, so I did that and booted from the DVD instead. That worked Just Fine and I got a nice clean Lion install.

The Migration Assistant noticed the Time Machine disk and kindly offered to restore from it. I opted to let it restore settings and my home directory but not applications, and that worked Just Fine as well.

However. Trying to restore applications piecemeal from Time Machine didn't go as smoothly. The disk names were different (I renamed the boot volume while I was at it) so the browser wouldn't show the old content. Easy enough to work around by poking through the backup volume with Finder and copying what I wanted out of there.

Compatibility with my apps has so far been great, but I don't have any really old legacy PPC applications I care about. I'd expected VMware Fusion to give trouble, but it didn't. Can't recall if I'd installed an update any time in the last six months…

Spaces is no longer a sort of second-class afterthought kind of deal, it's a key part of the workflow enabling the full screen apps and providing access to the widgets. So I've embraced that -- where I used to ignore it in favour of just using Expose and a single desktop -- by running VMware full-screen in one desktop, Chrome with just my GMail account full-screen in another. Control-left/right to flip between these is very convenient, though Spaces is still weirdly inconsistent when returning to a space with a pile of windows. It really needs to get a clue about this: if you switch back with control-whatsit then you should go back to exactly the state it was in last time, if you go back by alt-tabbing to an app in that space, then that app should have foreground.

Full-disk encryption is neat. My primary machine is a laptop which I use as a desktop most of the time -- external display, keyboard, mouse -- but hey, might as well. The GUI understands the need to unlock volumes when accessed for the first time pretty much everywhere it matters, so I've got my Time Machine and scratch volumes encrypted too.

Autocorrect in text edit widgets is nice but taking a little getting used-to.

I notice that Crossover Games isn't too happy with Lion. Not a huge loss, I don't use it much anyway.

The Emacs build I had from Snow Leopard was fine, but when I wiped-and-reinstalled of course I needed to redo that. I use homebrew for my OS X open sauce packaging. The recipe there needed a few tweaks (compiler and linker options, it wants -fno-pie for both) to make it build, but 23.3 doesn't like Lion -- you get no titllebar and an inconveniently-located window.

Building from HEAD fixes that. Some nice new tweaks in Gnus too, which is cool.

Hm. What else? Lots of tweaks, iTunes is 64-bit and a Cocoa re-write. Chrome was a bit crash-y at first but seems to have settled down (touch wood), it may have done a silent upgrade in the last day or so. I'm using Safari as my primary browser for a while, just to see how it goes -- and because I suspect that once iOS 5 drops I'll want to use the Reading List function a lot. So far so good on that score too.

Switched to iChat as primary IM client for now. My main problem with previous versions was the "one 'buddy list' per service" model and they've fixed that now. I have a shiny new webcam so I may as well use a client that'll work with it.

The new Mail looks awesome but GMail is a crappy IMAP service so I'm not using it right now. Once iCloud drops I'll be giving that a serious look and maybe trialling it for my mail/calendar needs -- Apple has plenty of flaws, but it does at least have a customer service department, unlike Google. And I'm seriously thinking about moving back to the iPhone when the next version hits, depending on a bunch of things. But more on that can of worms later in some other post, eh?

Anyway. Lion, pretty good.
My conclusion after a month of traveling, plus a couple of weeks at home, is that the iPad makes for a fine e-reader, better suited to my specific needs -- particularly around lighting -- than the Kindle or any of the other e-ink readers I've used.

I don't much like that there's still no single consistent standard for e-books and e-book DRM, but at least using the iPad I can get at content provided by pretty much any of the stores even if it does mean remembering which store sold which book.

Of the e-book readers available on the platform, my preference is for the Kindle app. I know iBooks is prettier, but it again comes down to my specific needs: the Kindle app works in landscape without going to a dual-page view, and I find it easier to hold the iPad in two hands in landscape.

The iPad also makes for a really neat email device. I've been using it for work email when I'm at home (I only have the WiFi model) and while there are some things for which I still need to do the VPN+RDC dance (Nagios goes batshit, need to do a massive batch-delete) it is in general more than sufficient for keeping an eye on things and responding to short queries.

My Android phone -- a HTC Desire -- chewed through battery running CyanogenMod 6.0 at an unreasonable rate, such that on some days it came close to running out and generally wound up with under 50% left almost every day. I had assumed this was because AT&T sucks and it was having to work the radio harder, but it's been just as bad since getting home.

So I've "downgraded" back to the stock 2.1 plus Sense and will see how that goes. My one big gripe with this remains: the PIN-unlock screen uses whatever keyboard you have set as default for text entry, which is really not very efficient for entering a numeric PIN. Here's hoping they fixed that in the 2.2 update due to roll out soon.

On the bright side having Clockwork Recovery installed means I can screw around with firmware with impunity, always knowing I can roll back at any time.

Civilization V runs acceptably under Parallels 6 on the top-end Macbook Pro. I've only poked at the demo from Steam running under XP SP3, and at that not for more than about half an hour, but not only does it run, it seems to run okay. But Parallels eats the system horribly so I won't be doing that. I shall instead wait for the inevitable Mac port some time in 2012.
Having had the iPad for a couple of weeks, I'm finding it makes for a reasonable ereader. It's a bit heavy, so to use it comfortably I need to sit back, put a cushion on my lap, and then place the iPad on the cushion in the "landscape" position. But it allows me to read under almost any lighting circumstance, which is a big improvement over the Kindle.

Bought a Macbook Pro this weekend. Initial impression -- having not touched an Apple laptop since the Powerbook G4 -- is pretty good, very nicely designed/built bit of kit, though they really should've smoothed the front edge a little for comfort's sake.

I hadn't expected to find the trackpad particularly usable. It's a last-resort option on my old Dell. But the larger area plus the multitouch makes it genuinely useful. And using a laptop with the full OS X accessibility thing is a delight compared to doing the rough equivalent on Windows.

So I'm pretty happy with it so far. Haven't bothered trying to game -- I'm pretty sure I'll be wanting an external display/keyboard/mouse for that -- but for the general productivitiy/webby stuff it works remarkably well for me.

My one small gripe is that I can't move my data over from the Dell via wireless where I'm staying, as it's just too slow and flaky. Shall see about snarfing a short bit of cat5 from the office on Tuesday.

Profile

Abort, Rephrase, Ignore?

October 2011

S M T W T F S
       1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags