No description
|
|
||
|---|---|---|
| config4mutt | ||
| docs | ||
| scripts | ||
| LICENSE.md | ||
| README.md | ||
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
- Clone repo
git clone https://git.tablecloth.dedyn.io/forgejo-admin/402.mail.git
- Set permissions
cd 402.mail/scripts/
chmod 700 *.sh
-
Create sieve rules for your mail account, according to
docs/docs.md -
Fill in your mail account credentials in muttrc & 402.sh
Dependencies
- Working directory
cd 402.mail/scripts/
- Install dependencies with apt:
sudo apt install mutt swaks python3-pip pkg-config python3-qrcode python3.10-venv -y
- Create venv and upgrade pip:
python3 -m venv cashu_venv
source cashu_venv/bin/activate
python3 -m pip install --upgrade pip
- Install Nutshell:
pip install cashu
- Test cashu if it does not work, follow Cashu's README
cashu info
- Test mutt & use the file in this repo's folder config4mutt/ to overwrite your config located in .mutt/muttrc
mutt --version
Test flight
- Open a shell & run
~$ bash run.sh
- Open another shell & run
~$ bash mutt.sh
- 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[...]'
- 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
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.
