Giter Club home page Giter Club logo

emailler's Introduction

Apple II Email and Usenet News Suite

emai//er-logo

Introduction

Emai//er is an email and Usenet news software package for the Apple //e Enhanced or Apple IIgs. An Uthernet-II ethernet card is required for sending and receiving messages.

Key Features

  • Friendly user interface.
  • Email reception using POP3 protocol.
  • Email transmission using SMTP protocol.
  • Gateway to allow access to encrypted services such as GMail.
  • Decoding of Multipurpose Internet Mail Extension (MIME) encoded message bodies and attached files.
  • Composing MIME emails with attached files.
  • Usenet newsgroup subscription.
  • Posting of Usenet news articles.
  • Includes a fully-featured full screen text editor for message composition.

Emai//er Suite

Emai//er is implemented as a number of ProDOS executables, each of which performs one distinct function. EMAIL.SYSTEM provides the main user interface, and invokes the other executables as needed. EMAIL.SYSTEM is automatically reloaded when the helper program completes its function.

  • EMAIL.SYSTEM is a simple user interface for reading and managing email.
  • EDIT.SYSTEM is a full screen editor for composing email and news messages. It may also be used as a general purpose ProDOS text file editor.
  • POP65.SYSTEM is a Post Office Protocol version 3 (POP3) client for the Apple II with Uthernet-II card. This is used for retrieving incoming email messages.
  • SMTP65.SYSTEM is a Simple Mail Transport Protocol (SMTP) client for the Apple II with Uthernet-II card. This is used for sending outgoing email messages.
  • NNTP65.SYSTEM is a Network News Transport Protocol (NNTP) client for the Apple II with Uthernet-II card. This is used for retrieving Usenet news messages.
  • NNTP65UP.SYSTEM is a Network News Transport Protocol (NNTP) client for the Apple II with Uthernet-II card. This is used for transmitting outgoing Usenet news messages.
  • ATTACHER.SYSTEM is used for creating multi-part MIME messages with attached files.
  • REBUILD.SYSTEM is a utility for rebuilding mailbox databases, should they become corrupted. This can also be used for bulk import of messages.
  • DATE65.SYSTEM is a Network Time Protocol (NTP) client which can be used for setting the system time and date if you do not have a real time clock.
  • PRINT65.SYSTEM allows text file to be printed to a network-attached printer that supports the Hewlett Packard Jetdirect protocol.

The following diagram shows the various executables that form the emai//er suite and how they execute one another. Note how EMAIL.SYSTEM serves as the hub from which all the other programs may be invoked.

Emai//er Executables

Overview

The software has been designed to be modular, which allows new protocols to be added later for handling incoming and outgoing mail. POP3 was selected as the email download/ingest protocol because it is simple and there are many available server implementations. SMTP was chosen as the outgoing protocol due to its almost universal adoption for this purpose. Once again, there are many server-side implementations to choose from.

A few design principles that I have tried to apply:

  • Simplicity This software runs on the Apple //e enhanced with 128KB of total system memory. It is important that it be as simple and small as possible. The code is written in C using cc65, which allows more rapid evolution when compared to writing in assembly language, at the expense of larger code which uses more memory.
  • Modularity Where it makes sense to do so, I split the functionality into separate modules in order to make the best use of available memory.
  • Speed The software should make the most of the limited hardware of the Apple //e in order to allow speedy browsing of emails without needing much processor or disk activity.
  • Avoidance of Limits I tried to avoid the imposition of arbitrary limits to message length or the number of messages in a folder.
  • Veracity The software should never modify or discard information. Incoming emails are saved to disk verbatim, including all headers. The system hides the headers when displaying the emails, but they are available for inspection or further processing. The only change that is made to incoming messages is to convert the CR+LF line endings to Apple II CR-only line endings.

Acknowledgment

POP65.SYSTEM and SMTP65.SYSTEM are based on Oliver Schmitd's excellent IP65 TCP/IP framework (in particular they follow the design of WGET65.SYSTEM.) Without IP65, this software would not have been possible.

System Requirements

The minimum system requirements are as follows:

  • Apple //e Enhanced or Apple IIgs computer (ROM01 and ROM03 supported)
  • Uthernet-II ethernet card
  • Mass storage device such as CFFA3000, MicroDrive/Turbo or BOOTI

Recommended optional hardware:

  • A CPU accelerator is recommended if you plan to handle large volumes of email or Usenet messages.
  • If using an Apple //e, a real time clock such as No Slot Clock (NSC) or Thunderclock is recommended. The Apple IIgs has a built in real time clock. If no RTC is available, DATE65.SYSTEM may be used to set the ProDOS date and time.
  • If using an Apple //e, adding a RamWorks style memory expansion will allow EDIT.SYSTEM to open many files simultaneously and also to handle very large files. Without the RamWorks expansion, EDIT.SYSTEM can handle a maximum file size of around 46KB.

Emai//er has been extensively tested using ProDOS 2.4.2. However, it should not be a problem to run it under other versions of ProDOS.

Uthernet-II Slot

The default slot is 5. If you have your card in another slot then create a file called ethernet.slot using EDIT.SYSTEM with your slot number on the first line.

Transport Level Security (TLS)

One problem faced by any retrocomputing project of this type is that Transport Layer Security (TLS) is endemic on today's Internet. While this is great for security, the encryption algorithms are not feasible to implement on a 6502-based system. In order to bridge the plain text world of the Apple II to today's encrypted Internet, I have set up a Raspberry Pi using several common open source packages as a gateway.

The Raspberry Pi uses Fetchmail to download messages from Gmail's servers using the IMAPS protocol (with TLS) and hands them off to Postfix, which is used at the system mailer (MTA) on the Pi. I use Dovecot as a POP3 server to offer a plain text connection to the POP65.SYSTEM application on the Apple II. For outgoing messages, I configured Postfix to accept plain text SMTP connections from SMTP65.SYSTEM on the Apple II and to relay the messages to Gmail's servers using secure SMTPS.

Mailboxes

Each mailbox consists of the following:

  • A directory under the email root, and within this directory
  • Email messages are stored on per file, in plain Apple II text files (with CR line endings) named EMAIL.nn where nn is an integer value
  • A text file called NEXT.EMAIL. This file initially contains the number 1. It is used when naming the individual EMAIL.nn files, and is incremented by one each time. If messages are added to a mailbox and nothing is ever deleted they will be sequentially numbered EMAIL.1, EMAIL.2, etc.
  • A binary file called EMAIL.DB. This file contains essential information about each email message in a quickly accessed format. This allows the user interface to show the email summary without having to open and read each individual email file. This file is initially empty and a fixed size record is added for each email message.

The easiest way to create additional mailboxes is using the N)ew command in EMAIL.SYSTEM.

POP65.SYSTEM knows how to initialize INBOX but the directory must have been created first.

Note that SPOOL is not a mailbox, just a directory. OUTBOX is also not a 'proper' mailbox - it has NEXT.EMAIL but not EMAIL.DB.

If the EMAIL.DB file for a mailbox gets corrupted, it will no longer be possible to browse the summary and read the messages in EMAIL.SYSTEM. The utility REBUILD.SYSTEM can be used to rebuild the EMAIL.DB and NEXT.EMAIL files for an existing mailbox (see below.)

Detailed Documentation for Email Functions

Please refer to the linked documents for detailed instructions on how to configure emai//er as an email client.

Detailed Documentation for Usenet Functions

Emai//er supports receiving and sending of Usenet news articles. It has been tested extensively using the Eternal September NNTP server. Usenet newsgroups are mapped to mailboxes within EMAIL.SYSTEM. A new mailbox is created for each subscribed newsgroup.

Please refer to the linked documents for information about the Usenet functionality in emai//er.

emailler's People

Contributors

bobbimanners avatar digarok avatar gregwildman avatar groessler avatar jonnosan avatar oliverschmidt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emailler's Issues

EMAIL: Handle '8bit' encodings better

Right now I pass '8bit' codings through unchanged.

Non printable chars can cause the display to go crazy so I probably should be filtering these.

EMAIL: Need to save another ~200 bytes

Running out of memory doing A)rchive. Works when there is one less row in the summary screen, so I know we are <406 bytes over the limit! We have already saved a couple hundred bytes so ~200 bytes left to scrunch!

EMAIL: Option to change name of downloaded attachment

When an attachment it received it can only be saved into the filename specified in the original email.

Some filenames do not comply with ProDOS naming rules (15 chars, alphanumeric and periods, no initial numbers). In these cases it is not possible to save the file.

It would be useful to be able to override the name specified in the email and provide one acceptable to ProDOS (or just save the attachment somewhere else.)

EMAIL: Make MIME separators more robust

Right now, any line beginning "--" is considered a MIME separator.

Would be more robust if it looked at 3rd char also and only accepted the line as a separator if it is not '-'.

EMAIL: Purge seems to be broken

When I try to purge deleted messages I get 'Can't open /DATA/EMAIL/mbox/EMAIL.DB.NEW'. This is with v2.1.0 under development (develop branch.) Not sure what I busted ... too many open files maybe?

EMAIL: email pager does not use MIME headers properly

The email_pager() function does not look at the MIME headers ... just embedded MIME sections. The code for reply / forward at least tries to do this (not sure it works properly though).

Test with Usenet articles, some of which are encoded as quoted-printable.

EMAIL/EDIT: Improve argument passing

Right now, EDIT.SYSTEM assumes that if it was called with any arguments it was by EMAIL.SYSTEM. This is not necessarily the case. Also, in this case it always asks whether to attach files, and if so calls ATTACHER.SYSTEM.

Add additional parameters to make this explicit. Perhaps:

  • EDIT.SYSTEM path/to/filename - Just open the file. Quit to ProDOS.
  • EDIT.SYSTEM emailrecv path/to/filename - Open the file and quit to EMAIL.SYSTEM
  • EDIT.SYSTEM emailsend path/to/filename - Open the file and ask about attachments on quitting. Call either ATTACHER.SYSTEM or EMAIL.SYSTEM

EMAIL: Formatting issue in email_pager()

email_pager() is misformatting the User-Agent header. It is fine in the actual message - this is just a display issue. It looks like it is confused by the long preceding line.

EMAIL: Function for deleting lots of messages quickly

Would be really handy for cleaning up Usenet news group folders when we get short of disk space. Right now it is very tedious. Maybe we need a function to mark all messages from current to end as deleted. Will need some serious "Are you sure?" prompting.

EMAIL: Improve UTF-8 handling

We can't display UTF-8 (other than the ASCII subset) but we can understand the multibyte encoding properly and at least print the right number of '#' characters :)

EDIT: Files saved in wrong directory

  • In buffer 1, open a file such as /FOO/X.TXT.
  • In buffer 2, open a file in a different directory such as /BAR/Y.TXT.
  • Now go back to buffer 1 and save.
  • File is saved to /BAR/X.TXT

When loading a file using the file_ui() file browser it must return full path.

EDIT: OA-O 'Open File' with unsaved changes

Should prompt whether to save unsaved changes, but instead goes straight into 'Name File' file_ui() screen. This is confusing as the user may not notice the title and inadvertently save over the file they are trying to open!!

ATTACHER: Use new file_ui()

Whenever requesting a filename, embed the file_ui() from edit.c.

  • In ATTACHER: When asking for the file to attach
  • In EMAIL: When asking the name to save an attachment to.

EMAIL: Handle Content-Type: header

I do not handle the Content-Type header (global email header) - we do handle this for individual multipart MIME parts, just not when it applies to whole document.

NNTP65: Kill file

It would be useful to be able to filter out reception of messages from an address listed in a killfile.

In particular, I want this to filter out spam in comp.sys.apple2!

EDIT: No longer builds unless AUXMEM is set

The code no longer builds unless AUXMEM is set.

Either remove the conditional compilation so code is only for aux memory (//e 128K and better), or fix the code so it works once again without aux memory (with editor buffer in main memory).

EMAIL: Bug in `NEXT.EMAIL` handling

When I refactored the code that obtains and updates the next email number I introduced a bug. The result of this is EDIT.SYSTEM gets called with the post-increment value of the email number, not the pre-increment value. Not surprisingly it can't find the file!

EMAIL/EDIT: Do not offer to run ATTACHER for news articles (only email)

Right now when quitting EDIT.SYSTEM it will ask about attachments regardless of whether the document being edited is an email or a news article. ATTACHER.SYSTEM hard-codes the OUTBOX directory so will only work for email, not news. Easiest way around this is to disable attachments for news (and update the documentation accordingly.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.