<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Christian Schenk&#187; lbdb</title>
	<atom:link href="http://www.christianschenk.org/blog/tag/lbdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christianschenk.org</link>
	<description>Writing about my experiences with technology and all different kinds of projects and experiments</description>
	<lastBuildDate>Sun, 29 Aug 2010 09:08:16 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Integrating LDAP into Mutt</title>
		<link>http://www.christianschenk.org/blog/integrating-ldap-into-mutt/</link>
		<comments>http://www.christianschenk.org/blog/integrating-ldap-into-mutt/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 12:33:43 +0000</pubDate>
		<dc:creator>Christian Schenk</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[lbdb]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mutt]]></category>

		<guid isPermaLink="false">http://www.christianschenk.org/blog/integrating-ldap-into-mutt/</guid>
		<description><![CDATA[How to integrate email addresses from LDAP into mutt]]></description>
			<content:encoded><![CDATA[<p>If <a title="The Mutt E-Mail Client" href="http://www.mutt.org/">Mutt</a> is your favorite email client and you ever wondered how to integrate email address from <abbr title="Lightweight Directory Access Protocol">LDAP</abbr>, this post shows you how to do this.</p>
<p><span id="more-45"></span></p>
<h2>Setup</h2>
<p>Install <code>lbdb</code> and <code>libnet-ldap-perl</code>:</p>
<pre class="code">
aptitude install lbdb libnet-ldap-perl
</pre>
<p>Once you&#8217;ve done that, copy the <a title="The Little Brother's Database" href="http://www.spinnaker.de/lbdb/">lbdb</a> configuration files into your home directory:</p>
<pre class="code">
mkdir .lbdb
cp /etc/lbdb.rc .lbdb/rc
cp /etc/lbdb_ldap.rc .lbdb/ldap.rc
</pre>
<p>Add your LDAP server to the <code>.lbdb/ldap.rc</code>, e.g.:</p>
<pre class="code">
%ldap_server_db = (
  'christianschenk' => ['localhost',
            'cn=users,dc=christianschenk,dc=org',
            'givenname sn cn mail', 'givenname cn sn mail o',
            '${mail}', '${givenname} ${sn}', '${o}' ]
);
</pre>
<p>Then add <code>m_ldap</code> to the line saying <code>METHODS</code> in <code>.lbdb/rc</code> and enable your LDAP server by adding it to the <code>LDAP_NICKS</code> like so:</p>
<pre class="code">
LDAP_NICKS="christianschenk"
</pre>
<p>You can test your setup with the <code>lbdbq</code> command: simply call it with a string you&#8217;re searching for. Once it works for you like expected, add this line to your <code>.muttrc</code>:</p>
<pre class="code">
set query_command="lbdbq '%s'"
</pre>
<p>Mutt will use this to send queries to <code>lbdb</code>.</p>
<h2>Usage</h2>
<p>If Mutt asks you for the email address simply enter some string and hit <code>CTRL+t</code> or <code>TAB</code>: this will auto-complete the address for you. That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianschenk.org/blog/integrating-ldap-into-mutt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
