From owner-freebsd-questions@FreeBSD.ORG Sat Apr 9 20:37:34 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4305A16A4CE for ; Sat, 9 Apr 2005 20:37:34 +0000 (GMT) Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id E15EE43D3F for ; Sat, 9 Apr 2005 20:37:33 +0000 (GMT) (envelope-from dgl@kirk.dlee.org) Received: from kirk.dlee.org ([69.143.16.144]) by comcast.net (rwcrmhc14) with ESMTP id <2005040920373301400lqfn3e>; Sat, 9 Apr 2005 20:37:33 +0000 Received: from kirk.dlee.org (dgl@localhost.dlee.org [127.0.0.1]) by kirk.dlee.org (8.12.11/8.12.11) with ESMTP id j39KbSiv058209 for ; Sat, 9 Apr 2005 16:37:28 -0400 (EDT) (envelope-from dgl@kirk.dlee.org) Received: (from dgl@localhost) by kirk.dlee.org (8.12.11/8.12.11/Submit) id j39KbRnw058208 for freebsd-questions@freebsd.org; Sat, 9 Apr 2005 16:37:27 -0400 (EDT) (envelope-from dgl) Date: Sat, 9 Apr 2005 16:37:27 -0400 From: Doug Lee To: freebsd-questions@freebsd.org Message-ID: <20050409203727.GI4670@kirk.dlee.org> Mail-Followup-To: Doug Lee , freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: BART Group User-Agent: Mutt/1.5.6i Subject: Anyone ever consider a filesystem served by MySQL for mail folders? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2005 20:37:34 -0000 Ok, tell me if this is a totally awful idea, but it seems quite useful to me, even if unusual... Is it practical to implement a mountable filesystem for mail archiving whose contents are served by a MySQL (or other SQL) database? Creating this is surely way beyond my level of expertise in FreeBSD, and maybe even the full design is, but I imagine this much: The actual supporting database would include category strings for each message (many-to-many). File names in the filesystem would be category strings, so saving an email would file it in that category (to save in several categories, resave to the corresponding names; only one actual copy of the message would be saved). Special rules could be constructed that allow special filename formats to cause queries; for example, trying to load messages from a file called "from:dgl@%" might pull in a mail file consisting of all messages from dgl@* (note I use `%', the SQL wildcard, both to simplify the query and to avoid collision with the normal `*' wildcard for filenames). I suggest the rule<-->filename mapping should be held in an administrator-modifiable configuration file. The reason I propose all this is that I'm interested in a better way to store massive amounts of email that does not depend on a particular mail program. Granted, the returned mail file format would have to be preset--unless that's configurable too, or special patterns are included for different formats compatible with different mailers, which would be immensely cool! I am continually frustrated by trying to find an email among hundreds of thousands of them, and by the inability to categorize emails in multiple ways easily without saving multiple copies of messages. I suddenly today thought of things like devfs, procfs, etc., that are pseudo-filesystems, and realized that even if this is an odd approach, it does have the benefit (at least potentially) of working with most any mail client with no modification to the client and no user intervention such as manually copying messages to/from the database. If such a thing now existed that could serve Mutt-compatible (MMDF, I think) mail files, I would wish to import about 400 megabytes of messages as soon as possible. :-) Thoughts welcome. Please Cc me. -- Doug Lee dgl@dlee.org http://www.dlee.org BART Group doug@bartsite.com http://www.bartsite.com "Innovation is hard to schedule." -- Dan Fylstra