james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: Stroage Quota - need advice
Date Mon, 03 Jun 2002 04:32:03 GMT

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>
Serge Knystautas
Loki Technologies - Unstoppable Websites

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>

View raw message