Did you check the example perl script included with the MySQL distribution?
It sounds like what you are asking for. I think it's named mail_to_db.pl
> I am wondering if anyone is aware of some prewritten
> software to allow me to archive an email list to a mysql
> database. I have to archive 50 or so lists at my company
> and I figured that sending them to a database into seperate
> tables would be the best bet. Eventually it will have a
> web interface to the database to search the archive
> but for now I just need to figure out how the heck to
> get the sender (name/address) and the email body into
> the individual tables. I figure I can use procmail to
> run an external program for each mailing list
> but now I need to figure out how to insert the data
> into the database from procmail. Anyone know of any
> command line software that could do this? take a file
> as input, parse it, and insert it in a database?