Salvo,

I do it this way in my system:

**********************************************************************************************************

...
         <mailet match="RecipientIsOverFixedQuota=20M" class="ToProcessor">
            <processor>over-quota</processor>
            <notice>Over 20MB quota</notice>
         </mailet>
...
      <!-- over-quota. -->
      <processor name="over-quota">
         <mailet match="All" class="Resend">
            <sender>postmaster</sender>
            <replyto>null</replyto>
            <reversePath>null</reversePath>
            <inline>none</inline>
            <attachment>message</attachment>
            <prefix>[OVER QUOTA WARNING]</prefix>
            <message>
While receiving the attached message your mailbox is using more than 20MB. The mailbox 
will not be blocked, but we ask you to empty it.

Probably in the "account" (or "service") of your mail client the advanced option 
"leave a copy of messages on server" is currently set.

Please don't reply to this e-mail as it has been automatically sent by the mail system.

Regards, [EMAIL PROTECTED]
_____________________________________
            </message>
         </mailet>

      </processor>
...

**********************************************************************************************************


My approach is to not block the message if quota is exceeded, but to have the 
Postmaster send it to the recipient as a new notification message with the initial 
message as an attachment. The hope is that the recipient will be somehow disturbed by 
that and will empty his mailbox.

To better understand the above behaviour, please notice that quota checking is not 
applied if either the sender or the recipient is the Postmaster.

You could have also a two level check:

**********************************************************************************************************

...
         <mailet match="RecipientIsOverFixedQuota=20M" class="ToProcessor">
            <processor>over-quota</processor>
            <notice>Over 20MB quota</notice>
         </mailet>
...
      <!-- over-quota. -->
      <processor name="over-quota">
         <mailet match="RecipientIsOverFixedQuota=40M" class="Resend">
            <passThrough>true</passThrough>
            <sender>postmaster</sender>
            <replyto>null</replyto>
            <reversePath>null</reversePath>
            <inline>heads</inline>
            <attachment>none</attachment>
            <prefix>[OVER QUOTA BLOCK]</prefix>
            <message>
While receiving the attached message your mailbox is using more than 40MB. NO MESSAGES 
WILL BE DELIVERED TO YOU UNTIL YOU EMPTY IT, and you will only receive notifications 
as this one.

Probably in the "account" (or "service") of your mail client the advanced option 
"leave a copy of messages on server" is currently set.

Please don't reply to this e-mail as it has been automatically sent by the mail system.

Regards, [EMAIL PROTECTED]
_____________________________________
            </message>
         </mailet>

         <mailet match="RecipientIsOverFixedQuota=40M" class="Bounce">
            <passThrough>false</passThrough>
            <inline>heads</inline>
            <attachment>none</attachment>
            <notice>Warning: We were unable to deliver the attached message because 
the recipient inbox has exceeded mail quota. A notification has been sent to the 
recipient showing the headers of your message.</notice>
         </mailet>

         <mailet match="RecipientIsOverFixedQuota=20M" class="Resend">
            <sender>postmaster</sender>
            <replyto>null</replyto>
            <reversePath>null</reversePath>
            <inline>none</inline>
            <attachment>message</attachment>
            <prefix>[OVER QUOTA WARNING]</prefix>
            <message>
While receiving the attached message your mailbox is using more than 20MB. The mailbox 
will not be blocked, but we ask you to empty it.

Probably in the "account" (or "service") of your mail client the advanced option 
"leave a copy of messages on server" is currently set.

WARNING: if you don't empty your mailbox, and it exceeds 40MB, the messages will NOT 
BE DELIVERED, and you will only get a notification. 

Please don't reply to this e-mail as it has been automatically sent by the mail system.

Regards, [EMAIL PROTECTED]
_____________________________________
            </message>
         </mailet>

      </processor>
...

**********************************************************************************************************

With this second approach:
        (a) if 20MB <= inbox size < 40MB the behaviour will be as with the first 
approach, and
        (b) if 40MB <= inbox size the message will not be attached, the recipient will 
get a different notification and the sender will get a bounce.

Hope it helps,

Vincenzo

> -----Original Message-----
> From: Salvo Cristaldi [mailto:[EMAIL PROTECTED]
> Sent: luned� 23 febbraio 2004 11.14
> To: James Users List
> Subject: Re: Quota?
> 
> 
> It works.... thanks.
> But there is a way in order to send a mail automatically to the sender that
> notifies that the adressee has exceeded the quota?
> 
> 
> Thank
> 
> ----- Original Message ----- 
> From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> To: "James Users List" <[EMAIL PROTECTED]>
> Sent: Friday, February 20, 2004 7:35 PM
> Subject: RE: Quota?
> 
> 
> > > in config.xml there isn't quota section or some
> RecipientIsOverFixedQuota
> > > How use quota?
> >
> >   <mailet match="RecipientIsOverFixedQuota=10M" class="ToProcessor">
> >     <processor>error</processor>
> >     <notice>552 Requested mail action aborted: exceeded storage
> > allocation</notice>
> >   </mailet>
> >
> > That would limit recipients to no more than 10MB in their mailbox.
> >
> > --- Noel
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to