Mail Systems (was Re: mapping files to objects)

Adam Alpern
Wed, 7 May 1997 11:07:48 -0700

-- Chris Bitmead:
;; >you're storing files in UNIX mail format, that implys that you're
;; >getting your mail via UNIX sendmail. That means you're running a UNIX
;; >system, so you might as well read your mail using a UNIX program.

No it doesn't - see my comments below - I definitely want to process
my existing "legacy" email with lisp programs to do smart things with

-- Mike McDonald:
;;   It's the chicken and the egg problem. A mail reader is of no use
;; without an SMTP agent. A SMTP agent isn't of any use without a mail
;; reader. So, inorder to break the deadlock, you start by using an
;; existing SMTP agent (aka sendmail), and write the reader. Then someone
;; writes the agent.

Well, only if you're interested in getting a running mail system
immediately. It really isn't a chicken and egg problem though, because
there's a third factor - The Mail.

You've probably got tons of mail sitting around in existing formats
(I've got about 30 megs of mbox format mail, far more in (ick) MS
Exchange message store format). Start by desiging a representation for
the mail - I'd probably use a defstruct, since you get a LISP-readable
text format for free - you can save messages to ASCII files until we
have a POS, then you can just save the objects as objects, instead of
in the readable form. OTOH, I want the advantages of CLOS, so I'd
probably make it a set of classes and write a reader macro to read
them from a stream.

[ Actually, there's nothing at all to stop you from doing this without a
POS - I want any POS to have a stream interface for writing large
amounts of data - generic I/O is a wonderful thing. ]

THEN - then you can write a SMTP agent which gets incoming mail and
dumps it into defstructs, and a reader to display it to the user, hook
up a pattern-matcher to automatically route mail to mailboxes, etc...

-- Chris Bitmead:
;; >But why do you want to read such files? No self-respecting LispOS
;; >would store mail in UNIX mail format.

Yes, but you probably will want to read all your old, existing mail
into the new LISP mail format so you can do cool things with it.


Adam Alpern <>