💾 Archived View for gemini.smallweb.space › tech-gemlog › 20240209-misfin.gmi captured on 2024-05-26 at 14:40:39. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-03-21)
-=-=-=-=-=-=-
User @satch on BBS[1] created a front-end called Skylab[2] to the gemini-based misfin[3] mail protocol/service. If you're unfamiliar with misfin, it's e-mail for Gemini. So I decided to try it out.
[1] Skylab Announcement on BBS
So my first stumbling block was that I thought Skylab included the misfin server since it pulled from @clseibold's misfin git repo, but I was mistaken. Luckily @satch was graceful enough to help me out via regular email over the course of about a week, when I had time between kids and work and other distractions.
So the first step is to get a server installed and running. I picked cipres' fork[1] of the main misfin server
[1] Misfin server (fork by @cipres)
Stumbling block: I tried to install @cipres' misfin server from source (git clone, etc.) by following the instructions, but it seems to only work with Python 3.9. Seeing that I had Python 3.11 installed, it didn't like the way some of the imports were used. I initially tried installing Python 3.9 and setting up a virtual environment but this proved to be a lot of work. Luckily there's an AppImage.
Official Misfin Documentation on @cipres' Gitlab
$ wget https://gitlab.com/cipres/misfin/-/releases/continuous-master/downloads/misfin-latest-x86_64.AppImage $ mv misfin-latest-x84_64.AppImage misfin $ chmod +x misfin $ mv misfin ~/.local/bin/
Explanation:
You can run cipres' misfin server as a single user but I don't think Skylab works that way. Setting up the full server is the best way.
Step 2a: Create a directory for the server
$ mkdir -p ~/misfin/<your domain>
Explanation:
Step 2b: Initialize via 'server-init'
Usage: misfin server-init [OPTIONS] SRVDIR HOSTNAME
$ misfin server-init ~/misfin/<your domain> <your domain>
Step 2c: Check that files were created
$ ls ~/misfin/<your domain> gemboxes identities misfind.toml server.pem
Cipres' misfin server comes with a default front-end that is accessible via port 1958 of <your domain>
Step 3a: run the server
$ misfin serve ~/misfin/<your domain>
You can also run it as a daemon with the -d option, but we'll be using systemd for this, so it's unnecessary if you have systemd available.
Step 3b: Test the default interface
gemini://<your domain>:1958
And you should see a page that says you're not recognized. Next we'll add a user.
Simply follow the on-screen instructions to add a user
Lagrange makes it easy by detecting the cert that's generated on the page
If you don't have someone to test with, you can create another user at hashnix.club:
Kill your current misfin process if it's running still
$ cd /etc/systemd/system $ sudo touch misfin.service $ sudo vim misfin.service
then add something like this:
[Unit] Description=Misfin server by cipres After=network.target [Service] User=gemini Type=simple WorkingDirectory=/home/gemini/misfin ExecStart=/home/gemini/.local/bin/misfin serve /home/gemini/misfin/gemini.smallweb.space Restart=always Environment="PYTHONUNBUFFERED=1" StandardOutput=syslog StandardError=syslog SyslogIdentifier=misfin [Install] WantedBy=default.target
Let's enable, and start our new service:
$ sudo systemctl enable misfin $ sudo systemctl module-reload $ sudo systemctl start misfin
And if all goes well, then we can check the status with journalctl:
$ journalctl -f -u misfin Feb 09 18:03:05 smallweb-space misfin[70670]: INFO:pyrate_limiter:(sync)leaking bucket: <pyrate_limiter.buckets.in_memory_bucket.InMemoryBucket object at 0x7fdb5cf5c220>, 0 items Feb 09 18:03:05 smallweb-space misfin[70670]: INFO:pyrate_limiter:(sync)leaking bucket: <pyrate_limiter.buckets.in_memory_bucket.InMemoryBucket object at 0x7fdb5cf5c730>, 0 items Feb 09 18:05:05 smallweb-space misfin[70670]: INFO:pyrate_limiter:(sync)leaking bucket: <pyrate_limiter.buckets.in_memory_bucket.InMemoryBucket object at 0x7fdb5cf5c220>, 0 items Feb 09 18:05:05 smallweb-space misfin[70670]: INFO:pyrate_limiter:(sync)leaking bucket: <pyrate_limiter.buckets.in_memory_bucket.InMemoryBucket object at 0x7fdb5cf5c730>, 0 items
Congrats! You now have a misfin server up and running.
Next up: getting an alternate front-end (possibly with more features), like skylab (gemlog is work-in-progress)
-----
2024-02-09
Tags: misfin, skylab
Gritty
Gemini Mention this log
Regular email
Misfin mail