Skip to content

Minimal program to create Fastmail masked emails using their JMAP API

License

Notifications You must be signed in to change notification settings

kensmith/fastmask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

fastmask

Minimal, low dependency Javascript program to create Fastmail masked emails using the JMAP API.

Setup:

Generate your API token from your Fastmail account:

Then, on Linux, (other OSes left as an exercise)

$ mkdir -p $HOME/.config/fastmask
$ chmod 700 $HOME/.config/fastmask
$ cat << EOF > $HOME/.config/fastmask/config.json
{
  "token": "<your fastmail API token>"
}
EOF
$ chmod 600 $HOME/.config/fastmask/config.json

You can optionally set "prefix" in config.json to cause your generated masked emails to have a constant prefix as opposed to a randomly generated one.

Usage:

General:

$ fastmask <domain>

Example:

$ fastmask example.com

This emits JSON with the following form:

{
  "prefix": "mshqh",
  "domain": "example.com",
  "email": "[email protected]"
}

Which you can deal with programmatically with something like this:

$ fastmask example.com | jq '.email' | tr -d '"'

Related

This project was inspired by https://github.com/dvcrn/maskedemail-cli and https://github.com/fastmail/JMAP-Samples. It is strictly targeted at creating new masked emails. None of the other APIs are covered in order to be as simple as possible.

Installation

Just chmod 755 the program and copy it to your $HOME/.local/bin or where ever you keep your personal binaries. You'll also need Node.js for your platform. Tested on Arch Linux and Android/Termux.

License: MIT

vim:tw=60:

About

Minimal program to create Fastmail masked emails using their JMAP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published