"mbox2mysql takes mailbox files used by email clients
and stores the messages in a MySQL database. Messages can be
searched, sorted and filtered by sending SQL queries to
the database. Results are output on the console
so if desired, selected messages can be extracted
from the database and stored back in mbox format for use with
your favourite email client. Email attachments can
also be extracted and saved from selected messages"
mbox2mysql was designed for archiving mail. It is NOT an email client like
mutt, elm, pine and the like, nor are there currently any plans to make it
an email client. Everything is handled from the command line. The program
is non-interactive so mail can easily be archived using a cron job.
Archiving mail is as simple as:
- Verifying there are no errors with the mailbox. This is not a necessary
step, but highly recommended since malformed addresses in emails and other
obscurities may sometimes confuse the program.
- Insert messages from the specified mailbox into the database.
The mailbox is a plain text file used by email clients, typically found in
~/mail or ~/Mail etc. Different mailboxes can be stored in different tables
in the database. The program can be used to create the necessary tables.
See the -c option in the man page for more details. If desired, only selected
messages can be archived (-l), SQL queries can be sent to the database (-q)
and attachments extracted (-e). There are many more options, and the man
page documents all of them. PLEASE READ THE MAN PAGE!!!!
The following are required:
- Version 1.90.8 or
greater is required
- Version 2.x or higher should do the
trick. This comes with most distributions. Try doing a 'glib-config --version'
to see if you have a suitable version
And woopee, now you get to download the program:
- the MySQL hompage
- the coolest web based
database thingie around