Re: [Exim] Creating SQL local storage

Etusivu
Poista viesti
Vastaa
Lähettäjä: Kirill Miazine
Päiväys:  
Vastaanottaja: Sam Michaels
Kopio: Exim List
Aihe: Re: [Exim] Creating SQL local storage
The answer is no. You do not do this kind of stuff in Exim (pipe the
message to an external program or something that inserts the headers and
the body into the database).

You may want to look at the dbmail package which stores messages in a
database rather than starting from scratch:

    http://www.dbmail.org/


Sam Michaels wrote:
> The concept is to create 2 tables...one for headers, one for the body. The
> headers table contains an auto_increment index number, the To field, the
> From field, the Date field and then the entire header. To/From/Date are all
> multiple indices. The body table contains the index number and the body.
> That way you can easily do a "JOIN" SQL query when retrieving mail. Also
> eliminates the read/write problems associated with appended files.
>
> Question of the day is...how would you go about writing a new local
> transport that delivers it to the SQL server? I'd like to make use of the
> internal SQL functions (mine is compiled with MySQL support). Sounds pretty
> simple in theory...it either succeeds in the "INSERT" queries or it gets
> deferred...
>
> If anyone has done this and can provide some code for Exim 4, that'd be
> excellent (and save me a LOT of time).


--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/