I've been using OpenWRT on WNDR3700v4 as my lan router for several years.
More recently I've become less happy with web email services (eg. gmail, yahoo email) for sorting, managing and searching my email. My goal is to provide TUI (ala ncurses like midnight commander) email access for 2-3 computers on my lan.
OpenWRT seems to be a viable way to provide access to a single user via ssh to Alpine. After some research, it seems that I can attach a HDD via USB for mail storage on the OpenWRT router and somehow install and configure alpine and fdm to pull emails (via IMAP?) from web based email providers. Also to use Alpine for sending via SMTP. I have OpenWRT 23.05.5 r24106 installed. One goal I have in mind is to sort emails by matches of sender/domain and text (within body or subject) ordered by arrival time and easily archiving those messages to a freshly created local mailbox which is named based upon the search criteria plus text which indicates the range of time/date of the messages.
Since HDD storage is so vast and cheap (500Gbyte SATA drives= $10), I never expect to erase any mail in the future.
While I don't see OpenWRT documents about fdm, I found
https://wiki.archlinux.org/title/Fdm which gives a few hints.
I feel uncertain about what roles Alpine, fdm, cron, systemd timer(?) and wrapper scripts(?) play and how fdm mail filtering rules operate.
Can someone suggest a good overview to explain these (unknown to me) things?
Thanks!