The presentation needs to be improved a bit, but we now have #Fediverse posts in #mutt complete with attachments and other links, with descriptions, as an attached #linkset. This is using #fcli, which is my #Mastodon to #maildir / #SMTP bridge.

The main problem is that the linkset viewer is a bit slow - it probably needs to become a simple C application rather than part of the Python monolith.

I also need to implement support for posting with attachments in the SMTP side of the bridge.

I'm adding support for attachments and other links to my #Mastodon to #maildir bridge. I didn't want to use standard #MIME attachments, as that would require me to download every attachment from all of the posts in my feed, so instead I've decided to create a #linkset object as defined in https://www.rfc-editor.org/rfc/rfc9264.html.

I've written a small utility to load these files and present a menu of links which can be opened in the relevant application, which works pretty well from a mailcap entry. Right now the main problem is that there's no sensible way to surface the alt text, which helps me decide whether I want to open the attachment. I haven't really checked whether there's anything relevant in the RFC, so there may be an obvious way of doing this.

RFC 9264: Linkset: Media Types and a Link Relation Type for Link Sets

This specification defines two formats and associated media types for representing sets of links as standalone documents. One format is based on JSON, and the other is aligned with the format for representing links in the HTTP "Link" header field. This specification also introduces a link relation type to support the discovery of sets of links.

Does anyone know if there's a #URI scheme for #email messages stored on the local machine in a #maildir folder? They're just files, so the file scheme would work, but they also have unique IDs in the filename, and Message-ID: headers which are related but not identical.

#Fediverse projects this week. Firstly the easy one - I've added some basic support for (receiving) attachments in #FCLI, which is my #Mastodon to #maildir bridge to allow me to interact with the Fediverse in #mutt.

Currently it's just a list of URLs and descriptions at the end of each post. I was planning to present them as #MIME attachments, but that model doesn't really work - I don't want to download everything just in case, and I don't think there's a standard way in email to present an attachment as a URL to download on demand. At some point I may experiment with a new MIME type and custom handler to do that, but I think I'd still want the descriptions in the main message anyway.

I should also add that the thoughtful Fediverse norm of adding #alttext makes this so much easier, so please keep doing it. #accessibility opens the door for people who couldn't otherwise interact at all, and that's the most important bit, but it makes life a little bit (or a lot) easier for the rest of us too.

1/n

This is what I should have been doing all along - it looks like it's trivial to download data from the #Mastodon API into #maildir, and once you've done that you can use #mutt as your #Fediverse client.

A few more bits and pieces needed to make this properly workable, but even if they don't exist I'll be building on massively well established standards rather than from the ground up.

Me and my new #yubikey5 part 2:

Now we get to the nitty-gritty parts. I'm using #mbsync to sync multiple #imap accounts to local #maildir and I am automating this via #systemd : a timer calls a service very 5 minutes, that will call mbsync on all mail accounts if connected to the internet.

Providing the passwords via #pass that is encrypted with #yubikey will need that yubikey to be unlocked (i.e. a pin needs to be provided). When providing this pin (e.g. by manually calling mbsync on one of my mail accounts), it will be stored for at least 12h, and up to 24h (on my home pc; mobile and remote devices will of course hav different settings).

However, if I never manually provide the PIN, the systemd automated scripts will fail. E.g. I just connected the key, but not used it.

First I thought, this was due to me using the `curses` version #pinentry . But that's not the whole truth. Even with `pinentry-gtk` the systemd script will not trigger a PIN entry. I didn't quite understand why, and therefore ran a different direction:

Could I just auto-unlock the yubikey if I connected it? I wrote a #udev rule that would recognize the yubikey. Learning that I need to put scripts for udev in certain dirs, and being unhappy with it, I then wrote a systemd service for the udev to call instead, and with that I maanged to finally get a PIN entry request using the gtk version.

And then it got me thinking. Why did that work, but my mailsync that basically has the same things involved (script instead of udev that triggers systemd that wants to decrypt something using yubikey triggering PIN entry). And then it hit me: My mailsync systemd service was missing the `DISPLAY=:0` environment variable, thus the script can't trigger the GUI. Half a days worth of work, all for nothing  

But hey, the weekend is young. Next up: If triggered via CLI i want gpg to trigger `pinentry-curses` instead of `pinentry-gtk`. Sounds easy: have a `pinentry-auto` script figuring out where it has been called from. Well... not really #wip

Just released a little script that creates maildirs and mailboxes (a folder that contain one or more maildir subfolders). Maybe someone will find it useful.
https://lucio.albenga.es/web-en/projects/maildirtools.html

#email #maildir #shell #unix #linux #foss

/home/lucio.albenga.es - Maildir Tools

J’ai découvert que j’avais 2,8 millions de mails dans un seul dossier IMAP.
Je répète : deux millions. Huit cent mille.
Merci YunoHost pour les rapports de diagnostic par mail…

J’ai tout purgé en SSH depuis ma voiture, en 5G, pendant que la sono tournait.
Maintenant, iOS Mail et Apple Intelligence peuvent bosser sans convulser.

Je n’administre pas un serveur. Je dompte un fauve 🦁.

#SysadminLife #Linux #YunoHost #Dovecot #Maildir #AppleIntelligence #Mastodon

For quite some time I have sporadically run #mbsync configured to pull several IMAP accounts and it indeed brings in emails. BUT:

- #maildir format is weird. What's with the cur/new/tmp structure?
- why the heck is the hostname in the filenames?
- Feels like it doesn't like to be migrated and be continued from somewhere else.
- two-way sync seems to be kinda broken (not needed anyway)
- Holy cow is the configuration unnecessarily verbose and complicated 🤯 (should be well #nix-able though)

#Thunderbird のプロファイルをネットワークドライブに放り出しているとメールボックスが壊れがちなんですが、 #mbox 形式のメールボックスが1つの巨大なファイルという弱点を露呈しているだけで、 #Maildir 形式のメールボックスにすれば壊れづらくなるんじゃないかと思ってみたりはする ( #NFS でマウントしていた当時のワークステーションはどうなってるんだ)