Hi! I just finished a project just like this.

We just put in a brand new mail server running PostFix on Mac OS X Panther. We added all the extra bells and whistles for spam and virus filtering, as well as squirrel mail

There is an single-line option in Postfix's config file to have all email going into and out of the server cc'd to a single mailbox

We setup a catch-all account that all email gets cc'd to, and then after playing around with a php scripts for a while, I actually wound up writing a program to pull the emails out of that account and pour them into mysql tables using a programming environment called RealBasic, which has a real nice built-in set of POP email and attachment handling classes, plus a mysql link as well

Now that the emails are in sql, we've also integrated searching and linking through some of our php web interfaces. All in all, so far, it's working well.

You could do the same in php, but I was able to write a real nice interface for the sql-link in realbasic in a few hours.


On Feb 10, 2005, at 12:35 PM, [EMAIL PROTECTED] wrote:

Brent Baisley <[EMAIL PROTECTED]> wrote on 02/10/2005 12:21:38 PM:

I am looking to store all incoming emails into a MySQL database. I've
looked into dbmail, but can't get it to compile under Mac OSX (I posted
a message on that list). I was wondering if anyone could point me in
another direction to use MySQL as an email message store. I don't need
a webmail interface, just a way of getting messages from a mail server
to a MySQL database. Preferably as a direct transfer, but it could be a
script that runs periodically.
Currently it seems the best path is using Perl, but I would think this
has been done before, just can't find it on google.


Thanks
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


--

How to do what you ask depends on how I read your question. When you say
"store incoming emails" does that mean that you are writing an SMTP server
that will act as a mail destination or are you retrieving mail from an
SMTP server via POP3 or IMAP or some other mail retrieval protocol?


In either case your code ends up writing the contents of the message to a
MySQL database rather than to a local file. What you need to decide is how
many pieces you want to break the message into (how much metadata you want
to extract from each message). Your database structure will depend on your
information needs and how you intend to use the emails once you store them
however I can almost guarantee that the body of each message will need to
be stored in a TEXT field.


You will probably run out of room faster by storing whole messages in your
database than if you were storing them as files on the hard drive.
Capacity control is definitely something you want to consider in your
project design. You may want to store the messages (or parts of them) as
files and keep just the metadata in the database, but again that goes to
your intended purpose for this project.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to