Steve is right!
You have to change the environment.xml to add the jdbc factory:
<factory type="jdbc"
class="org.apache.avalon.excalibur.logger.factory.JDBCTargetFactory"/>
Then instead of configuring "<file id" targets you can add jdbc targets
as described here:
http://excalibur.apache.org/apidocs/org/apache/avalon/excalibur/logger/factory/JDBCTargetFactory.html
<jdbc id="database">
<datasource>java:/LogTargetDataSource</datasource>
<normalized>true</normalized>
<table name="LOG">
<category>CATEGORY</category>
<priority>PRIORITY</priority>
<message>MESSAGE</message>
<time>TIME</time>
<rtime>RTIME</rtime>
<throwable>THROWABLE</throwable>
<hostname>HOSTNAME</hostname>
<static aux="-">STATIC</static>
<context aux="principal">PRINCIPAL</context>
<context aux="ipaddress">IPADDRESS</context>
<context aux="username">USERNAME</context>
</table>
</jdbc>
The problem is that you have to pass the datasource in the JNDI context,
and I don't know how you can do it easily inside phoenix.
Otherwise you can extend JDBCTargetFactory with your own factory using
the datasource you decide:
http://www.nurs.or.jp/~sug/soft/james/logger3.htm#sec8
Stefano
Steve Brewin ha scritto:
Stefano Bagnara wrote:
There is not such extension point, but you can probably
create your own
RemoteDelivery mailet (extending the current RemoteDelivery or simply
reusing code) and it should be easy to do.
The RemoteDelivery has a thread pool each one accepting mail from the
spool (outgoing) to make an attempt. The attempt result either in:
1) success: mail deleted
2) fail: mail bounced
3) temporary error: attempt numbers increased and message released to
the spool.
Stefano
Hi
My memory is flaky, but as I recall, Phoenix has a database logger (our
default selected in environment.xml is the File logger). As the events you
are interested in are being logged, an alternative approach would be to
configure this.
-- Steve
Daniel Burke ha scritto:
Hi,
I'm evaluating using james as a mail server. One of our requirements
is that we audit the attempts to deliver a piece of mail. I know I
will be able to get this from the log but I was hoping to
extend james
through a mailet possibly to log these events to a database.
Has anyone got any experience of doing anything like this?
I guess i need to know if there is an extension point in james that
is fired every time the server attempts to deliver a piece of mail?
thanks in advance.
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]