<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: ldap</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/ldap/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Howto | Add ActiveDirectory Addressbook to Sylpheed Email</title>
      <link>https://chrisjrob.com/2015/11/19/add-activedirectory-addressbook-to-sylpheed-email/</link>
      <pubDate>Thu, 19 Nov 2015 21:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2015/11/19/add-activedirectory-addressbook-to-sylpheed-email</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/sylpheed.png" align="right" alt="Featured Image">
         
         <p>Where we require a lightweight mail client, we tend to use <a href="http://sylpheed.sraoss.jp/en/">Sylpheed</a> (from which Claws Mail was later forked).</p>

<p>It seems unlikely that you would be able to add an ActiveDirectory Address Book into such a lightweight email client, and indeed the <a href="http://sylpheed.sraoss.jp/doc/manual/en/sylpheed-12.html">manual</a> states:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>### FIXME: write this part.
</code></pre></div></div>

<p>But in fact it was trivially easy:</p>

<!--more-->

<h2 id="caveat">Caveat</h2>

<p>Whilst these instructions worked for us, do be aware that we are using Samba4 ActiveDirectory. 
In theory this is a drop-in replacement for Windows ActiveDirectory and these instructions <em>should</em> work unchanged.</p>

<h2 id="add-ldap-addressbook">Add LDAP Addressbook</h2>

<p>Firstly run Sylpheed and go to Tools and Addressbook. 
Within the Sylpheed Addressbook go to File New LDAP Server
You should now see a screen like this:</p>

<p><img src="/assets/sylpheed-ldap-1.png" alt="Sylpheed LDAP Basic Settings" /></p>

<p>Having entered the Name, Hostname and Port you are able to “Check Server”, to ensure connectivity.
Next either enter your Search Base, or click on the &amp;ellipsis; button to select from the detected Search Bases.</p>

<table>
  <thead>
    <tr>
      <th>Item</th>
      <th>Explanation</th>
      <th>Example</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Name</td>
      <td>Addressbook or server name</td>
      <td>example</td>
    </tr>
    <tr>
      <td>Hostname</td>
      <td>ActiveDirectory Host Name</td>
      <td>ads.example.lan</td>
    </tr>
    <tr>
      <td>Port</td>
      <td>LDAP Port Number*</td>
      <td>389 or 636</td>
    </tr>
    <tr>
      <td>Search Base</td>
      <td>Your AD domain in LDAP form</td>
      <td>DC=example,DC=lan</td>
    </tr>
  </tbody>
</table>

<p>*You should probably choose 636 when connecting via a public network, and you may need to open ports on your router.</p>

<p>Now select the Extended tab and you should see the following screen:</p>

<p><img src="/assets/sylpheed-ldap-2.png" alt="Sylpheed LDAP Extended Settings" /></p>

<table>
  <thead>
    <tr>
      <th>Item</th>
      <th>Explanation</th>
      <th>Example</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Search Criteria</td>
      <td>This simple example worked for us</td>
      <td>(objectclass=*)</td>
    </tr>
    <tr>
      <td>Bind DN</td>
      <td>Your ActiveDirectory username</td>
      <td>chris@example.lan</td>
    </tr>
    <tr>
      <td>Bind Password</td>
      <td>Your ActiveDirectory password</td>
      <td>-</td>
    </tr>
  </tbody>
</table>

<p>Now click on OK to finish.</p>

<h2 id="test">Test</h2>

<p>You should now have a Search field available, enter a colleague’s first name and Search and you should be faced with their email addresses.</p>

<h2 id="conclusion">Conclusion</h2>

<p>As far as I can tell the addressbook lookup is not automatic and you have to click on the addressbook icon in the Compose Window and search for the person, in order to add them to the To: field. A bit clunky perhaps, but arguably not so very different from the need in Outlook to press Check Names to look up new addresses. 
Needless to say - once the address is in the recent address list, it is auto-completed in the future.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>iredmail Open Source Mailserver</title>
      <link>https://chrisjrob.com/2013/11/27/iredmail-open-source-mailserver/</link>
      <pubDate>Wed, 27 Nov 2013 00:00:00 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2013/11/27/iredmail-open-source-mailserver</guid>
      <description>
       <![CDATA[
         
           <img src="https://chrisjrob.com/assets/dashboard_300.png" align="right" alt="Featured Image">
         
         <p>Whilst the world seems to be moving email to “The Cloud”, rightly or
wrongly I remain reluctant to give up the control of our own mailserver.
For over ten years now we have been using a combination of the following
open source applications:</p>

<ul>
  <li>Postfix MTA with Amavis + Spamassassin</li>
  <li>Dovecot IMAP server</li>
  <li>OpenLDAP</li>
</ul>

<!--more-->

<p>Whilst these are super-stable and bulletproof solutions, the main issue
with such a solution is the administration - setting up users, changing
passwords, vacation notifications, sieve etc. It is also a lonely
business administering a custom mailserver, where set-up is never going
to be completely standard.</p>

<p>A couple of years ago I migrated to a new mailserver, on which I
installed <a href="http://iredmail.org/" title="iRedMail">iRedMail</a>. iRedMail is a
pre-packaged mailserver solution, based on all the software that I was
using already (Postfix, Dovecot, OpenLDAP), but with the benefit of a
slick admin panel that pulls it all together and provides ongoing
support. It also incorporates Roundcube for webmail, undoubtedly
prettier than Squirrelmail, which we were using before. iRedMail even
includes a pre-configure Fail2ban, essential to protect your
internet-facing server from attack.</p>

<p><img src="/assets/dashboard.png" alt="The iRedmail Dashboard" /></p>

<p>There are two web administration panels to choose from - the free and
open source panel and the Pro panel. Both interfaces are attractive and
functional, but predictably the Pro panel has more functionality <a href="http://iredmail.org/pricing.html" title="iRedMail pricing">at a
price</a>. Some would
call this Crippleware, but bear in mind that the server itself has full
functionality - this is merely the configuration of that server. If you
are happy to configure LDAP yourself, then you don’t strictly need to
use the Pro panel. See <em>“Features and Comparison”</em> half way down <a href="http://iredmail.org/admin_panel.html" title="Features of iRedAdmin">this
page</a>. Whilst
the Pro panel does come with the source code, the developer explicitly
restricts your right to distribute.</p>

<p>Installation is very fast - but must be on a fresh server - I tried to
upgrade from an existing Postfix install and it ended badly. Updates are
delivered as a web page of instructions, which I have come to prefer to
running an upgrade script, as you can intelligently decide whether you
are happy with each change proposed. The downside is that you could
easily miss a step and leave your server only partially “upgraded”.</p>

<p>Whilst the forums are quiet, the developer is very responsive to posts
and has dealt efficiently which each issue that I encountered. Roundcube
has proven to be a very attractive webmail interface and includes Sieve
administration for server-based filtering and vacation notices.</p>

<p>Overall we are very happy iRedMail users - if there is an easier way of
running an Open Source mailserver, I have not discovered it.</p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Install Samba to Access Windows Shares</title>
      <link>https://chrisjrob.com/2009/03/21/install-samba-to-access-windows-shares/</link>
      <pubDate>Sat, 21 Mar 2009 06:15:07 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/install-samba-to-access-windows-shares</guid>
      <description>
       <![CDATA[
         
         <p>If you are looking for a full Samba LDAP installation, please look elsewhere, this is a simple set-up to access files from an existing Windows or Samba server.</p>

<h2 id="installation">Installation</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># apt-get install smbfs smbclient
</code></pre></div></div>

<!--more-->

<h2 id="create-password-file">Create password file</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "username=abc" &gt;&gt; /home/username/.smbpassword
$ echo "password=p455w0rd" &gt;&gt; /home/username/.smbpassword
$ chmod go-rwx /home/username/.smbpassword
</code></pre></div></div>

<h2 id="add-network-drives">Add network drives</h2>

<p>Edit /etc/fstab:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/fstab: static file system information.
#
# &lt;file system&gt; &lt;mount point&gt;      &lt;type&gt;      &lt;options&gt;                    &lt;dump&gt;  &lt;pass&gt;
proc            /proc              proc        defaults                     0       0
/dev/sda1       /                  ext3        defaults,errors=remount-ro   0       1
/dev/sda5       none               swap        sw                           0       0
/dev/scd0       /media/cdrom0      udf,iso9660 user,noauto                  0       0
//hostname/D$   /media/shared      cifs        auto,rw,uid=trident,gid=users,fmask=0664,dmask=0775,iocharset=iso8859-15,credentials=/home/user/.smbpassword 0 0
</code></pre></div></div>

<p>Having done this, I find that you have to issue a:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mount -a
</code></pre></div></div>

<p>This simply remounts any unmounted filesystems from /etc/fstab.</p>

<h2 id="mount-directly">Mount directly</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mount -t cifs //hostname/D$ /media/drive_d -o username=..,password=...,auto,rw,uid=...,gid=...,file_mode=0664,dir_mode=0775,iocharset=iso8859-15
$ sudo mount -t cifs //hostname/D$ /media/drive_d -o auto,rw,uid=...,file_mode=0664,dir_mode=0775,iocharset=iso8859-15,credentials=/home/user/.smbpasswd
$ sudo umount /media/drive_d
</code></pre></div></div>

<h2 id="unmount">Unmount</h2>

<p>You unmount by referencing the mount point.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo umount /media/drive_d
</code></pre></div></div>

<h2 id="openoffice">OpenOffice</h2>

<p>There is a bug in OpenOffice which prevents you from being able to open documents by clicking on the file from within a Samba share. To fix this replace the default %U switch with %f in the KDE Menu configuration editor - right click over the KDE start menu → Menu Editor; next find every occurrence of the OO suite and replace %U with %f.</p>

<h2 id="references">References</h2>

<ul>
  <li>http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html</li>
  <li>http://www.linuxquestions.org/questions/linux-newbie-8/mounting-an-smbfs-using-fstab-461202/</li>
</ul>

       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
