Files
lotherkandClaude Sonnet 5.5 c6baf4eca8 docs/reference/dtmail.txt: what dtmail and libDtMail can do (t0127, step 2)
POP2/POP3/APOP/IMAP/AUTO classes are a RETRIEVAL of INBOX into the local mailbox
(append callback, retrieve_messages, ptrans_* like a fetch agent): no remote
folders, no sync, no IDLE; no TLS or STARTTLS anywhere in programs/dtmail; the
retrieval password sits in ~/.mailrc as a reversible uuencode-style encoding
(DtMailRc.C:314), no key.  Sending is the local sendmail (RFCTransport.C
launchSendmail), no SMTP client.  Consequences for the mail window are listed;
the windows' own code (RoamMenuWindow.C, SendMsgDialog.C) is not read yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:52:14 +00:00

62 lines
3.9 KiB
Plaintext

What dtmail and libDtMail can do -- read in the source (t0127, step 2)
Read 2026-11-14 in ext/src/mcde/programs/dtmail (include/DtMail, libDtMail/
Common and RFC, dtmail/). Nothing here was run; "not there" means a search of
the whole programs/dtmail tree found nothing (the searches are named).
1. Fetching mail from a server: a DOWNLOAD into the local mailbox, not a client
- libDtMail/Common has one class per protocol: APOPServer.C, AUTOServer.C,
IMAPServer.C, POP2Server.C, POP3Server.C, on DtMailServer.C. The protocol
names in include/DtMail/DtMailServer.hh: NONE, APOP, AUTO, IMAP, POP2, POP3;
the folder it asks for is DTMAS_INBOX "INBOX"; a server timeout of 10 s.
- DtMailServer takes an append callback (constructor: DtMailServer(char*,
Session*, MailBox*, DtMailAppendCallback, void*)) and has retrieve_messages;
the protocol part is ptrans_authorize, ptrans_delete, ptrans_msgisold,
ptrans_fldstate_expunge, ptrans_fldstate_read. The shape of a retrieval
agent: fetch the new messages of INBOX, append them to the local mailbox,
delete them on the server afterwards if asked (the "remove after delivery"
property, DtMailServer.C:~109).
- So there are no remote folders, no folder list of the account, no sync of
read/answered state, no drafts or sent mail on the server. What a mailbox
sidebar can show is LOCAL folders.
- Not there: IMAP IDLE (grep -rn 'IDLE' with case: nothing), TLS or STARTTLS
(grep -rn -i 'starttls\|\bssl\b\|\btls\b' programs/dtmail: nothing) -- the
password and the mail cross the network in the clear -- and OAuth.
2. The password of a retrieval account
- DtMailServer.C:105-108 reads DTMAS_PROPKEY_PASSWORD from the user's mailrc
with decrypt = DTM_TRUE. The "encryption" is DtMailRc.C:314-315:
ENCRYPT(c) = ((c) & 077) + ' ' + 2, the uuencode alphabet shifted by two,
with a length character in front (encryptValue/decryptValue, :326ff). That
is an encoding anyone can undo, no key: the password is as good as in the
clear in ~/.mailrc. (The task's rule: no password in argv, the account
password later from dtkeychain.)
3. Sending: the local sendmail program
- There is no SMTP client: grep -rn -i 'smtp' in programs/dtmail finds nothing.
RFC/RFCTransport.C builds an argument list and runs sendmail
(launchSendmail, :733 and :502; "the name of the sendmail program" is looked
up first, :738). Sending therefore needs a sendmail-compatible program
configured on the computer (on NetBSD the base's postfix; relay host,
authentication and TLS are ITS configuration, not dtmail's).
4. Local mailbox formats (file names in libDtMail/RFC): RFCMailBox.C with the
RFC message, MIME and envelope code (an mbox), and SunV3.C/SunV3.hh (the
Sun V3 format of the old mailtool).
5. What follows for the mail window of t0127, as a reading and not a decision
- dtmail stays the program for LOCAL mail plus POP3/IMAP-as-download; the
sidebar of the task (Inbox, Drafts, Sent, Junk, Trash and the account's
folders) is local folders, and "drag a message to a folder" is a move in
the local store.
- Accounts that need a live IMAP, TLS or OAuth (most providers today) are
beyond dtmail as it is: the task's own answer stays (Thunderbird remains the
package for accounts dtmail cannot do). Adding TLS to the retrieval code
would be a piece of work of its own, and until then the "Internet Accounts"
pane should not offer dtmail for a server over the internet without saying
the connection is not encrypted.
- "New mail without polling every second": the retrieval has no IDLE; the
task's 5-minute timer is what is possible.
- Not looked at: dtmail/RoamMenuWindow.C and SendMsgDialog.C (the windows to
change), what the message list can sort by, and whether libDtMail reads
mbox files larger than memory.