No description
Find a file
2025-12-13 08:58:35 +00:00
config4mutt moved from github to local git-instance 2025-12-12 17:04:47 +01:00
docs moved from github to local git-instance 2025-12-12 17:04:47 +01:00
scripts moved from github to local git-instance 2025-12-12 17:04:47 +01:00
LICENSE.md moved from github to local git-instance 2025-12-12 17:04:47 +01:00
README.md updated README 2025-12-13 09:57:44 +01:00

402.mail

Activating payment required mail. This is a proof of concept.

Roadmap

  • Run mutt client on vps & check incoming mail periodically
  • If new mail includes cashu, forward to inbox
  • If new mail does not include cashu, auto-respond with payment required
  • Change format of forwarded mail

Requirements

The length of each requirement indicates how difficult it is to fulfill.

I. Mutt client.
II A cashu wallet, like Nutshell.
III. A trustworthy mint that is connected to your cashu wallet.
IV. Someome who is willing to send you mail with a micro-payment attached, i.e. payment required mail

Install 402.mail

  1. Clone repo
git clone https://git.tablecloth.dedyn.io/forgejo-admin/402.mail.git
  1. Set permissions
cd 402.mail/scripts/
chmod 700 *.sh
  1. Create sieve rules for your mail account, according to docs/docs.md

  2. Fill in your mail account credentials in muttrc & 402.sh

Dependencies

  1. Working directory
cd 402.mail/scripts/
  1. Install dependencies with apt:
sudo apt install mutt swaks python3-pip pkg-config python3-qrcode python3.10-venv -y
  1. Create venv and upgrade pip:
python3 -m venv cashu_venv
source cashu_venv/bin/activate
python3 -m pip install --upgrade pip
  1. Install Nutshell:
pip install cashu
  1. Test cashu if it does not work, follow Cashu's README
cashu info
  1. Test mutt & use the file in this repo's folder config4mutt/ to overwrite your config located in .mutt/muttrc
mutt --version

Test flight

  1. Open a shell & run
~$ bash run.sh
  1. Open another shell & run
~$ bash mutt.sh
  1. Receive a mail with a cashu string in its body, e.g.
  • header 'Subject: Lets test cashu'
  • body 'This is a test. Will this mail get forwarded to my inbox if I add a micro-payment? cashuBo2F0gaJhaUgAdZ4[...]'
  1. If both loops run.sh & mutt.sh are running, then the above mail should be forwarded to your inbox by your specified alias in the muttrc

GIF of running payment required mail

GIF

ALL INCOMING MAIL is received in your inbox subfolder 402

If a micro-payment is attached, it gets forwarded to the INBOX by the 402.mail.script

Disclaimer

The author is NOT a cryptographer and this work has not been reviewed. This means that there is very likely a fatal flaw somewhere. 402.mail and Cashu are still experimental and not production-ready.