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 Mohammad Naghavi <mo...@gmail.com> on 2010/10/25 14:17:10 UTC

Seperate Inbox tables

Hi there,
I have recently installed a James Mail server using mysql backend, and
everything is working perfectly. Now what I want is to seperate every inbox
table for each user. I don't want all email to be stored in one single inbox
email due to big amounts of data which is going to be stored in every inbox.
I have done it by defining the inbox configuration like this:
      <inboxRepository>
         <repository destinationURL="db://mysqlDB/inbox_" type="MAIL"/>
      </inboxRepository>
which creates tables like inbox_test for user name as test.
but in this case no email can be saved in tables an I get the some errors
like repositury_name can not be empty.
I think this can be avoided by setting that column as nullable but then the
question is that if it can be managed by James.
Also in this case after deleting a user, its table was not automatically
deleted by James.
Is there any better way of having a separate table for each user?

Thanks in advance
----------------------------------------------------
PHP & ASP .Net 3.5 web developer
Delphi & C# desktop developer

www.mohamnag.com

Re: Seperate Inbox tables

Posted by Norman Maurer <no...@apache.org>.
Hi Mohammad,

upcomming JAMES Server will use a different storage for inboxes which
supports IMAP and POP3. As the VOTE for the milestone is one the way
to get started you should better look at the new api.  You can find
the source here:
http://svn.apache.org/viewvc/james/imap/trunk/mailbox/

You could write your own implementation to handle this stuff for you.
Or use one of the supplied implementations, which are JPA/JCR/Maildir

Hope this helps to get you started.

Bye,
Norman

2010/10/25 Mohammad Naghavi <mo...@gmail.com>:
> Thanks Carl but I think partitioning is not gonna help me, cause I want to
> use heavily from searches in future and searches are separated based on
> users and what I wanna to prevent is not to query the whole table when what
> I need should be only in one user's data.
> Do you think it can be done without changing the code in James? and if any
> changes are needed they are in mailets or in James core?
>
> Thanks
> ----------------------------------------------------
> PHP & ASP .Net 3.5 web developer
> Delphi & C# desktop developer
>
> www.mohamnag.com
>
>
> On Mon, Oct 25, 2010 at 3:22 PM, Carl Vorster <cc...@propartners.co.za>wrote:
>
>> Hi,
>>
>> You can always use MySQL Partitioning, it'll address your requirements
>> without adding complexity in James.
>>
>> http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitions.html
>> http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
>> http://www.slideshare.net/datacharmer/mysql-partitions-tutorial
>>
>>
>> Regards
>>
>> Carl
>>
>>
>> -----Original Message-----
>> From: Mohammad Naghavi [mailto:mohamnag@gmail.com]
>> Sent: Monday, October 25, 2010 2:17 PM
>> To: server-user@james.apache.org
>> Subject: Seperate Inbox tables
>>
>> Hi there,
>> I have recently installed a James Mail server using mysql backend, and
>> everything is working perfectly. Now what I want is to seperate every inbox
>> table for each user. I don't want all email to be stored in one single
>> inbox
>> email due to big amounts of data which is going to be stored in every
>> inbox.
>> I have done it by defining the inbox configuration like this:
>>      <inboxRepository>
>>         <repository destinationURL="db://mysqlDB/inbox_" type="MAIL"/>
>>      </inboxRepository>
>> which creates tables like inbox_test for user name as test.
>> but in this case no email can be saved in tables an I get the some errors
>> like repositury_name can not be empty.
>> I think this can be avoided by setting that column as nullable but then the
>> question is that if it can be managed by James.
>> Also in this case after deleting a user, its table was not automatically
>> deleted by James.
>> Is there any better way of having a separate table for each user?
>>
>> Thanks in advance
>> ----------------------------------------------------
>> PHP & ASP .Net 3.5 web developer
>> Delphi & C# desktop developer
>>
>> www.mohamnag.com
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Seperate Inbox tables

Posted by Mohammad Naghavi <mo...@gmail.com>.
Thanks Carl but I think partitioning is not gonna help me, cause I want to
use heavily from searches in future and searches are separated based on
users and what I wanna to prevent is not to query the whole table when what
I need should be only in one user's data.
Do you think it can be done without changing the code in James? and if any
changes are needed they are in mailets or in James core?

Thanks
----------------------------------------------------
PHP & ASP .Net 3.5 web developer
Delphi & C# desktop developer

www.mohamnag.com


On Mon, Oct 25, 2010 at 3:22 PM, Carl Vorster <cc...@propartners.co.za>wrote:

> Hi,
>
> You can always use MySQL Partitioning, it'll address your requirements
> without adding complexity in James.
>
> http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitions.html
> http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
> http://www.slideshare.net/datacharmer/mysql-partitions-tutorial
>
>
> Regards
>
> Carl
>
>
> -----Original Message-----
> From: Mohammad Naghavi [mailto:mohamnag@gmail.com]
> Sent: Monday, October 25, 2010 2:17 PM
> To: server-user@james.apache.org
> Subject: Seperate Inbox tables
>
> Hi there,
> I have recently installed a James Mail server using mysql backend, and
> everything is working perfectly. Now what I want is to seperate every inbox
> table for each user. I don't want all email to be stored in one single
> inbox
> email due to big amounts of data which is going to be stored in every
> inbox.
> I have done it by defining the inbox configuration like this:
>      <inboxRepository>
>         <repository destinationURL="db://mysqlDB/inbox_" type="MAIL"/>
>      </inboxRepository>
> which creates tables like inbox_test for user name as test.
> but in this case no email can be saved in tables an I get the some errors
> like repositury_name can not be empty.
> I think this can be avoided by setting that column as nullable but then the
> question is that if it can be managed by James.
> Also in this case after deleting a user, its table was not automatically
> deleted by James.
> Is there any better way of having a separate table for each user?
>
> Thanks in advance
> ----------------------------------------------------
> PHP & ASP .Net 3.5 web developer
> Delphi & C# desktop developer
>
> www.mohamnag.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

RE: Seperate Inbox tables

Posted by Carl Vorster <cc...@propartners.co.za>.
Hi,

You can always use MySQL Partitioning, it'll address your requirements without adding complexity in James.

http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitions.html
http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
http://www.slideshare.net/datacharmer/mysql-partitions-tutorial


Regards

Carl


-----Original Message-----
From: Mohammad Naghavi [mailto:mohamnag@gmail.com] 
Sent: Monday, October 25, 2010 2:17 PM
To: server-user@james.apache.org
Subject: Seperate Inbox tables

Hi there,
I have recently installed a James Mail server using mysql backend, and
everything is working perfectly. Now what I want is to seperate every inbox
table for each user. I don't want all email to be stored in one single inbox
email due to big amounts of data which is going to be stored in every inbox.
I have done it by defining the inbox configuration like this:
      <inboxRepository>
         <repository destinationURL="db://mysqlDB/inbox_" type="MAIL"/>
      </inboxRepository>
which creates tables like inbox_test for user name as test.
but in this case no email can be saved in tables an I get the some errors
like repositury_name can not be empty.
I think this can be avoided by setting that column as nullable but then the
question is that if it can be managed by James.
Also in this case after deleting a user, its table was not automatically
deleted by James.
Is there any better way of having a separate table for each user?

Thanks in advance
----------------------------------------------------
PHP & ASP .Net 3.5 web developer
Delphi & C# desktop developer

www.mohamnag.com



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