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:[EMAIL PROTECTED]]
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>