james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Stroage Quota - need advice
Date Mon, 03 Jun 2002 04:46:56 GMT
> I might tweak the matcher to look like this though...
> <mailet matcher="UserOverQuota=6m" class="ToProcessor">

I disagree on the grounds that we extend JamesUser to include a quota
property.  This means that the matcher would check each user's quota, and
reject each one for which that message would create the over quota
condition.

That is why there was no parameter to the matcher, although there could be a
default for when the user's quota is not explicitly set.

> a method on MailRepository to return the size of all messages

Right now a matcher could get a list of messages, and iterate over them to
request the message size.  By adding such a query method on the
MailRepository, it will allows an implementation to optimize the query,
e.g., for a database to directly provide the answer rather than looping over
messages.

	--- Noel

-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Monday, June 03, 2002 0:32
To: James Developers List
Subject: Re: Stroage Quota - need advice


Noel,

I was actually just thinking of adding a method on MailRepository to
return the size of all messages, primarily because it could drastically
help POP retrieval scale.  This method could be used by this matcher,
summing all the message sizes in the matcher.

I agree with your suggested approach of sending it to an overquota
processor.  I might tweak the matcher to look like this though...

<mailet matcher="UserOverQuota=6m" class="ToProcessor">
   <processor> overquota </processor>
</mailet>
--
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/

Noel J. Bergman wrote:
> Why not create a UserOverQuota matcher that checks quotas?  Use a matcher
so
> that the administrator can use the ToProcessor mailet to control what
> happens to overquota'd mail.  I'd expect to see something like:
>
> <mailet matcher="UserOverQuota" class="ToProcessor">
>    <processor> overquota </processor>
> </mailet>
>
> in the config.xml file.
>
> Add a method to org.apache.james.services.MailRepository to query the
> (approximate) storage currently consumed, and new statements to
> sqlResources.xml to support it on the JDBC side (q.v.,
> "retrieveMessageBodySizeSQL").  For example, for mysql:
>
> <sql name="retrieveStorageUsedSQL" db="mysql">SELECT
> sum(length(message_body)) FROM ${table} WHERE repository_name = ?</sql>
>
> 	--- Noel
>
> -----Original Message-----
> From: Andrei Ivanov [mailto:myfam@surfeu.fi]
> Sent: Sunday, June 02, 2002 8:29
> To: James Developers List
> Subject: Stroage Quota - need advice
>
>
> Hi, I am thinking about introducing a "storage quota" for James I am
> developing with. I would like to hear some advice from James developers
> about best ways to implement quota with following functionality:
> 1. If there are more messages in JamesSpoolManager whan server can process
> (ie deliver remotely)
> 2. No more incoming SMTP connections will be accepted before spool be
> cleaned (messages will be  delivered)
>
> May be such mechanism is implemented already for James? Any advices where
to
> begin from?
>
> Andrei


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message