this post was submitted on 14 Mar 2024
52 points (100.0% liked)

Fediverse

28490 readers
572 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

Apas: ActivityPub via email

https://apubtest2.srcbeat.com/apas.html

The overarching goal is an experimental system to make ActivityPub federation stuff clearer for devs, sysadmins and advanced users.

The documentation is incomplete and the code is really not OK! But they always say it's better to get stuff out the door for others to look at sooner. Maybe it inspires others to think about the Fediverse/ActivityPub in weird new ways!

PS thanks @emersion for your SMTP work!

@fediverse #fediverse #smtp

you are viewing a single comment's thread
view the rest of the comments
[–] otl@apubtest2.srcbeat.com 3 points 8 months ago

Right now I follow a few Mastodon users via an RSS-to-Email service, but the problem with that is that you can't follow private accounts/see followers-only toots. It would be great to have a full email bridge.

Ah yes know exactly what you mean. I follow Mastodon, PieFed, Lemmy stuff via RSS too.

I have a little program which follows/unfollows:

apfollow kevincox@lemmy.ml
apfollow -u kevincox@lemmy.ml

Then things get delivered to my inbox. That's been working ok. I'm adding a "Following" section to the docs soon.

But I think the main idea is getting Activity into a RFC5322 message in a filesystem. The system doesn't really care how that file is written. It could be from an ActivityPub server sending stuff to you. But it could also be from reading a RSS feed and fetching the items. My first stab at this was actually a couple of scripts which dumped my Mastodon timeline and some Lemmy stuff to message files.

So if my ActivityPub-email bridge was running you wouldn't also be able to access a Mastodon UI and for example browse other posts.

What I do now is clunky. First, I've written a couple of very basic frontends using both the Lemmmy & Mastodon API. These expose the unique ID of each post, which I copy/paste around...

(like commenting on a random post I was linked to).

I run this command:

apubget -m https://lemmy.ml/comment/9266238 > comment.eml

Then open the file in a mail client, and reply to it. Like I said: pretty clunky! :D

One thing I've thought about is hijacking the header's Subject field to hint to apas that we're replying to something. Modifying Subject is exposed in more mail clients than being able to modify arbitrary fields in the header (ideally we set In-Reply-To). For example for this message I'm writing now:

To: kevincox@lemmy.ml
Subject: https://lemmy.ml/comment/9266238

Ah yes know exactly what you mean bla bla bla...

Taking it further, frontends could render mailto: links. Here's one to reply to your message: mailto:kevincox@lemmy.ml?cc=fediverse@lemmy.world&subject=https%3A%2F%2Flemmy.ml%2Fcomment%2F9266238

Using Subject as both the name or inReplyTo properties of an Activity depending on its value feels unclear.

Reading RFC 6068, it's theoretically possible that we could inject a In-Reply-To in a mailto URL. It's up to the mail application to interpret it. mailto:kevincox@lemmy.ml?cc=fediverse@lemmy.world&in-reply-to=%3Chttps%3A%2F%2Flemmy.ml%2Fcomment%2F9266238%3E This encodes the message:

To: kevincox@lemmy.ml
CC: fediverse@lemmy.world
In-Reply-To: <https://lemmy.ml/comment/9266238>

bla bla bla

Just tested and found that MailMate actually handles this. Still feels unclear... I dunno. What do you think?