$ ./test.sh
DIRECT (91de65f4): mail to own address
WAITING (11053420): mail to other address needs approval
WAITING (582a6e88): payment within maximum needs approval
REFUSED (edf346d3): deletes are never allowed
REFUSED (5869435e): amount 5000 above maximum 100.0
--- queue
11053420 waiting {"kind": "mail", "to": "boss@work.test", "body": "Full text: line one, line two."}
582a6e88 waiting {"kind": "payment", "to": "shop", "amount": "50"}
--- outbox before approval
{"message": {"body": "note to self", "kind": "mail", "to": "me@home.test"}, "time": "2026-10-05T20:59:41", "via": "direct"}
--- approve mail, reject payment
approved
rejected
already approved
--- outbox after
{"message": {"body": "note to self", "kind": "mail", "to": "me@home.test"}, "time": "2026-10-05T20:59:41", "via": "direct"}
{"message": {"body": "Full text: line one, line two.", "kind": "mail", "to": "boss@work.test"}, "time": "2026-10-05T20:59:41", "via": "approved:11053420"}
