Holy 🔑: Mutt and S/MIME emails through the ages

As might be apparent from my blogging oeuvre, I like to cryptographically sign and encrypt emails to my friends and family. And while it's true that I've set up a personal PKI so I can cheaply and easily manage my correspondents' credentials for them, I also buy my own certificate every 3 years so that I can keep signing turned on, even for recipients who don't have my root certificate installed.

With my strong and perhaps eccentric appreciation of email, I occasionally like to be able to go back and re-read messages from a while ago. This is quite straightforward to do in most of my applications, but my favourite client Mutt demands that you either:

  1. Set a single value for smime_default_key, or;
  2. Keep unset smime_decrypt_use_default_key in your ~/.muttrc, and choose the right key each time you need to decrypt.

Neither of these is really satisfactory

...Read More

GitLab & LaTeX Builds


I like to write letters. I do not, however, enjoy wrangling Microsoft Word to ensure the same results each time; I use LaTex, where I can be guaranteed of consistent output.

As my library of past correspondence increases, I was looking for a way to implement version control as I drafted correspondence. Git was the obvious solution, and quite straightforward to set up. As I run a GitLab server on my Synology, I was happy storing a big backup of all of the history on a RAID device elsewhere in the house. But, I realised, it wasn't good practice to store the generated PDFs — the binary outputs — alongside their .tex files. At the same time, I had recently put together a fairly unique build server using GitLab CI for work. I was sure that I could make something that would be useful to me in this instance too.

...Read More

Email Submission to GitLab in a Synology Docker Image

I realise this is quite a specific post; this is mainly for posterity.

I have a Synology box running this docker image for GitLab. I also have some interest in configuring GitLab to receive emails from a specified mailbox, and create new issues upon receipt of an email.

This is possible with the docker image, using variables such as IMAP_USER as described in the gitlab docker page.

When this is all set up, the docker image fails to start its mail client. You will need to log in to the docker image, by first running docker ps. This will allow you to obtain the CONTAINER_ID of the docker image.

This will allow you to obtain a shell for the docker image, by typing docker exec -it CONTAINER_ID bash.

Then, on the docker image, run sudo -u git -H RAILS_ENV=production bin/mail_room start. This will start the mail_room, and if configured correctly, your docker image should start polling the configured IMAP server.