<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: mailserver</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/mailserver/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>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 | Transfer Emails from Windows to Linux</title>
      <link>https://chrisjrob.com/2009/03/21/transfer-emails-from-windows-to-linux/</link>
      <pubDate>Sat, 21 Mar 2009 06:22:56 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/transfer-emails-from-windows-to-linux</guid>
      <description>
       <![CDATA[
         
         <p>These instructions explain how to transfer emails from a Windows email client to Linux Kmail.  This document has a number of provisos:</p>

<ol>
  <li>If your mailserver is running IMAP, then what are you doing here?  Just connect your Linux mail client to your IMAP server and you’re good to go!</li>
  <li>If you are running a common mail client on Windows, then consider installing Mozilla Thunderbird on Windows and importing your emails into that…
a. See <a href="/2009/03/21/transfer-emails-from-microsoft-outlook/">Transfer Emails from Microsoft Outlook</a></li>
  <li>If you are running Mozilla Thunderbird on Windows, then you can simply copy the files onto Linux and use Mozilla Thunderbird on Linux - job done.</li>
  <li>If your Windows email client stores in mbox format (unlikely) then again you should be able to simply copy the mail store to Linux.</li>
  <li>Check whether you have any export options and see if you can export into an easier format, e.g. Thunderbird/MBOX.</li>
  <li>If your Windows email client does not support IMAP, then you will need to upgrade it to a more recent version that does before proceeding.</li>
  <li>If your Windows email client does support IMAP, then let’s continue…</li>
</ol>

<!--more-->

<h2 id="install-courier-imap-on-server">Install Courier-IMAP on server</h2>

<p>See <a href="/2009/03/21/install-courier-imap-server/">Install Courier-IMAP Server</a></p>

<h2 id="create-ltsp-user">Create LTSP User</h2>

<p>In KUserManager create the user, and add to the following groups:</p>

<ul>
  <li>kiosk-standard</li>
  <li>Staff</li>
  <li>Users</li>
  <li>Fuse (only if you want them to be able to access USB devices)</li>
  <li>Saned (only if you want them to be able to use scanning)</li>
</ul>

<p><strong>Take a note of UID and GID before exiting KUserManager</strong></p>

<h2 id="create-imap-account">Create IMAP Account</h2>

<p><strong>You need to have installed an IMAP server first - see page Install Courier-IMAP Server</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo userdb USERNAME set uid=9999 gid=9999 shell=/bin/bash home=/opt/imap-mail/USERNAME
</code></pre></div></div>

<p>*Replace USERNAME and 9999 for actual username, uid and gid</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo userdbpw -md5 | sudo userdb USERNAME set systempw
$ sudo mkdir -p /opt/imap-mail/USERNAME
$ sudo maildirmake /opt/imap-mail/USERNAME/Maildir
$ sudo chown -R 9999:9999 /opt/imap-mail/USERNAME
$ sudo makeuserdb
$ sudo /etc/init.d/courier-authdaemon stop
$ sudo /etc/init.d/courier-imap stop
$ sudo /etc/init.d/courier-authdaemon start
$ sudo /etc/init.d/courier-imap start
</code></pre></div></div>

<p>*Replace USERNAME and 9999 for actual username, uid and gid</p>

<h2 id="key-steps">Key steps</h2>

<p>The rest of the process is simple enough, that hopefully I do not need to go through it in detail.  Briefly:</p>

<ul>
  <li>Install Courier-IMAP Server</li>
  <li>Create IMAP account in Windows email client</li>
  <li>Log onto LTSP</li>
  <li>Kontact → Mail → Create IMAP account</li>
  <li>Transfer each mail folder into IMAP Inbox then transfer each IMAP folder into Kmail folder</li>
  <li>Repeat last step for each folder</li>
</ul>

<p><strong>Change each client to work off-line between transfers - you don’t really want both clients connected to the same IMAP mailbox at the same time</strong></p>


       ]]>
      </description>
    </item>
    
    <item>
      <title>Howto | Install Courier-IMAP Server</title>
      <link>https://chrisjrob.com/2009/03/21/install-courier-imap-server/</link>
      <pubDate>Sat, 21 Mar 2009 06:00:37 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/install-courier-imap-server</guid>
      <description>
       <![CDATA[
         
         <h2 id="introduction">Introduction</h2>

<p>Courier-IMAP is quick and easy to install, but is probably not your best option for running a first class IMAP server.  In particularly I have been strongly recommended <code class="language-plaintext highlighter-rouge">Cyrus IMAP server</code>.  The big advantage to Courier-IMAP is that it can be very easily installed on your LTSP server as a temporary migration tool for email, i.e. to transfer users from Windows to Linux.</p>

<h2 id="install-imap">Install IMAP</h2>

<!--more-->

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install courier-imap
</code></pre></div></div>

<p>This will prompt whether to create files for use by the web interfaces; it is safe to select “No” here.</p>

<p>Now you need to choose a directory where your mail will live:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mkdir -p /opt/imap-mail
</code></pre></div></div>

<p>Now we need to define our users in the courier-imap user database. There are several ways to do this, including mass conversion of all your users in /etc/passwd using the pw2userdb tool as mentioned in the courier FAQ. Here is what we do to create a single user:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo touch /etc/courier/userdb
$ sudo chmod 600 /etc/courier/userdb
$ sudo userdb ~userid~ set uid=&lt;1000&gt; gid=&lt;1000&gt; shell=/bin/bash home=/opt/imap-mail/~userid~
</code></pre></div></div>

<p>*Edit the final line as appropriate.</p>

<p>Now you need to set the users password and create the directory that will store all our e-mail:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo userdbpw -md5 | sudo userdb &lt;peanut&gt; set systempw
$ sudo mkdir -p /opt/imap-mail/&lt;userid&gt;
$ sudo maildirmake /opt/imap-mail/&lt;userid&gt;/Maildir
$ sudo chown -R &lt;1000&gt;:&lt;1000&gt; /opt/imap-mail/&lt;userid&gt;
</code></pre></div></div>

<p>In the <code class="language-plaintext highlighter-rouge">/etc/courier/authdaemonrc</code> file, make sure you set the following value:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>authmodulelist="authuserdb"
</code></pre></div></div>

<p>Note that you may need to replace the existing authmodulelist value. Now prepare the user DB and restart the entire system:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo makeuserdb
$ sudo /etc/init.d/courier-authdaemon stop
$ sudo /etc/init.d/courier-imap stop
$ sudo /etc/init.d/courier-authdaemon start
$ sudo /etc/init.d/courier-imap start 
</code></pre></div></div>

<p>The IMAP system is now ready.</p>

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

<ul>
  <li>http://www.howtoforge.com/converting_outlook_pst_to_maildir</li>
</ul>


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