I've written something , that may help.
This also adds flag to delivered messages.
https://github.com/mealstrom/plp2sql/
2012/9/8 Ted Cooper <eximX0902w@???>:
> On 08/09/12 01:21, Todd Lyons wrote:
>> Here is what I wrote and have been using:
>>
>> https://github.com/mrballcb/exisqlog
>>
>> I spent the morning sanitizing our company specific things out of it
>> and pushed it up to github. Let me know if it does not work properly
>> for you.
>
> Thank you very much! That looks very promising :)
>
> As you note in the instructions, I don't want to give unfettered access
> to all. I already have a permissions system for domains and addresses on
> those domains, so I'll most likely have to adjust the schema so that I
> can tie that in.
>
>
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
--
Aleksander Mischenko