Mutt allows you to add a hook for an external address
lookup program. A common one is LDAP, and this simple
script does the lookup for you. Once this is setup, you
can enter part of a person's first or last name, hit
^T and the LDAP search will be performed.
Just add the following line to your
.muttrc, changing the name of
the script to whatever you save it as:
set query_command = "~/bin/mutt_ldap.pl '%s'"
You'll have to set the proper information for the constants
HOST and BASE and, if your
LDAP server doesn't allow anonymous binds, also pass
the full DN mapping to your user record and password
to the bind() method. Also, if you
have a nonstandard schema you'll have to modify the
LDAP property names.