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

Importing mail into MySql DB?



Assume I know nothing about Qmail. I believe my server runs Redhat with plesk. It is a godaddy.com virtual dedicated server that I am assuming is running Qmail from the documentation I have read.

Need:

1. I would like to have incoming emails be imported into a MySql DB.
2. In addition (if possible) import created id's for attachments and have the attachments renamed and placed into a directory. (This would probably have to have a custom script created for this process and I have read Qmail can exectue scripts when email's come in?)

Reason:

I need to be able to place emails/attachments on a webpage.

I have researched this question before landing here and the following is all I could find in the mail list archive regarding it.

Quote:
Jerry Gardner <charlie@xxxxxxxxxxxxxxx> wrote:
> >> I've done the search and found all the info as it relates to using MySQL to
> >> store qmail user configuration data. Has anyone ever given any thought to
> >> using MySQL to store email messages themselves, instead of using Maildir or
> >> mbox format?
>
> > Why? Email is a blob of text. Using an RDBMS to store simple blobs of text
> > is like pounding nails with a 1967 Corvette.
> >
> > What problem are you trying to solve?
>
> Storing mail for a mailing list that generates thousands of messages a week,
> that also has the ability to serve up archives via a web page.

It would be much more efficient to simply store the messages in
possibly-hashed directories, like ezmlm does with its archives, but yes, you
could also stick them into an RDBMS from a .qmail file trivially. It's been
discussed on the list in the past.

Charles
--


Quote:
It would be much more efficient to simply store the messages in
possibly-hashed directories, like ezmlm does with its archives, but yes, you
could also stick them into an RDBMS from a .qmail file trivially.


Apparently its possible, but I do not understand the solution he proposed and I was hoping someone here could give me more detail on how to do something like this.

Thank you.