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 gamliela <ga...@hotmail.com> on 2012/06/28 17:08:51 UTC

how to persist mails in database

I'm trying to persist mails to MySQL.

I try this code but I get exception:
<mailet match="All" class="ToRepository">
   <repositoryPath>db://maildb/outbox</repositoryPath>
</mailet>

Obviously that's because I didn't create any mailbox associated with this
path (james_mailbox table is empty).
The problem is that I couldn't find any document that describes how to do
that....
JMX management doesn't support mailbox operations, and I don't know how to
create the records in database manually.

help please...

P.S.
Database is working fine with James, schema was created, domains and users
are set.

-- 
View this message in context: http://old.nabble.com/how-to-persist-mails-in-database-tp34086759p34086759.html
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: how to persist mails in database

Posted by Eric Charles <er...@apache.org>.
On 06/29/2012 05:23 AM, Timothy Prepscius wrote:
> I just want you to know I got a chuckle out of the YourSQL no MySQL pun.

:)

NoSQL?

> On Jun 28, 2012, at 2:27 PM, Eric Charles wrote:
>
>> Hi,
>>
>> You're trying James2 way.
>>
>> If you have james_mailbox table, I suppose you run James3. In that case, the vanilla installation is already configured to persist the mails in an embedded derby database.
>>
>> Read http://james.apache.org/server/3/config-system.html#james-database.properties to change the settings to use YourSQL, nope, MySQL :) (and don't forget to put the jdbc driver jar in ./conf/lib).
>>
>> Thx, Eric
>>
>> On 06/28/2012 05:08 PM, gamliela wrote:
>>>
>>> I'm trying to persist mails to MySQL.
>>>
>>> I try this code but I get exception:
>>> <mailet match="All" class="ToRepository">
>>>     <repositoryPath>db://maildb/outbox</repositoryPath>
>>> </mailet>
>>>
>>> Obviously that's because I didn't create any mailbox associated with this
>>> path (james_mailbox table is empty).
>>> The problem is that I couldn't find any document that describes how to do
>>> that....
>>> JMX management doesn't support mailbox operations, and I don't know how to
>>> create the records in database manually.
>>>
>>> help please...
>>>
>>> P.S.
>>> Database is working fine with James, schema was created, domains and users
>>> are set.
>>>
>>
>> --
>> eric | http://about.echarles.net | @echarles
>>
>> ---------------------------------------------------------------------
>> 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
>

-- 
eric | http://about.echarles.net | @echarles

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


Re: how to persist mails in database

Posted by Timothy Prepscius <ti...@gmail.com>.
I just want you to know I got a chuckle out of the YourSQL no MySQL pun.

On Jun 28, 2012, at 2:27 PM, Eric Charles wrote:

> Hi,
> 
> You're trying James2 way.
> 
> If you have james_mailbox table, I suppose you run James3. In that case, the vanilla installation is already configured to persist the mails in an embedded derby database.
> 
> Read http://james.apache.org/server/3/config-system.html#james-database.properties to change the settings to use YourSQL, nope, MySQL :) (and don't forget to put the jdbc driver jar in ./conf/lib).
> 
> Thx, Eric
> 
> On 06/28/2012 05:08 PM, gamliela wrote:
>> 
>> I'm trying to persist mails to MySQL.
>> 
>> I try this code but I get exception:
>> <mailet match="All" class="ToRepository">
>>    <repositoryPath>db://maildb/outbox</repositoryPath>
>> </mailet>
>> 
>> Obviously that's because I didn't create any mailbox associated with this
>> path (james_mailbox table is empty).
>> The problem is that I couldn't find any document that describes how to do
>> that....
>> JMX management doesn't support mailbox operations, and I don't know how to
>> create the records in database manually.
>> 
>> help please...
>> 
>> P.S.
>> Database is working fine with James, schema was created, domains and users
>> are set.
>> 
> 
> -- 
> eric | http://about.echarles.net | @echarles
> 
> ---------------------------------------------------------------------
> 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


Re: how to persist mails in database

Posted by gamliela <ga...@hotmail.com>.
I run James 3 with MySQL.
I already did the required configuration in "james-database.properties".

Now, I don't understand why this is working:
<mailet match="All" class="ToRepository">
    <repositoryPath>db://maildb/myname1/myname2</repositoryPath>
</mailet>

and this is not working:
<mailet match="All" class="ToRepository">
    <repositoryPath>db://maildb/myname1</repositoryPath>
</mailet>

(I get "Column 'repository_name' cannot be null" exception).

I also don't understand why the first case (which works) create new 2 tables
in database (myname1, myname2) instead of using the exiting james_mail
table. Maybe I understand it all wrong but since there is almost no
documentation on these topics I have to trust my common sense...

Thanks for help,

Alon
-- 
View this message in context: http://old.nabble.com/how-to-persist-mails-in-database-tp34086759p34088804.html
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: how to persist mails in database

Posted by Eric Charles <er...@apache.org>.
Hi,

You're trying James2 way.

If you have james_mailbox table, I suppose you run James3. In that case, 
the vanilla installation is already configured to persist the mails in 
an embedded derby database.

Read 
http://james.apache.org/server/3/config-system.html#james-database.properties 
to change the settings to use YourSQL, nope, MySQL :) (and don't forget 
to put the jdbc driver jar in ./conf/lib).

Thx, Eric

On 06/28/2012 05:08 PM, gamliela wrote:
>
> I'm trying to persist mails to MySQL.
>
> I try this code but I get exception:
> <mailet match="All" class="ToRepository">
>     <repositoryPath>db://maildb/outbox</repositoryPath>
> </mailet>
>
> Obviously that's because I didn't create any mailbox associated with this
> path (james_mailbox table is empty).
> The problem is that I couldn't find any document that describes how to do
> that....
> JMX management doesn't support mailbox operations, and I don't know how to
> create the records in database manually.
>
> help please...
>
> P.S.
> Database is working fine with James, schema was created, domains and users
> are set.
>

-- 
eric | http://about.echarles.net | @echarles

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