Home
About
Agents
CGIs
Mac
Macros
Misc
Stories
Suites
Websites
Outline
Frontier
Scripting

Mail Shop Suite

Following a discussion on the Frontier-talk list in June 1997, several people are working on mail servers running in Frontier. Recent experiments with EIMS show that a faster Mac-based mail server is possible. Maybe a Frontier-hosted one will have competitive performance? It'll be interesting to see.

Anyway, people are asking how to do a mail storage system in Frontier, and I realized that I have a full one with hooks into FileMaker. I think it's an elegant design, done in August 1996, and did a search and found that it's not in distribution anywhere on the scripting.com server. So here it is, baked into this fat page, with documentation following.

It was a work-in-progress when I moved onto other things. The docs and scripts are as-is. Full source code is provided. If you're implementing a mail server in Frontier, feel free to scavenge.

Dave Winer
Thu, Jun 5, 1997

suites.mailShop

A full rewrite of the MailShop suite. An attempt at mail nirvana. Finally! I'm ready for it, with hundreds of messages coming in my inbox every day, and dozens going out. My conventional emailer is out of gas. It was never designed to handle the kind of load that I'm pushing thru it.

What I want. Multiple indexes, sorted to that I can see all messages pertaining to a specific subject, or from a particular person, or any combination of attributes. An efficient storage system so that messages are only stored once, and not using the inefficient blocking strategy that the Mac file system uses (a one-sentence email message can take up to 16K on my disk. The Mac file system was never designed for this kind of load either.)

I also want to be able to search my back-email as I would search the web using a search engine like Alta Vista. I accomplish this using FileMaker. The new mail for each day is indexed at 2AM while I'm sleeping. This fits my workstyle. I'll be able to find today's messages because they're frontmost in my mind and accessible from the top of the outline structure. The ones I need indexing for are the ones I wrote two months ago. I remember who I sent it to, or can think of a keyword, but can't easily navigate to it thru the outline structure.

One more big feature -- I want the option of flowing any number of outlines to a website so other people can access them. The rendering for these pages should be done at 2AM too.

The key is to reorganize the power of today's machines so they are more effective at serving the needs of intense email users.

No change in habits

It's really important that this approach doesn't force you to switch from the emailer you use now (assuming you use Eudora). I'm not ready to switch yet. Neither are you (probably). So this new software hooks into Eudora, using a defacto standard set of Apple Events that can be supported by any emailer. It's archiving the messages as you send and receive them. By choosing commands from Eudora's menu bar, you can quickly look at your outlines, read archived messages, and use the search engine.

However, if this environment proves to be a natural way to read and write email, we can hook into faster protocols coming soon via direct TCP from Frontier.

Another way of looking at it

It's like data mining for your email. All kinds of information flows thru your mailbox. We capture more of it. Things like web and email addresses. And by organizing email in outlines, according to your rules, and making it searchable in a database, we give you the tools to find patterns and valuble information isn't quite so buried anymore.

Key concept -- The "Router" Outline

The Router outline is the center of Mail Shop's intelligence. From this outline, you control where each incoming and outgoing message will be routed to. That's where it gets its name from.

It's an outline. Each main head contains a condition. If the condition is true, the message is routed to the mailbox listed subordinate to the main head.

Here's what a simple router outline looks like:

direction == "in"

	"in"

direction == "out"

	"out"

string.lower (recipient) contains "frontier-talk"

	"frontier-talk"

You can have as many conditions as you want. For each condition that is true, the mailbox it points to will receive a pointer to the message. When you want to look at all the messages from the frontier-talk list, for example, you can just open the outline from the MailShop menu.

Each mail message you send or receive flows thru the router. If you're sending it, "direction" will equal "out"; if you're receiving, it will equal "in". In the third condition, "recipient" is a bit of information about the mail message that's being routed.

Other bits of information about the mail message are available to the router. They are, in alphabetic order:

  • bcc -- the mail addresses of any "blind copy" recipients of the message.

  • cc -- the mail addresses of people who were cc'd on the message.

  • date -- the date the message was received, it's a binary date, so you can do date comparisons on this value.

  • msgnum -- each message that enters the router is assigned a number, that increases by one for each message. It's used as an index into the user.mailshop.messages table.

  • recipient -- the mail address of the recipient of the message. It might not be you! Some list servers set it up so they're the recipient of the message.

  • sender -- the email address of the person or list that sent the message.

  • subject -- the subject of the message.

  • text -- the body text of the message.

Builds on standards

  • Eudora message filtering Apple Events. See system.verbs.traps.CSOm for the Frontier side of this protocol.

  • FileMaker scripting features. See mailShop.fileMaker table for scripts that connect to FileMaker's Apple Events.

Features/Preferences

  • Mail address capture -- Since all email addresses flow thru the scripts, we can capture them in an outline. So if you've ever received an email from someone, you can easily find their address in the database. This outline is stored at user.mailShop.contacts.

  • Web address capture -- TO DO -- Lots of email address contain web addresses. We accumulate them in user.mailShop.urls outline. You can cmd-/ on any of these lines to open the pages in your web browser.

  • Background processing -- You can set up MailShop to process incoming messages in the background after a period of idleness on your computer. To access this feature you must have the IdleTime init installed. It keeps track of the number of seconds since the last keystroke or mouse movement or disk insertion. Set user.mailShop.prefs.smallIdle to the number of seconds you want MailShop to wait before processing mail. Set it to 0 (the default) if you want mail to be processed immediately.

  • Do you want to work primarily in Frontier? -- Then you should set user.mailShop.prefs.openOutlines to true. When Frontier processes mail, it opens the outline windows as it adds items to them. Put your cursor on one of the lines and press Cmd-E to read the message text. Choose Reply from the MailShop menu and Eudora comes to the front with a new message window open, in reply to the message you were reading.

How to install

After importing the suite from this page open mailShop.importSuite and click on Run. It sets up user.mailShop and installs an agent at system.agents.mailShop.


This is a fat web page containing suites.mailShop. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 6/5/97; 10:14:48 AM and it was last built on 9/11/98; 9:23:37 AM. Webmaster: dave@userland.com.