More README-emailler.md

This commit is contained in:
Bobbi Webber-Manners 2020-06-29 23:07:50 -04:00
parent 54794f5926
commit 359eb7b3f0
3 changed files with 74 additions and 5 deletions

View File

@ -5,7 +5,7 @@
The following programs are completely new:
- `POP65` is a Post Office Protocol version 3 (POP3) client for the Apple II with Uthernet-II card.
- `EMAIL` is a simple user interface for reading and managing email. It works together with `POP65`.
- `EMAIL` is a simple user interface for reading and managing email. It works together with `POP65` and `SMTP65`.
- `SMTP65` is a Simple Mail Transport Protocol (SMTP) client for the Apple II with Uthernet-II card.
## Overview
@ -74,12 +74,14 @@ The easiest way to create additional mailboxes is using the `N)ew` command in `E
POP65 is a Post Office Protocol v3 (POP3) client for the Apple II. It requires an Uthernet-II ethernet card and will not work with other interfaces without modification, because it uses the W5100 hardware TCP/IP stack. POP65 is used to download new email messages from a POP3 email server. (I use Dovecot on the Raspberry Pi as my POP3 server, but other POP3 servers should work too.)
Before running `POP65.SYSTEM` for the first time, be sure you have created the email root directory and the `SPOOL` directory, as described above. POP3 will initialize the `INBOX` mailbox, creating `NEXT.EMAIL` and `EMAIL.DB` files if they do not exist.
POP65 runs without any user interaction and performs the following tasks:
- Detect Uthernet-II
- Obtain IP address using DHCP
- Connect to POP3 server using parameters from first three lines of `POP65.CFG`
- Enquire how many email messages are waiting (`STAT` command)
- Connect to POP3 server using parameters from first three lines of `POP65.CFG`. (`USER` and `PASS` commands)
- Enquire how many email messages are waiting. (`STAT` command)
- Download each email in turn (`RETR` command) and store it in the `SPOOL` directory.
- If configured to delete messages on the POP3 server, messages are deleted after successful download (`DELE` command)
- Once all messages have been downloaded, disconnect from the POP3 server (`QUIT` command)
@ -97,8 +99,74 @@ POP65 runs without any user interaction and performs the following tasks:
## `EMAIL.SYSTEM`
EMAIL is a simple mail user agent for reading and managing email.
When the EMAIL application is started it will show the `INBOX` in the summary screen. This shows the following important information for each message:
- Tag - Shows `T` if the message is tagged.
- Read/Unread/Deleted - Shows `*` if the message is new (unread). Shows `D` if the message is markedto be deleted.
- From, To, Date and Subject) for 18 messages at a time.
Main menu commands:
- Up arrow / `K` - Move the selection to the previous message. If this is the first message on the summary screen but this is not the first page, then load the previous page of messages and select the last item.
- Down arrow / `J` - Move the selection to the next message.
- `SPC` / `RET` - Move the selection to the next message. If this is the last message on the summary screen but there are further messages on subsequent pages, then load the next page of messages and select the first item.
- `S)witch` mbox - Switch to viewing a different mailbox. Press `S` then enter the name of the mailbox to switch to at the prompt. The mailbox must already exist or an error message will be shown. You may enter `.` as a shortcut to switch back to `INBOX`.
- `N)ew mbox` - Create a new mailbox. Press 'N' then enter the name of the mailbox to be created. It will be created as a directory within the email root directory and `NEXT.EMAIL` and `EMAIL.DB` files will be created for the new mailbox.
- `C)opy` - Copy message(s) to another mailbox. If no messages are tagged (see below) then the copy operation will apply to the current message only. If messages are tagged then the copy operation will apply to the tagged messages.
- `M)ove` - Move message(s) to another mailbox. If no messages are tagged (see below) then the move operation will apply to the current message only. If messages are tagged then the copy operation will
apply to the tagged messages. Moving a message involves two steps - first the message is copied to the destination mailbox and then it is marked as deleted in the source mailbox.
- `A)rchive` - This is a shortcut for moving messages to the `RECEIVED` mailbox.
- `D)el` - Mark message as deleted.
- `U)ndel` - Remove deleted mark from a message.
- `P)urge` - Purge deleted messages from the mailbox. This command iterates through all the messages marked for deletion and removes their files from the mailbox. A new `EMAIL.DB` is created, compacting any 'holes' where files have been deleted.
- `T)ag` - Toggle tag on message for collective `C)opy`, `M)ove` and `A)rchive` operations. Moves to the next message automatically to allow rapid tagging of messages.
- `W)rite` - Prepare a new blank outgoing email and place it in `OUTBOX` ready for editing.
- `R)eply` - Prepare a reply to the selected email and place it in `OUTBOX` ready for editing.
- `F)orward` - Prepare a forwarded copy of the selected email and place it in `OUTBOX` ready for editing.
- `Q)uit` - Quit from the EMAIL user interface.
### Design Principles
...
### Persistence of Tags and Read/Unread/Deleted Status
...
### Deletion of Messages
...
### Tagging of Messages
...
### Sending of Messages
...
## `SMTP65.SYSTEM`
SMTP65 is a Simple Mail Transport Protocol (SMTP65) client for the Apple II. It requires an Uthernet-II ethernet card and will not work with other interfaces without modification, because it uses the W5100 hardware TCP/IP stack. POP65 is used to send outgoing email messages to an SMTP email server. (I use Postfix on the Raspberry Pi as my SMTP server, but other SMTP servers should work too.)
...
Before running SMTP65 for the first time, be sure to have created the `SENT` mailbox. This must be a 'proper' mailbox, not just a directory. You may create a mailbox using the `N)ew` command in `EMAIL.SYSTEM`.
SMTP65 runs without any user interaction and performs the following tasks:
- Detect Uthernet-II
- Obtain IP address using DHCP
- Connect to SMTP server using parameters from lines 5 and 6 of `POP65.CFG`. (`HELO` command)
- Iterate through each message in the `OUTBOX` mailbox (which is `/H1/DOCUMENTS/EMAIL/OUTBOX` with our sample configuration)
- Scan each message looking for the following headers:
- `To:`
- `From:`
- `cc:`
- Notify the SMTP server of our email address (from `POP65.CFG`). (`MAIL FROM:` command)
- Notify the SMTP server of each recipient listed in `To:` and `From:` headers (`RCPT TO:` command)
- Send the email body to the SMTP sender. (`DATA` command)
- If the message was successfully sent, copy it to the `SENT` mailbox.
- Remove the sent message from `OUTBOX`.
- Iterate until all messages in `OUTBOX` have been sent, and copied to `SENT`. Rejected messages are left in `OUTBOX` where they may be edited and retransmitted.

View File

@ -5,6 +5,8 @@
/////////////////////////////////////////////////////////////////
// TODO:
// - BUG: If messages are deleted, selection can be left on an empty line.
// Move it to top after P)urge.
// - Update To/From if reply or forward
// - Fix terrible scrollback algorithm!!
// - Editor for email composition functions

View File

@ -590,7 +590,6 @@ skiptonext:
continue;
}
printf("RECIPIENTS: %s\n", recipients);
// Handle multiple comma-separated recipients
p = recipients;
while (q = strchr(p, ',')) {