Re: [Exim] Storing messages in MySQL tables

Top Page
Delete this message
Reply to this message
Author: Matthew Byng-Maddick
Date:  
To: exim-users
Subject: Re: [Exim] Storing messages in MySQL tables
On Mon, Sep 24, 2001 at 04:08:57PM -0600, The Gimp wrote:
> I have searched the archives but have not found anything relating to this.


I think there was a brief thread not very long ago, on webmail which
explains why this is an appalling idea.

> I would like to store the received messages in an MySQL table with a
> schema of something like-
> userid varchar(100)
> message blob
> headers varchar(255)


I hope you never get messages of over 64k or headers of longer than 255
bytes.

This is a crazy idea for this reason.

> Can one configure exim to deliver the message to an MySQL table? If so,
> could you provide a little advice on how to do it?


The way to do this is not to do this directly throuh exim, but to write a
small program that reads the message and actually does the insert, such
that you end up delivering to a pipe, and then insert into the database
from this secondary process. Of course, MySQL doesn't have proper
transaction locking or record locking, and so you have some fun if your
mailserver is at all heavily hit.

MBM

-- 
Matthew Byng-Maddick         <mbm@???>           http://colondot.net/