Log in

No account? Create an account

Bringing nmh into 2008...

Okay, looking at nmh, the biggest barriers to using it are that it doesn't seem to have any concept that I might have more than one maildrop. There is rudimentary support for having that one maildrop be POP3, but there's nothing at all for IMAP or dealing with multiple accounts.

I think the minimum needed to support multiple accounts is a .mh_accounts file that lists info about each of your accounts. Something like this:

(example config)Collapse )

Maybe it could just fit in the .mh_profile, I'll have to look more closely at what parses that file to see if I can add sections and still keep things that are already expected there from breaking.

So, for behaviors from the above, it'd be spiffy if there were some way that it could interact with the Apple Keychain or if the passwords could be encrypted using an ssh public key and decrypted by interacting with the ssh-agent to get the private key.

The idea of the account having a sequence is that when we get mail from this account, we'll copy it into the given sequence of the inbox. Then, you can scan +inbox csh to see all of the messages from csh. But, refile should propagate these so that when you move a message around, it keeps its attachment to the account.

  • Can these preserved through packf, too?
  • What else would need to change to preserve this?

An alternative to the sequences would be a folder prefix. That has fewer issues with refile, but makes it harder to push a folder back to an IMAP server.

An alternative to either of the above is to add a header field to the messages to track which account(s) it is attached to. This has the advantage of playing nicely with refile and packf and such but would mean needing to add something like sequences to most every command to support filtering by account.

inc would become a front-end for lib/fileinc (what's currently inc), lib/popinc, lib/imapinc, etc. It figures out which backend to use based on the account you're inc-ing.

inc would also want to have options to get a particular remote folder from an IMAP server.

Would also want to be able to copy a folder back to an IMAP server. The IMAP version would have to be more careful than inc about not copying messages that have already been copied.

Tags: ,