mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-29 01:38:10 -08:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
4.2 KiB
4.2 KiB
Future work
Ideas not yet started, with what is known of them.
Doors for 3270 callers: an ANSI to 3270 layer
Status: being thought about; other ways to solve it may win.
Doors are ANSI programs, so 3270 callers do not see the Doors menu. A layer between a door and a 3270 could show them:
- Emulate, then draw. A small ANSI-BBS emulator (80x25: cursor
movement, ED/EL, SGR, save/restore cursor, and answers to
ESC[6n, which many doors use to detect ANSI) keeps the door's screen; every ~50 ms the cells that changed go to the 3270 as SBA/SA orders and characters (Write with keyboard restore). go3270-sec already has the raw writes, the query replies and Load PS. - Characters. ASCII and Latin-1 letters are in EBCDIC CP037. What CP437 has beyond them (box drawing single/double/mixed, ░▒▓█ ▀▄▌▐, ☺♥♦♣♠•◘○ and arrows: about 70 glyphs) goes in one programmed-symbol set, drawn by program at the terminal's cell size (from its query reply), as the logo is: no font file. Each cell selects the set with an SA character-set attribute, which takes no screen position. Without programmed symbols (x3270, wc3270, Vista): GE / CP310 line drawing and ASCII for the blocks.
- Colours. Seven 3270 colours for ANSI's eight; bright and normal the same (or the intensified attribute for bold); ANSI backgrounds by the SA background-colour attribute where the emulator has it (PCOMM, it seems), else reverse video. Blink and underscore map directly.
- Input: the hard part. A 3270 sends nothing until Enter, a PF/PA key or Clear. An unformatted screen lets the caller type at the door's cursor; on Enter the BBS diffs the screen against what it drew to find the keys, and sends them and a CR. PF keys for arrows, PgUp/PgDn, Home/End; PA1 for Esc; an empty Enter for a lone CR. Menu-driven doors (LORD, BRE, Usurper, TradeWars) would be fine; hotkey and real-time ones sluggish.
- Size. Doors want 25 lines: a model 3 (32x80) or bigger fits, with room for a help line; a model 2 (24x80) loses or scrolls one.
- Testing. The emulator, diffing and data stream by unit tests; the fallback path with s3270; a whole DOS door session by a scripted 3270 client. Programmed symbols only against a fake terminal here: PCOMM to be tried by hand.
- Shape. An option on a
[door](tn3270 = yes) that shows the door on the 3270 Doors menu and puts this layer between them.
Email: POP3, IMAP and SMTP
Status: pinned; scope not chosen.
Private mail already lives in SQLite, one inbox per user with a read flag;
NNTP and FTP already share the BBS's login, throttling and TLS modes, and
internal/news already makes and safely decodes RFC 5322/MIME messages.
- POP3 (RFC 1939, STLS): small. The inbox is the mailbox, a mail's id its UIDL, DELE deletes.
- IMAP (RFC 3501/9051): moderate, with emersion's go-imap server (v2 is beta: pin it). INBOX is the inbox, \Seen the read flag; new: a Sent folder (mail is kept only in the recipient's inbox today), stored flags, UIDVALIDITY.
- SMTP, three jobs:
- submission (587, AUTH required, so never an open relay) to BBS users and FidoNet netmail: small, with emersion's go-smtp;
- inbound from the internet: easy code, hard operations (MX, port 25 often blocked, spam, SPF/DKIM/DMARC checks);
- outbound to the internet: queue, retries, bounces, DKIM, SPF/DMARC, rDNS, IP reputation: most of the long-term trouble.
- Suggested shape: phase 1, POP3 + IMAP + submission for BBS users; phase 2, internet mail through Postfix: inbound delivered to the BBS by LMTP (go-smtp does LMTP), outbound by a smarthost. The BBS as its own internet MTA is possible but not advised.
- To decide: addresses for names with spaces (
alice.smith@domain, as news posters' already are) and collisions; attachments (kept whole for POP/IMAP, text part plus a list of attachments on terminals, a size limit);user@domainas a third recipient form beside user names and FidoNet addresses (those have:and/); app passwords (optional). - Testing: Python's imaplib, poplib and smtplib; Postfix (Ubuntu) for LMTP and the smarthost.