emperor: (Default)
Add MemoryShare This Entry
posted by [personal profile] emperor at 04:44pm on 04/01/2006 under ,
I've used a reasonable number of MUAs in my time, and none of them do exactly what I want. So, I thought I should produce a list of what I want in an MUA, in the hopes that either someone's written one that does all these things, or that I'll get annoyed enough to hack one up in python or something.


Decent IMAP support
That means things like dealing with other mailers accessing the account underneath you, sensible caching behaviour, and so on

Choice of editor
For me, this means emacs, but it should be possible to plug it into anything you fancy, possibly including whatever the text-editing widget your GUI toolkit includes

Ability to arbitrarily edit headers
If I want to send email as From: foo@bar.invalid, X-Tickybox: nooo, then it should let me. Maybe checking for valid syntax would be sensible, though ;)

Understand mail messages fully
(see my recent rant about Mail.app, for an example of how not to do this

Sensible MIME handling
That means sensible default behaviour, and easy configurability. Mail.app falls down in this regard as regards text/rtf, for example

Support submission, and other security enhancements
...and behave correctly wrt configuration (see [livejournal.com profile] fanf's rant)

Console operation
A GUI would be nice, but I really want to be able to ssh in and run my mail

Virtual-folder like things
I really like VMs virtual folders, and want something similar in any other mailer

Deal gracefully with large mailboxes
VM's on-disk format sucks rocks really badly with a years worth of my mail

Ability to search across sets of mailboxes
...but with better than "search all my mail" granularity



Other things like scriptability would be good, but I could live without them. I'm sure I'll think of some more just after I hit "Update", too.
Mood:: 'geeky' geeky
There are 25 comments on this entry. (Reply.)
 
posted by [identity profile] new-brunette.livejournal.com at 05:07pm on 04/01/2006
How does mutt measure up against that lot? It's been a while since I've used it, but it certainly ticks some of those boxes.
 
posted by [identity profile] marnanel.livejournal.com at 05:09pm on 04/01/2006
What you said.
emperor: (Default)
posted by [personal profile] emperor at 05:19pm on 04/01/2006
I refer you to [livejournal.com profile] matthewp's comment.
 
posted by [identity profile] mattp.livejournal.com at 05:13pm on 04/01/2006
Choice of editor... For me, this means emacs,
Due to the startup time of emacs, this requirement alone leads me to believe that it should be one in written in elisp.

FWIW, I too am on the lookout for an alternative MUA. I use mutt and am very happy with it, but would like a couple of extra features:
1) Folder overview, showing how many unread/total messages exist in all known-about folders
2) Ability for multiple user profiles. (I know mutt allows arbitrary From: headers; I'd like to be able to select from a list, maybe using folder/subject/recipient info as a default)

Maybe an elisp one is the solution because it's beginning to sound like an extensible environment is needed.

As a final thought, I hear that af is extensible and was co-developed by someone we know well. Maybe I'll give that a go.

emperor: (Default)
posted by [personal profile] emperor at 05:15pm on 04/01/2006
Hm. you could have an emacs mode that frobbed the MUA, too.

I've never heard of "af"!
ext_8103: (Default)
posted by [identity profile] ewx.livejournal.com at 05:17pm on 04/01/2006
Or use gnuclient or similar.
 
posted by [identity profile] senji.livejournal.com at 05:19pm on 04/01/2006
gnuclient is almost fast enough :).
simont: A picture of me in 2016 (Default)
posted by [personal profile] simont at 05:24pm on 04/01/2006
I had an MUA half-written whose architecture was designed from the start to allow it to be embedded into any editor, not just one. The idea is that most MUA functions are capable of being performed by small command-line Unix programs, and then you have an elisp front end which implements a basically mutt/pine/vm-like keypress interface to all of that functionality. Every time the front end needs to do a mailbox operation, it calls the command-line program to get it done, which has options to arrange that the resulting data is returned in a useful format. To embed into another editor, only the front end needs rewriting, and I planned to arrange that all the real value-adding clever stuff was done in the back end.

This seemed like a good idea to me because my editor of choice is Jed, which isn't nearly as widely used as (say) emacs, so while I want an MUA embedded in Jed, it didn't seem sensible to restrict it to only being embedded in Jed.

As a further plus point, this architecture forces an efficient mail storage mechanism: because the command-line program is restarted every time something gets done, it fundamentally cannot afford to store mail in any way which requires O(N) work on startup or anything like that.

(Unfortunately, lack of time stalled the project, and also I had second thoughts about the efficient mail store I'd designed. It seems unlikely at this stage that I'll ever finish the MUA, although bits of it have usefully spun off into other of my programs.)
emperor: (Default)
posted by [personal profile] emperor at 07:32pm on 04/01/2006
What did you decide to do about mail storage?
simont: A picture of me in 2016 (Default)
posted by [personal profile] simont at 07:48pm on 04/01/2006
Initially I wanted to keep all mail in a disk-based database, on the basis that this would give O(log N) time to look up practically anything. Then I decided this plan had two major flaws. Firstly, a single disk file growing without bound as your mail archive increases is unlikely to make your sysadmin's incremental backup script, or your sysadmin, a happy bunny. Secondly, should the database go unaccountably tits-up for whatever reason, so does your entire mail archive.

So I devised plan B. First, the actual mail is held in a series of mbox files, each with a fixed maximum size. Mail is thrown sequentially on to the end of the highest-numbered file until it fills up, at which point a new file is started. Secondly, a database is kept alongside the mboxes, containing all index-useful header information (subjects, from, to, cc, etc) and indexing the actual mail by (filename,offset,length) tuples. Thus, in normal usage, the program never has to actually parse an mbox from beginning to end. Thirdly, the same information stored in the database is also stored in a series of flat text files, one for each mbox containing the information about all the messages in that mbox. This deals with the incremental backups problem because each mbox (and each index file) eventually stops changing. The only single file which continues to grow and change is the database file, and since that can always be reconstructed from the textual index files alongside the mboxes there's no need to back it up, so if your sysadmin maintains an un-backed-up partition then it's safe to keep it on that. Meanwhile, the technological lock-in is also solved because all the mail is held in the world's most standard mail storage format and hence can easily be extracted into another MUA without needing the aid of the one which understands the database. (This would lose the folder organisation, admittedly, but some reasonably trivial Perl could reconstruct that from the textual indices.) Meanwhile, lookup of any given message is nicely O(log N), and if the database has sufficient indexing magic in it then all sorts of other common lookups ("the last 500 messages in $category", "all messages exchanged with $user") become efficient as well.

The only snag with this arrangement, which didn't start to bother me until half way through coding, is that it really doesn't make it easy to modify or delete a message from the mail store. Modifying a message is something I do quite often, because idiots have a habit of sending me bloody enormous attachments which I absolutely do not need, and if I kept them all then my mail archive would be even more unmanageable than it is now. So my current (also home-grown) MUA has a "delete attachment" command which I use fairly regularly, and which the above mail store design wouldn't have supported. As for deleting messages, well, I don't do it often, but the more spam I get the more I start to wonder whether I really need to keep it all or whether I ought to start using the delete button. Most of the problems with deletion and editing centre around atomicity: it's OK to add data to the end of an mbox and then update the database to say it's in there, because if there's a failure between those two steps then the data is still consistent. But if you shuffle everything up in an mbox file, you inevitably have a moment when the file offsets in the database don't match the ones in the mbox, and a failure at that point is catastrophic. I never figured out a good solution to this.
 
posted by [identity profile] tienelle.livejournal.com at 10:19am on 05/01/2006
Can you not just set a flag in the database saying "this file has inconsistent state, re-index it" before you start messing with the file and the offsets?
simont: A picture of me in 2016 (Default)
posted by [personal profile] simont at 10:45am on 05/01/2006
Hmm, I suppose I could. I'd still have to update the mbox itself atomically, but then that's easily enough done by writing a new one and rename(2)ing it into place. And I don't like the idea of rewriting the mbox every time I do something like this, but then I could always batch up edits and deletions in the database and only apply them when the mbox would otherwise have hit its size limit.

Arrgh. I'm supposed to be not-coding at the moment for exhaustion reasons. The last thing I need is motivation to get back on Timber development :-)
pm215: (Default)
posted by [personal profile] pm215 at 09:30pm on 04/01/2006
This sounds suspiciously similar to MH/nmh, which has wound up with a number of front-ends including one in emacs.
gerald_duck: (ping)
posted by [personal profile] gerald_duck at 05:27pm on 04/01/2006
Due to the startup time of emacs

emacsclient is your friend.

(As are fast computers, of course.)

I'd add a few more wishlist items to the manifesto, were this to be my ideal MUA as well:
  • Knowing which receipient e-mail addresses (by regexp) are you, and in each case the corresponding address (and possibly also .sig) to use for replies. It should prompt if the replied-to message has zero, or more than one, of your addresses as header-recipients.
  • Show me only the plain text of an e-mail by default. Require explicit intervention before anything else happens. Don't risk feeding the e-mail through any unnecessary parsers or decoders before the clueful human's had a glance at it.
  • Handle multiple accounts simultaneously.
  • Grok IMAPs.
  • Hook for arbitrary commands to bracket access to each account (e.g. opening SSH tunnels, or frobbling VPNs)
  • Deal gracefully with large messages (minimising both bandwidth and memory usage)
  • Hook for adding extra magic convenience keystrokes, especially "whoops — feed that to sa-learn --spam"
fanf: (Default)
posted by [personal profile] fanf at 06:02pm on 04/01/2006
Pine can do most of that, and all of it if you are willing to run an instance per account :-)
fanf: (Default)
posted by [personal profile] fanf at 06:10pm on 04/01/2006
Mac OS X Mail's folder overview is really nice, and I wish Pine had something similar.
ext_243: (hexa)
posted by [identity profile] xlerb.livejournal.com at 08:47pm on 04/01/2006
1) Folder overview, showing how many unread/total messages exist in all known-about folders

I have a Small Shell Script that does this for maildir++; mutt's IMAP backend (but not, annoyingly, the direct-access maildir one) will report number of new messages in the folder list that takes entirely too many keypresses to reach and, UI-wise, isn't where a user of Gnus (or Mulberry, or...) would expect it to be.

2) Ability for multiple user profiles. (I know mutt allows arbitrary From: headers; I'd like to be able to select from a list, maybe using folder/subject/recipient info as a default)

I bashed this onto Gnus once, with elisp code in gnus-posting-styles. I may even still have a copy of it somewhere.
 
posted by [identity profile] mattp.livejournal.com at 05:16pm on 04/01/2006
As a mutt user, I can say that mutt supports:
Decent IMAP support
Choice of editor
Ability to arbitrarily edit headers
Understand mail messages fully
Sensible MIME handling
Console operation
Deal gracefully with large mailboxes

I'm not sure about these though:
Support submission, and other security enhancements
Virtual-folder like things
Ability to search across sets of mailboxes
 
posted by [identity profile] senji.livejournal.com at 05:21pm on 04/01/2006
Ability to arbitrarily edit headers
If I want to send email as From: foo@bar.invalid, X-Tickybox: nooo, then it should let me. Maybe checking for valid syntax would be sensible, though ;)
But it's more important that it allows you to do it than that it checks the syntax; if the syntax checking isn't 100% correct.
 
posted by [identity profile] mattp.livejournal.com at 05:34pm on 04/01/2006
Syntax checking rather than syntax enforcement? ;-)

Using an emacs analogy, maybe have a check performed on message submission saying "Message invalid - send anyway? (yes or no)", much like attempting to quit with unsaved files.
 

MUA

posted by [identity profile] davefish.livejournal.com at 06:02pm on 04/01/2006
Not a Make Up Artist I'm guessing.
fanf: (Default)
posted by [personal profile] fanf at 06:09pm on 04/01/2006
Pine has all of that, except:

It is online-only, so no cache.

No virtual folders (I just use physical folders; Hermes handles them reasonably efficiently)

I'm not sure if its alternate-editor feature allows you to edit the headers in free form or not; however you can configure it to add extra headers of which it lets you edit the contents.
emperor: (Default)
posted by [personal profile] emperor at 06:32pm on 04/01/2006
Pine isn't terribly free, though, and it's message-searching leaves something to be desired.
fanf: (Default)
posted by [personal profile] fanf at 06:42pm on 04/01/2006
The main problem with its search facilities that I have found is that having found the mailboxes containing a search term, you must repeat the search in each mailbox manually. Ugh. However it makes good use of Cyrus's server-side search optimizations (including full-text indexes).
 
posted by [identity profile] marnanel.livejournal.com at 07:52pm on 04/01/2006
If you're going to write a new MUA, you might consider making it broadly similar to Pine, as was done with nano for Pico.

October

SunMonTueWedThuFriSat
      1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
26
 
27
 
28
 
29
 
30
 
31