<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Julian B. Heuschen on Medium]]></title>
        <description><![CDATA[Stories by Julian B. Heuschen on Medium]]></description>
        <link>https://medium.com/@jbheuschen?source=rss-8ba05c1c79c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7rKNveS0EZcHTvhfBvdYrQ.jpeg</url>
            <title>Stories by Julian B. Heuschen on Medium</title>
            <link>https://medium.com/@jbheuschen?source=rss-8ba05c1c79c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:08:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jbheuschen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using Mailcow as a Mail Server]]></title>
            <link>https://medium.com/codex/using-mailcow-as-a-mail-server-edfabb050e8?source=rss-8ba05c1c79c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/edfabb050e8</guid>
            <category><![CDATA[mailcow]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[smtp]]></category>
            <category><![CDATA[mail-server]]></category>
            <dc:creator><![CDATA[Julian B. Heuschen]]></dc:creator>
            <pubDate>Sat, 10 Apr 2021 11:46:47 GMT</pubDate>
            <atom:updated>2021-04-12T08:16:56.269Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever heard of mailcow? I recently bought a new domain and wanted to set up a mail server. Having the choice between setting one up completely myself and using a third-party service, I ran over the docker-based mail server suite called “<em>mailcow</em>”.</p><p>Mailcow is a dockerized, seemingly easy to manage mail server suite. In this article, I want to write down my experiences from the first few months of using Mailcow, and finally come to a verdict as to what possible disadvantages of using it there are and whether they, in my opinion, are worth it.</p><h3>The Installation</h3><p>First things first, I obviously had to install Mailcow. The installation itself actually is pretty straight-forward. There are, however, a few prerequisites:</p><ul><li>You need to have Docker as well as Docker Compose installed (as described on their respective websites)</li><li>As Mailcow comes with a fully-integrated Groupware, it can sometimes be quite resource-heavy. Many of these components can be disabled though and aren’t really necessary for the average user.</li></ul><p>Having these in mind, we can start the installation by cloning mailcow-dockerized’s git repository (remember to use an appropriate directory for this — I personally use <em>/opt/mailcow-dockerized/</em>):</p><pre># git clone <a href="https://github.com/mailcow/mailcow-dockerized">https://github.com/mailcow/mailcow-dockerized</a> &amp;&amp; cd mailcow-dockerized/</pre><p>Once cloned, we can run the included <em>generate_config.sh</em> script to interactively generate the necessary configuration files. Finally, we can start mailcow the same way we do with any other docker compose project. That is, we run:</p><pre># docker-compose pull &amp;&amp; docker-compose up -d</pre><p>You should now be able to access Mailcow’s web interface by navigating to the hostname you specified during the config generation. In my case, I created a mail subdomain. You should be able to log in using the credentials admin / moohoo (and subsequently change these).</p><h4>Setting up a domain</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEyLRk7Jjq6CiWAaG7pXsA.png" /><figcaption>Adding a domain</figcaption></figure><p>After changing your password, one of your first actions will probably be to add your domain. This can be done at <em>Configuration → Mail Setup → Domains → Add Domain </em>by simply filling in your FQDN — everything can be changed later on. Once you have done that, you can open the DNS dialogue to see what DNS Records Mailcow proposes for you to create / modify. In my case, I had already created most of them myself. <strong>Remember: Depending on your TTL, your records might take a while to become globally available thus enabling you to send and receive mails!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJCKdjR03Mdv-48fp94eQw.png" /><figcaption>DNS Records as proposed my Mailcow</figcaption></figure><p>Having created all essential records, I also wanted to use <em>DKIM</em>. In order to do that, I had to navigate to <em>Configuration → Configuration &amp; Details → Configuration → ARC/DKIM keys</em> and generate a key for the respective domain. Once you generated the key, go back to aforementioned DNS Records dialogue; a dkim._domainkey.yourdomainrecord (TXT) should now be visible. Once you created this record, <em>DKIM</em> should work.</p><h4>Setting up Mailboxes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SdtREj8R8PXOmknzAKDZQA.png" /><figcaption>Adding a new mailbox</figcaption></figure><p>My next step was to begin setting up mailboxes. This is similarly straight-forward as is adding domains and can be done at <em>Configuration → Mail Setup → Mailboxes → Add Mailbox.</em>The upcoming dialogue asks you for a username (i.e., the email address’s left part) as well as for a password. If you have multiple domains, make sure to select the right one!</p><h4>Sending and Receiving Mails</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2IVsBHljTAEhViTqT6CWA.png" /><figcaption>SOGo Groupware provides you with a webmail system</figcaption></figure><p>Thus far, we can already begin sending and receiving mails. You can do this either using <em>SMTP/IMAP</em> directly, or you can use the built-in groupware <em>SOGo</em>. As the former is probably self-explanatory (simply use Mailcow’s hostname as <em>SMTP</em> &amp; <em>IMAP</em> server), I’ll go the second approach at this point. You can access your Mailcow’s <em>SOGo</em> instance at https://{MAILCOW_HOSTNAME}/SOGo and simply login using the username and password you just chose. By the way: <em>SOGo</em> provides you with a synchronizable calendar and contact management, too. Furthermore, <em>SOGo</em> supports <strong><em>ActiveSync</em></strong> — that is, you can add your mail account as Exchange account and thus get immediate push notifications!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFatXFhRZ-CmY7FMl4FBtg.png" /><figcaption>mailcow UI from a user’s perspective</figcaption></figure><p>Last but not least, not only administrators can log into the <em>mailcow UI</em> (the one where you just added mailboxes). Users can, too — and subsequently create temporary aliases for themselves, view quarantined mails, change their password, or adjust their spam filter’s sensitivity. Moreover, mailcow allows iOS/macOS users to download a <strong><em>configuration profile,</em></strong> automatically setting up their account.</p><h3>Administrative Features</h3><p>One thing I find great about mailcow is the sheer amount of administrative features we’re provided with. Amongst those are:</p><ul><li>Aliases, Temporary Aliases &amp; Domain Aliases</li><li>Resources (e.g., you can manage a physical room as a resource, invite it to calendar events, and thus see when it’s in use etc.)</li><li>Sync jobs</li><li>Filters &amp; Address Rewriting (not unique to Mailcow but extremely easy to manage)</li><li>Multiple administrative users, as well as domain-specific administrative accounts</li><li>An extensive REST-API</li><li>OAuth2-Support</li><li>Automatic SSL Certificate generation and renewal</li></ul><h3>Updating Mailcow</h3><p>A common task of all of us is to keep things up-to-date. With mailcow, we can easily do this by going to our mailcow directory and running:</p><pre># ./update.sh</pre><p>The script will update configuration files and all docker containers (which may sometimes take quite a while). Sometimes, the update script itself has changed which will require you to run it twice (it will, however, ask you to do so). Important files are being backed-up beforehand.</p><h3>Using Mailcow in a low-memory environment</h3><p>I once installed mailcow on a development server with only 2GB of RAM and subsequently got into trouble with mailcow running out of RAM. In that case, you can drastically decrease mailcow’s RAM usage without affecting most of its functionality by disabling <em>ClamAV</em> and <em>Solr</em> in the <em>mailcow.conf</em> file:</p><pre>SKIP_CLAMD=y<br>SKIP_SOLR=y</pre><p>After restarting mailcow via docker compose, it should use much less memory.</p><h3>My Experiences</h3><p>I’ve been using mailcow for about a year and a half now and I’m altogether very happy with it. I’ve been using it for myself, as well as my family, and I haven’t had any notable difficulties nor problems. It simply fits my use case very well.</p><p>Additionally, something that I think is very positive is that mailcow is not only being maintained, but actively extended and developed. When I think back and compare the suite I installed about a year ago to today’s installation, there have been many newly introduced features in the meantime. Furthermore, the configuration is really straight-forward: most things can be done right-away using the administrative web interface — and most other things can be done via the central mailcow.conf configuration file.</p><h4>Disadvantages</h4><p>In my opinion, the biggest disadvantage is the suite being so extensive. Most features I have never even used. For instance, mailcow comes with an XMPP messaging server, or a fully-equipped groupware. While there certainly are usecases for this, most of us probably won’t use them regularly. However, many of these services can be manually disabled via the configuration file. One thing that often annoyed me as a developer was the <em>REST API</em> not being especially well-documented. I have to admit, though, that this has gotten much better lately with a <a href="https://mailcow.docs.apiary.io/#">documentation</a> being worked on.</p><h3>My Verdict</h3><p>I think that Mailcow is a great mail server suite, though not for everyone. For someone like me who is not focussed on mail server administration, mailcow is a really great way of having an own, fully-equipped mail server without having to spend endless time finetuning its configuration. There also is a community in which you can get support. I think, though, that there also are those of us who rather want to “manually” configure their server and have absolute control over their system. While it is possible to do so even with mailcow, it is probably easier to not use mailcow in that case.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edfabb050e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/using-mailcow-as-a-mail-server-edfabb050e8">Using Mailcow as a Mail Server</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating to Swift Playground Books]]></title>
            <link>https://jbheuschen.medium.com/migrating-to-swift-playground-books-af7a2a58382e?source=rss-8ba05c1c79c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/af7a2a58382e</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[wwdc]]></category>
            <category><![CDATA[swift-playgrounds]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Julian B. Heuschen]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 21:07:49 GMT</pubDate>
            <atom:updated>2021-04-07T21:07:49.442Z</atom:updated>
            <content:encoded><![CDATA[<p>The other day, whilst preparing my submission for this year’s Swift Student Challenge, I (once again…) ran over one of the more widely known issues with Swift Playgrounds. I seemingly randomly got runtime errors such as “<em>Abort() called</em>”, especially when using SwiftUI for my live views. These errors, usually resulting from bugs in Swift Playgrounds itself, can often be resolved by disabling “<em>Enable Results</em>”. It would, however, be sort of awkward to ask those judging my playground to disable said mode themselves, I thought, and thus began searching for a way to disable this function entirely. In the end, I opted for a <strong><em>Swift Playground Book</em></strong> instead of a regular Playground as this, amongst many other advantages, allows me to use <em>Manifest.plist</em>-files to disable said mode. In this article, I want to give tips on how to easily migrate an existing playground to a playground book.</p><h3>Using the Template</h3><p>Apple provides us with a useful template through which we don’t have to create the entire directory hierarchy ourselves. To get started, you can download it yourself from <a href="https://developer.apple.com/download/more/?=Swift%20Playgrounds%20Author%20Template">Apple’s developer portal</a>. When you open the <em>.xcodeproj</em>-file contained therein, it should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7HbBrWPXHWCj6tnpchJww.png" /><figcaption>The blank playground book template</figcaption></figure><p>As you can see, this template also provides us with a <em>LiveViewTestApp</em>. But I will not go into details about that one at this point. First of all, you might want to customise the metadata contained in the top-level <em>Manifest.plist</em> (i.e., <em>PlaygroundBook/Manifest.plist</em>). For instance, you might want to change the playground’s <em>Name</em>, or add an <em>ImageReference</em> to it.</p><h4>Importing Playground Pages</h4><p>Importing playground pages from our existing Swift Playground actually is pretty straight-forward: we can simply drag-and-drop them into the <em>Pages/</em>-directory of one of the template’s chapters. We, however, have to adjust a few things before the playground will be runnable. First of all, all files imported that way might still be having an old file extension (<em>.xcplaygroundpage</em> in my case — I created mine directly using Xcode). In that case, you have to make sure the folders name ends in <em>.playgroundpage</em>. Second of all, you might have to rename the page’s main file from <em>Contents.swift</em> to <em>main.swift</em>. Third of all, every playground page needs a <em>Manifest.plist</em> file. I could find an easy way to generate them directly within Xcode, you therefore probably have to create them manually. Their content should be something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af6575bbb173e74c1e8035d1d0d88853/href">https://medium.com/media/af6575bbb173e74c1e8035d1d0d88853/href</a></iframe><p>However, I just want to advise you, that these manifests are an extremely powerful tool for us playground creators! Apple gives us more details on this <a href="https://developer.apple.com/documentation/swift_playgrounds/structuring_content_for_swift_playgrounds/adding_a_page_to_a_playground_book">here</a>.</p><p>Lastly, we need to make sure that everything we just imported is referenced correctly. Long story short, playground books are structured hierarchically — which practically means that everything must be referenced in its parent’s manifest. Most importantly for us, that means we have to make sure that all our playground pages are being referenced in our chapter’s <em>Manifest.plist</em>’s <em>Pages</em>-array. For instance:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/358844855170c17314accbc1a1bd74e1/href">https://medium.com/media/358844855170c17314accbc1a1bd74e1/href</a></iframe><p>If you changed the top-level structure (i.e., added, removed, or renamed chapters), make sure that they’re being referenced correctly in the book’s <em>Manifest.plist</em> as well.</p><h4>Sources</h4><p>If your old playground’s pages contained a <em>Source</em> folder, you will probably encounter an error saying you have to use modules instead. In order to do so, you’ll probably have to restructure your code a bit. The prebuilt template already comes with two modules which you can find in the <em>Modules/</em> directory (a module essentially is a directory ending with <em>.playgroundmodule</em>, containing a source directory, containing <em>.swift</em> files). You can either use the built-in ones or add your own one by creating a module using the directory structure mentioned above. Having moved all Swift files from a page’s old <em>Sources/</em> folder to a module, you just have to import the module within your code. All modules are available for import to your swift code by their respective directory name without the trailing <em>.playgroundmodule</em> (e.g., <em>BookCore.playgroundmodule </em>→ <em>import BookCore</em>).</p><h4>“Compiling” the Playground Book</h4><p>Once finished, you are ready to compile your playground book. If you used Apple’s template, you already have an Xcode build target for the final <em>.playgroundbook</em> file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*nKgPN4tRAcz1dUuHsAAfSQ.png" /><figcaption>Make sure to select the <em>PlaygroundBook</em> target. What device you select on the right-hand side doesn’t matter in this case.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*I6OzbS5lY2NXkcQVjpKBNA.png" /></figure><p>Clicking <em>Run </em>now results in a <em>.playgroundbook</em>-file being built. You can find that file in your project’s <em>Products/</em> folder. Using <em>Control-Click → Show in Finder → Share</em> you can for instance air-drop it to an iPad.</p><h4>Disabling the “Enable Results”-mode</h4><p>Considering my introductory problem: having moved to a playground book, the solution is quite straight-forward at this point. We can add the <strong><em>PlaygroundLoggingMode</em></strong> key to a page’s <em>Manifest.plist</em> and set its value to <strong><em>Off</em></strong>. That’s all! Said mode will automatically be disabled and cannot be enabled manually anymore 🙂.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b93c293a7a9c4e4aaecf600b5e9f5978/href">https://medium.com/media/b93c293a7a9c4e4aaecf600b5e9f5978/href</a></iframe><h3>A Huge Disadvantage</h3><p>I nonetheless want to note a huge disadvantage of using a Playground Book at this point: Xcode doesn’t seem to like them — code highlighting is buggy, and code completion usually doesn’t work at all! If you heavily rely on such features (let’s be honest — most of us do… 😉), you’re probably best off finishing your project as regular playground first, and then migrate to a playground book. Alternatively, you could use an external editor, too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af7a2a58382e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>