I love Masked Emails, Fastmails take on one-time-use email addresses. I’ve been doing something similar myself for years now, but it is a bit of a shame that it’s so tightly coupled to 1Password. Sure you can create them through the webinterface now, but it’s still kind of a pain to use and not very convenient (unless you use 1Password).
You can’t even manually trigger creation of one within 1Password, so when the extension doesn’t detect an email signup field, you’re sorta out of luck.
What I want is something like this:
Let’s get it working.
The first thing I noticed is that the request to create a new masked email (through 1Password) isn’t actually coming from the 1Password servers like I first thought, it goes directly from the client to api.fastmail.com, like seen on a reverse-proxy like Proxyman:
By the way, Fastmail also stated they put this functionality right into their open-source JMAP project in a blogpost.
After a bit of reverse-engineering the request format to the API server and replicating it in Golang:
I present you: https://github.com/dvcrn/maskedemail-cli
maskedemail-cli -accountid xxxx -token abcdef12345 create facebook.com
… and you get a new masked email for facebook.com, right in your shell!
Glueing the CLI to shortcuts with KeyboardMaestro
I wanted this to be available everywhere whenever I need to. A full extension for a product that isn’t mine would have been too much work, and I wanted it to work outside browsers as well. With something like KeyboardMaestro this is trivial to do
Here’s the macro from above:
- Insert “…”
- Retrieve the URL from the current browser window. I had to use some glue applescript here because Firefox has no scripting interface
- Pipe it into the maskedemail-cli
- Remove the “…” and paste the newly created email
I am sure this will become more available in the near future. Fastmail likely has some kind of exclusivity thing with 1Password for now, but it’s great to see that we can hack ontop of it so easily. It’s also very cool that this is built right into JMAP. I hope we’ll see more email providers implementing it!