You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Satish <sa...@nunet-tech.com> on 2003/07/24 07:45:57 UTC

Dump messages into database

Hi,

I am developing an application that uses JAMES as email server and it
uses mobile technology.

All the messages received / sent by the user should be saved into
database.

I have gone through JAMES documentation and found that I can dump all
incoming mails into database directly by using <data-source> specified
in config.xml of JAMES.
But I need some additional columns in this INBOX table. What should be
my approach for this? Also, my table is already created and being used
by my JSP code which access and display the data in this table. 
And how to store outgoing messages?

Satish



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Dump messages into database

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I need some additional columns in this INBOX table.

Why?  Just additional mail data, or something that an external application
needs.  For the former, you could use the new attribute support.  In a
future version of the message store, those might be separate rather than
clustered in a blob (think JNDI).

If you need specific additional columns, create a subclass of the JDBC
repository code.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Dump messages into database

Posted by Lindsay Smith <li...@wapdat.com>.
There are few things you could look at.

You can alter the SQL in
apps/james/conf/sqlResources.xml to fit your database tables.

You can alter your database (say using views) to fit James.

Another thing I have done is use triggers to populate other tables from the
tables James uses.

Ultimately you have a lot of flexibility with James and how it stores to a
JDBC source.  If you had very special requirements that can't be met with
the above suggestions you could write a Mailet to process incoming mails and
persist whatever data, whatever way.

How outgoing messages get stored? That's really up to you and in some ways
isn't relevent to James.  You could do it at the client end, ie in your jsp
save the message data to your table.  You could do it in a mailet in James.

My suggestion would be to use views to start with.  Very simple, very quick.

Regards
Lindsay Smith




-----Original Message-----
From: Satish [mailto:satish@nunet-tech.com]
Sent: 24 July 2003 06:46
To: 'James Users List'
Subject: Dump messages into database



Hi,

I am developing an application that uses JAMES as email server and it
uses mobile technology.

All the messages received / sent by the user should be saved into
database.

I have gone through JAMES documentation and found that I can dump all
incoming mails into database directly by using <data-source> specified
in config.xml of JAMES.
But I need some additional columns in this INBOX table. What should be
my approach for this? Also, my table is already created and being used
by my JSP code which access and display the data in this table.
And how to store outgoing messages?

Satish



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org