[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mutt is the bomb! (LDAP addressbook integration)



So, today I have made a neat little discovery.

A while back I finally got tired of using mutt on two different machines
and thunderbird/icedove on three different machines and trying to keep
all the addressbooks synchronized.  I took the plunge and setup an LDAP
addressbook.  This was fairly easy since I setup LDAP for user accounts
last year and so adding an addressbook was a cinch.

So now I have one address book and all is more or less acceptable.
Excpet that I have taken to using directoryassistant so that I can get
to my LDAP addressbook while I use mutt.  I finally got tired of that
too, since that is hard to do over a very slow link (some places to
which I travel only have dialup access) or when X forwarding isn't
possible.  Additionally, manual integration is definitely old-style. So
I searched on Google for "mutt ldap addressbook" and found among the
first page of links these:

http://linsec.ca/Using_OpenLDAP_as_an_Address_Book
http://www.macosxhints.com/article.php?story=20041024163030501

The first walks you through, step by step, how to setup so that you can
query your LDAP addressbook from within mutt.  I did a teeny bit of
minor tweaking to suit my preferences.

However, I was still left wanting since I could not figure out how query
two (or more) completely different strings.  I finally looked at some of
the options and noticed that once you entered a query (using Q) and
received results, you could append (using A) additional results to the
same query.  Cool.  Now, how do you address a message to more than one
recipient?  That is where I experimented and found that mutt's tagging
feature works quite nicely.  You tag the recipients you want (using t,
or T if you want to tag based on a pattern) and then hit the semicolon
followed by 'm', and then bam!  You are now addressing your message to
multiple recipients.

I then thought to myself, "what about if I want some people in the To
line and some others in the Cc line?"  I was stumped.  Nothing I tried
got me to where I could tell it to put some in the To line and others in
the Cc line.  Oh well.  So, I started to read the next link (the
macosxhints link above) to see if there were any other gems I had
missed.  That was when I discovered this paragraph, near the end:

  Thats it! Restart mutt. Now to use it, simply start addressing a new
  message, type a few characters of the name. Then type Control-T, and
  lbdb will query your mutt aliases file and your Mac OSX Address Book,
  looking for an approriate entry. Select an entry and continue with
  your message composition. 

I wasn't using the Max OS X addressbook, but I was interested in this
Control-T combination.  So, I tried it.  I typed m to start a new
message.  I typed a few letters and hit Control-T and bam!  I had some
results from my LDAP address book.  I picked a recipient.  I typed a few
more letters and hit Control-T again and bam!  I had different results.
I picked the next recipient.  Then I hit enter to get the Cc line (I
always have mutt ask me for Cc).  I typed some letters and hit Control-T
and (well, you get the idea).  Now I could easily address a message to
some people in the To line and others in the Cc line, all while drawing
addresses from my LDAP addressbook.

Of course, this wasn't enough for me.  I though that it would be nice to
be able to select recipients *after* typing the message.  If you use the
Q query approach, you can't do this.  You can only choose recipients for
the To line and you must choose prior to starting the message
composition.  However, with the Control-T approach, you can add or
change recipients in the To, Cc and Bcc lines after you have finished
composing, before you send.

I have rambled on a fair bit now, but I just wanted to share my renewed
admiration for mutt and its extensibility.  Hopefully someone will find
this helpful.

Regards,

-Roberto
-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature


Reply to: