From 840aab0c9acbd2898c754fc5063a21f7a0d6a487 Mon Sep 17 00:00:00 2001 From: "martin@martin-laptop.lan" Date: Fri, 1 Jun 2018 22:03:10 +0000 Subject: Initial --- _posts/2018-05-31-new-site.markdown | 18 +++++++++++++ _posts/2018-06-01-mailu.md | 50 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 _posts/2018-05-31-new-site.markdown create mode 100644 _posts/2018-06-01-mailu.md (limited to '_posts') diff --git a/_posts/2018-05-31-new-site.markdown b/_posts/2018-05-31-new-site.markdown new file mode 100644 index 0000000..10ff8a1 --- /dev/null +++ b/_posts/2018-05-31-new-site.markdown @@ -0,0 +1,18 @@ +--- +layout: post +title: "New Site" +date: 2018-05-31 17:51:07 +0100 +categories: jekyll update +--- + +I'm intending this site to be a mix of personal tech projects & writing about stuff in my life. + +This site is currently built with [Jekyll][jekyll], and served using [nginx][nginx] from my [Raspberry Pi Model 2B][rpi-2b]. I'm currently editing it with [VS Code][vscode]. + +The same Raspberry also hosts [my wife's blog][heyworlditshenry], where she writes about our son Henry, who sadly passed away shortly after he was born. + +[jekyll]: https://jekyllrb.com/ +[nginx]: https://nginx.com +[rpi-2b]: https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ +[heyworlditshenry]: https://heyworlditshenry.com/ +[vscode]: https://code.visualstudio.com/ \ No newline at end of file diff --git a/_posts/2018-06-01-mailu.md b/_posts/2018-06-01-mailu.md new file mode 100644 index 0000000..ef43bb2 --- /dev/null +++ b/_posts/2018-06-01-mailu.md @@ -0,0 +1,50 @@ +--- +layout: post +title: "Mailu" +date: 2018-06-01 20:17:00 +0100 +categories: jekyll update +--- + +I'm a big user of Google's software & services. Sometimes though, I wonder if I am too dependent on their services. The saying I have heard is that if you aren't paying for the product, then you are the product. I can use Google's services on their terms, which may include picking through my data for whatever reason. + +Having recently acquired a [Raspberry Pi][rpi], I decided to see what I could move my data away from Google's cloud and back into my own home. I made the following list of services that I regularly use: + +* Email +* Instant messaging +* Social media +* Photo storage +* Document storage + +This blog post is about email. Email is great. Email has been around since the very early internet days, and there are numerous excellent free & open-source bits of software that do email. At first glance, it may seem trivial to download all the relevant software, get it configured and hey presto, you have an email server. This isn't quite how this project turned out. + +Dovecot for IMAP. Postfix for SMTP. Get this working basically first, then add: Spamassassin for spam filtering, then clamav for anti-virus. Then maybe roundcube for webmail... + +I quickly found myself mired in configuration choices. Did I want real user accounts on my pi, or virtual user accounts in a database? How do I route the mail through spamassassin? Do I allow incoming mail from the local network without authentication? + +There is plenty of [documentation][dovecot-basic] and [guides][ars-technica-guide] about how to (and why) set up your own email server. The arstechnica guide I particularly like because it sets the scene so well: + +>Why do battle with arcane dragons to roll your own e-mail solution? + +Eventually I actually gave up trying to configure by myself all the services required to do email properly. It would have taken way more time, research, and testing than I was willing to put in. So I started looking for alternative routes. + +Around the same time, I was revisiting the [Go][golang] programming language. There is now an excellent minimal-configuration web server called [Caddy][caddy], written in go, with a simple configuration file and good stuff like HTTPS & HTTP/2 included by default. I embarked on a mission to write [my own mail server 'gomail'][gomail] with the same principles. This kind of worked, except it turns out to be a monumental effort to correctly implement the IMAP and SMTP protocols. A kind soul [emersion][emersion] has actually done most of the hard protocol work, creating nice go wrappers for SMTP and IMAP. Even with all this background work completed, it's still a monumemtal task. Emersion had already tried with [maddy][maddy], but as of writing this blog it's still very much incomplete. The idea has even been discussed on the [Caddy forums][caddy-forum-non-http], but no real progress made. + +There are a couple of alternative ways to get a good mail server setup: [iRedMail][iredmail] offers what is essentially a configuration script to get a new Debian / Ubuntu install to become a working mail server. This approach works fine, as long as you are starting with a fresh Debian install. + +This approach actually leads really neatly onto the last solution I tried, and the one I actually have working: [Mailu][mailu]. This project provides all the same open-source email components (postfix, dovecot), but pre-configured and packaged as [Docker][docker] images. This has a couple of advantages over iRedMail: +* You don't need a fresh Debian install. You only need a working Docker installation. +* Other system packages will not interfere. +* It's more easily movable. Since I pushed all my images to docker hub, I just copy over the data directory and the docker-compose file to a new Pi, execute `docker-compose up -d` and it's all back up. + +[rpi]:https://www.raspberrypi.org/ +[dovecot-basic]:https://wiki.dovecot.org/BasicConfiguration +[ars-technica-guide]:https://arstechnica.com/information-technology/2014/02/how-to-run-your-own-e-mail-server-with-your-own-domain-part-1/ +[golang]:https://golang.org/ +[caddy]:https://caddyserver.com/ +[gomail]:https://github.com/MFAshby/gomail +[emersion]:https://github.com/emersion +[maddy]:https://github.com/emersion/maddy +[caddy-forum-non-http]:https://caddy.community/t/server-types-other-than-http/65/7 +[iredmail]:https://www.iredmail.org/ +[mailu]:https://github.com/Mailu/Mailu +[docker]:http://docker.io/ \ No newline at end of file -- cgit v1.2.3-ZIG