Archive for March, 2007

Thunderbird IMAP Setup

Friday, March 30th, 2007

This was more of a pain than I expected. My difficulties were in order to ensure that different clients have the same view of the mailboxen. But isn’t that the point of IMAP …. whatever.

  • First, do the basic setup for IMAP, knowing your server name, etc. This is widely documented.
  • You can specify that Sent messages go to one of the IMAP’d folders in the TBird gui, but no so for Trash. For this you need to find the Config Editor (Edit/Preferences/Advanced/General Tab/Config Editor), and then add:
    mail.server.default.trash_folder_name = Deleted Items
  • And then I had the problem that TBird “moves” looked like “copies” in Outlook. This is because TBird by default doesn’t purge from any folder. (Apparently, “delete” in IMAP is just a flag which different clients treat differently. Sigh. So I added this add-on: https://addons.mozilla.org/en-US/thunderbird/addon/1792 — being careful to actually drag the new button up to the button line. I now need to click “Purge” on TBird and hit “Send/Recv” on Outlook to ensure sync. Ah me.

And one non-IMAP setting (but important) — create/modify .thunderbird/ /user.js to include:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

Installing subversion python bindings

Tuesday, March 13th, 2007

This ended up being a hassle, for two reasons: 1) out of date build instructions in the subversion source, 2) their instructions may not work if you have multiple subversion installations. I learned a teensy bit of python troubleshooting along the way so jotting this down ….

First, building subversion:

./configure --with-apxs=/usr/sbin/apxs   # to build apache mods
            --with-swig                  

Note: in step 2 of subversion-1.4.3/subversion/bindings/swig/INSTALL, I got misled thinking the libsvn_swig_py.so should be there at this step. It shouldn’t. In fact, it won’t be even after step 3, but step 3 does build a similarly named file.

From here out the build was as advertised:


make swig-py
make check-swig-py
make install-swig-py   # switched to root for this step

Second, the install. The problem I had was that I had two versions of subversion installed (on purpose, for compatibility with an old repository on the same server). Unfortunately I was picking up the wrong version of the subversion bindings.

This is what subversion says to do, seems reasonable enough:

$ echo /usr/local/lib/svn-python 
> /usr/lib/python2.x/site-packages/subversion.pth

But…when python parses .pth files, it places them at the end of sys.path, rather than the position of the directory containing the .pth file. So even though I set PYTHONPATH=/usr/lib/python2.4/site-packages, sys.path ended up with that directory at the head, and /usr/local/lib/svn-python at the tail. Aaargh.

Sounds easy, but it took me a while to figure this all out. I learned:

  • python looks for modules in sys.path()
  • module.__path__ tells the provenance of the module; very handy
  • you really want tab-completion