Author: Manos Pitsidianakis [manos@pitsidianak.is]
Hash: 9dc62504c654b1a0bc80e655f451e8e925169208
Timestamp: Fri, 19 May 2023 08:28:42 +0000 (1 year ago)

+77 -0 +/-1 browse
docs: add scratchpad.md for ideas,features,notes
1diff --git a/docs/scratchpad.md b/docs/scratchpad.md
2new file mode 100644
3index 0000000..3106865
4--- /dev/null
5+++ b/docs/scratchpad.md
6 @@ -0,0 +1,77 @@
7+ # Ideas, plans, thoughts on `mailpot`.
8+
9+ It'd be better if this stuff wasn't on an issue tracker like gitea's or
10+ github's but committed in the repository.
11+
12+ Discussion about these notes can take place in the mailing list,
13+ [`<mailpot-general@meli.delivery>`](https://lists.meli.delivery/list/mailpot-general/).
14+
15+ In no particular order:
16+
17+ **Table of contents**:
18+
19+ * [Possible Postfix integrations](#possible-postfix-integrations)
20+ * [Setup docker container network with postfix for testing](#setup-docker-container-network-with-postfix-for-testing)
21+ * [Add NNTP gateways](#add-nntp-gateways)
22+ * [Add MIME type filter for list owners](#add-mime-type-filter-for-list-owners)
23+ * [Add `convert_html_to_plaintext` filter](#add-convert_html_to_plaintext-filter)
24+ * [Use mdoc instead of roff for manpages](#use-mdoc-instead-of-roff-for-manpages)
25+ * [Add shell completions with `clap`](#add-shell-completions-with-clap)
26+ * [Make complex database logic and/or complex migrations with user defined functions](#make-complex-database-logic-andor-complex-migrations-with-user-defined-functions)
27+ * [Implement dtolnay's mailing set concept](#implement-dtolnays-mailing-set-concept)
28+
29+ ## Possible Postfix integrations
30+
31+ - local delivery with `postdrop(1)` instead of SMTP
32+ - log with `postlog(1)`
33+ - sqlite maps <https://www.postfix.org/SQLITE_README.html>
34+
35+ ## Setup docker container network with postfix for testing
36+
37+ Beyond integration tests, we need a real-world testcase: a bunch of user postfixes talking to a mailing list postfix.
38+ This can be done with a docker setup.
39+ A simple debian slim image can be used for this.
40+ Reference for postfix on docker: <https://www.frakkingsweet.com/postfix-in-a-container/>.
41+ It'd be great if we could use a Rust based solution as well, with something like <https://github.com/fussybeaver/bollard>.
42+
43+ ## Add NNTP gateways
44+
45+ TODO
46+
47+ ## Add MIME type filter for list owners
48+
49+ TODO
50+
51+ ## Add `convert_html_to_plaintext` filter
52+
53+ TODO
54+
55+ ## Use mdoc instead of roff for manpages
56+
57+ [`mdoc` reference](https://man.openbsd.org/mdoc.7)
58+
59+ Progress:
60+
61+ - Got ownership of `mdoc` on crates.io.
62+ - Forked `roff` crate to use as a basis: <https://github.com/epilys/mdoc>
63+
64+ ## Add shell completions with `clap`
65+
66+ Probably with <https://docs.rs/clap_complete/latest/clap_complete/>
67+
68+ ## Make complex database logic and/or complex migrations with user defined functions
69+
70+ Useful projects:
71+
72+ - <https://github.com/facebookincubator/CG-SQL/tree/main>
73+ - <https://github.com/epilys/vfsstat.rs>
74+
75+ ## Implement dtolnay's mailing set concept
76+
77+ See <https://github.com/dtolnay/mailingset/tree/master>
78+
79+ > A mailing list server that treates mailing lists as sets and allows mail to
80+ > be sent to the result of set-algebraic expressions on those sets. The union,
81+ > intersection, and difference operators are supported. Sending mail to a set
82+ > operation involves specifying a set expression in the local part of the
83+ > recipient email address.