[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

better mail organisation



One of last year's Sysadmin issues (or was it USENIX's ;login:?) had
an article on mail organisation. The short story was that the guy
had his mail system configured in such a way to automatically
maintain a folder hierarchy of correspondents, where each such
folder receives all mail exchanged (sent and received) with that
correspondent.

Theoretically, the process is simple: procmail extracts the From
header and saves a copy of incoming mail in the corresponding
folder. On sending mail, procmail is invoked again before the mail
is handed to sendmail. Here, procmail extracts all To, Cc, and Bcc
recipients and saves a copy of the mail in all corresponding folders
(ideally using hardlinks). I think this calls for Maildir, which is
also what I want to be using.

But with spam, mailing lists, and multiple addresses per person,
this can become quite difficult to manage. Additionally, I only
really want this archiving to happen in the background, while
I still interact with the folder hierarchy I use right now (thematic
sorting rather than correspondent sorting).

Before I dive into the python depths to implement a solution, I was
wondering if any of you already have such a solution in place. The
Sysadmin article wasn't suited for my purposed, if I remember
correctly. Would you mind sharing how you approached the challenge?

[end of email]

Below, I illustrate some problems that need to be overcome:

- Message deletion: If I delete a message in the thematic tree, what
  will happen to the archived message? i say it should also be
  deleted. This could be done if the messages are hardlinked between
  the two trees, and a cleanup process runs over the archive tree
  regularly to delete all message files with link_count == 1.

- mutt's hooks: mutt has some of this functionality already built
  in. in fact, it provides send_hook and fcc_hook, which can be used
  to alter the store location of sent messages. However, send_hook
  has awful limitations (e.g. adding a recipient while already
  writing the message does not execute the send_hook), and the
  fcc_hook will only execute on the first match in the recipients
  list, thus not storing a copy of the outgoing message in each
  correspondent's folder. Additionally, mutt certainly doesn't do
  hardlinking of files, thereby wasting resources.

- Spam: If procmail automatically sorts messages into the folders,
  then every spam sender will create a new folder and eventually,
  I will die under the sheer amount of folders. A solution would be
  to only save mails exchanged with a correspondent if the folder
  exists. This would also give you a way to ignore those exchanges
  that aren't worth saving.

- Multiple addresses per person: this could be elegantly solved with
  symlinks.

- Mailing lists: unless someone wants to create a local archive of
  a mailing list, I think it's not necessary to save the incoming
  mail for mailing lists. Outgoing mail could be saved on
  a folder-per-list basis.

I would welcome if you spotted other challenges in this approach.

-- 
Please do not CC me when replying to lists; I read them!
 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, and user
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Attachment: signature.asc
Description: Digital signature


Reply to: