Re: User over quota message

2001-06-27 Thread chris

Arggg, the code looks good.  I'd love to impliment it but it's based on
4.9.10...



Agus, any chance you'd be willing to look into adding your code to the
current code base?  IE. 4.10.24 ?

Chris Bunnell





Re: User over quota message

2001-06-27 Thread chris

A kind list member sent some code last night...  I'm going to dig into it.


> Sounds like a good feature. I do not need it myself.
> How do we avoid sending a user multiple over quota
> messages?

I guess that would complicate things..  I don't really have an issue with
them get one "over quota" message per bounced incoming message.  It'll work
for the time being while a better solution gets worked out.

Chris


p.s. Ken did you get my response to your inquire to me about the "-R" for
gcc that I put into your code?  If you didn't see it, let me know and I'll
resend it.  I'm anxious for you to approve it's insertion into the code
base.

Thanks!
Chris Bunnell



>
> Ken Jones
>




Re: User over quota message

2001-06-27 Thread Syed Faruque Ahmed

:-)

But Ken, did you look at Agus's code?  I noticed some additions with fck 
and fps calls.  Since I plan to migrate to newer versions of vpopmail and 
qmailadmin (eventually ;-)), any comments on incorporation of this code 
into 4.9.10/0.45 and your ideas for the future?

Faruque

At 02:48 PM 6/27/01 +0200, Ken Jones wrote:

>I like the idea of a file based method. Less code needs to be
>changed and it will work across all authentication modules.
>The thought of updating every auth module, and doing regression
>testing makes me want to run for the hills.
>
>Ken JOnes
>
>Syed Faruque Ahmed wrote:
> >
> > I think I will try Agus's patch, it sounds easy.
> >
> > Although putting in a flag in vpasswd file/table against a user seems more
> > sensible in the long run, it sounds rather complicated as a lot more
> > related code might have to be changed.  I guess Ken can decide on this for
> > a new release, along with an "--enable-quotawarn" option ( ;-) slave
> > drivers we are).
> >
> > Ken, did you look at Agus's code?  Any comments?
> >
> > Faruque
> >
> > At 04:16 PM 6/27/01 +0700, Agus Basyari wrote:
> >
> > > > chris wrote:
> > > > >
> > > > > Hello all,
> > > > >
> > > > > I've read the archive about this subject already, but still don't 
> have a
> > > > > clear answer.  I have hardquota set.  I tested it and it worked
> > >correctly by
> > > > > bouncing a message > 1K back to the sender, while still allowing <1K
> > > > > messages to be delivered.
> > > > >
> > > > > What I haven't figured out is how to generate a message to the 
> OWNER of
> > >the
> > > > > mail box that he/she is over quota and needs to clear out some mail.
> > > > >
> > > > > I saw other's ask this, but never saw a clear answer to that 
> issue.  I'd
> > > > > guess that the C code could be hacked to create an email to the 
> owner at
> > >the
> > > > > same time as the "bounce" message, but that sounds more 
> complicated than
> > >I
> > > > > think I can handle.
> > > > >
> > > > > Anyone else solve this?
> > > > >
> > > > > Thanks,
> > > > > Chris Bunnell
> > > >
> > > > Sounds like a good feature. I do not need it myself.
> > > > How do we avoid sending a user multiple over quota
> > > > messages?
> > > >
> > > > Ken Jones
> > > >
> > >
> > >With my vdlivermail.c .. it will create ".quotawarn1" and ".quotawarn2"
> > >(with dot) ... and if this file is in user directory, then Admin mail will
> > >not send the warning message. If the quota is less then 80% .. then
> > >vdelivermail will delete both.
> > >
> > >If the quotas is becaming between 80 - 90% after more then 90%, 
> vdelivermail
> > >will not send the 80% warning messages, but if you up agian more then 90%,
> > >the warning message will sending again, because it just delete the
> > >.quotawarn2. It's my setting in my system. But if you still do not 
> want the
> > >system to send warning in this situation, you can edit  the vdelivermail.c
> > >in your own setting, maybe not 80 and 90% but 80% and 95%, then you change
> > >0.9 with 0.95.




Re: User over quota message

2001-06-27 Thread Ken Jones


I like the idea of a file based method. Less code needs to be
changed and it will work across all authentication modules.
The thought of updating every auth module, and doing regression
testing makes me want to run for the hills.

Ken JOnes

Syed Faruque Ahmed wrote:
> 
> I think I will try Agus's patch, it sounds easy.
> 
> Although putting in a flag in vpasswd file/table against a user seems more
> sensible in the long run, it sounds rather complicated as a lot more
> related code might have to be changed.  I guess Ken can decide on this for
> a new release, along with an "--enable-quotawarn" option ( ;-) slave
> drivers we are).
> 
> Ken, did you look at Agus's code?  Any comments?
> 
> Faruque
> 
> At 04:16 PM 6/27/01 +0700, Agus Basyari wrote:
> 
> > > chris wrote:
> > > >
> > > > Hello all,
> > > >
> > > > I've read the archive about this subject already, but still don't have a
> > > > clear answer.  I have hardquota set.  I tested it and it worked
> >correctly by
> > > > bouncing a message > 1K back to the sender, while still allowing <1K
> > > > messages to be delivered.
> > > >
> > > > What I haven't figured out is how to generate a message to the OWNER of
> >the
> > > > mail box that he/she is over quota and needs to clear out some mail.
> > > >
> > > > I saw other's ask this, but never saw a clear answer to that issue.  I'd
> > > > guess that the C code could be hacked to create an email to the owner at
> >the
> > > > same time as the "bounce" message, but that sounds more complicated than
> >I
> > > > think I can handle.
> > > >
> > > > Anyone else solve this?
> > > >
> > > > Thanks,
> > > > Chris Bunnell
> > >
> > > Sounds like a good feature. I do not need it myself.
> > > How do we avoid sending a user multiple over quota
> > > messages?
> > >
> > > Ken Jones
> > >
> >
> >With my vdlivermail.c .. it will create ".quotawarn1" and ".quotawarn2"
> >(with dot) ... and if this file is in user directory, then Admin mail will
> >not send the warning message. If the quota is less then 80% .. then
> >vdelivermail will delete both.
> >
> >If the quotas is becaming between 80 - 90% after more then 90%, vdelivermail
> >will not send the 80% warning messages, but if you up agian more then 90%,
> >the warning message will sending again, because it just delete the
> >.quotawarn2. It's my setting in my system. But if you still do not want the
> >system to send warning in this situation, you can edit  the vdelivermail.c
> >in your own setting, maybe not 80 and 90% but 80% and 95%, then you change
> >0.9 with 0.95.



Re: User over quota message

2001-06-27 Thread Syed Faruque Ahmed

I think I will try Agus's patch, it sounds easy.

Although putting in a flag in vpasswd file/table against a user seems more 
sensible in the long run, it sounds rather complicated as a lot more 
related code might have to be changed.  I guess Ken can decide on this for 
a new release, along with an "--enable-quotawarn" option ( ;-) slave 
drivers we are).

Ken, did you look at Agus's code?  Any comments?

Faruque

At 04:16 PM 6/27/01 +0700, Agus Basyari wrote:

> > chris wrote:
> > >
> > > Hello all,
> > >
> > > I've read the archive about this subject already, but still don't have a
> > > clear answer.  I have hardquota set.  I tested it and it worked
>correctly by
> > > bouncing a message > 1K back to the sender, while still allowing <1K
> > > messages to be delivered.
> > >
> > > What I haven't figured out is how to generate a message to the OWNER of
>the
> > > mail box that he/she is over quota and needs to clear out some mail.
> > >
> > > I saw other's ask this, but never saw a clear answer to that issue.  I'd
> > > guess that the C code could be hacked to create an email to the owner at
>the
> > > same time as the "bounce" message, but that sounds more complicated than
>I
> > > think I can handle.
> > >
> > > Anyone else solve this?
> > >
> > > Thanks,
> > > Chris Bunnell
> >
> > Sounds like a good feature. I do not need it myself.
> > How do we avoid sending a user multiple over quota
> > messages?
> >
> > Ken Jones
> >
>
>With my vdlivermail.c .. it will create ".quotawarn1" and ".quotawarn2"
>(with dot) ... and if this file is in user directory, then Admin mail will
>not send the warning message. If the quota is less then 80% .. then
>vdelivermail will delete both.
>
>If the quotas is becaming between 80 - 90% after more then 90%, vdelivermail
>will not send the 80% warning messages, but if you up agian more then 90%,
>the warning message will sending again, because it just delete the
>.quotawarn2. It's my setting in my system. But if you still do not want the
>system to send warning in this situation, you can edit  the vdelivermail.c
>in your own setting, maybe not 80 and 90% but 80% and 95%, then you change
>0.9 with 0.95.




Re: User over quota message

2001-06-27 Thread Chris


It's a good features. Ken, can you add this to the next release? you can use
a diable/enable flag on the vpasswd. or add --enable-quotawarning=yes option
to the configure script.


 
   Chris Chan


- Original Message -
From: "Ken Jones" <[EMAIL PROTECTED]>
To: "chris" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 3:51 PM
Subject: Re: User over quota message


chris wrote:
>
> Hello all,
>
> I've read the archive about this subject already, but still don't have a
> clear answer.  I have hardquota set.  I tested it and it worked correctly
by
> bouncing a message > 1K back to the sender, while still allowing <1K
> messages to be delivered.
>
> What I haven't figured out is how to generate a message to the OWNER of
the
> mail box that he/she is over quota and needs to clear out some mail.
>
> I saw other's ask this, but never saw a clear answer to that issue.  I'd
> guess that the C code could be hacked to create an email to the owner at
the
> same time as the "bounce" message, but that sounds more complicated than I
> think I can handle.
>
> Anyone else solve this?
>
> Thanks,
> Chris Bunnell

Sounds like a good feature. I do not need it myself.
How do we avoid sending a user multiple over quota
messages?

Ken Jones





Re: User over quota message

2001-06-27 Thread tonix (Antonio Nati)

I feel it could be solved only patching pop3d demon, letting him generate a 
first fake messages when user mailbox has exceeded (or it's going to do) 
its quota. So it doesn't waste space, it's always delivered, etc.

But, before this patch, I would like to find an unique centralized way to 
store informations on user's used quota (I think if we don't solve this 
point we'll only have dozens of patch for vpopmail, sqwebmail, etc.). Why 
not to use sqwebmail method in an extended way? Or add another field to 
passwd, with real usage stored in it?

Tonino

At 27/06/2001 27/06/2001 +0200, Ken Jones wrote:
>chris wrote:
> >
> > Hello all,
> >
> > I've read the archive about this subject already, but still don't have a
> > clear answer.  I have hardquota set.  I tested it and it worked 
> correctly by
> > bouncing a message > 1K back to the sender, while still allowing <1K
> > messages to be delivered.
> >
> > What I haven't figured out is how to generate a message to the OWNER of the
> > mail box that he/she is over quota and needs to clear out some mail.
> >
> > I saw other's ask this, but never saw a clear answer to that issue.  I'd
> > guess that the C code could be hacked to create an email to the owner 
> at the
> > same time as the "bounce" message, but that sounds more complicated than I
> > think I can handle.
> >
> > Anyone else solve this?
> >
> > Thanks,
> > Chris Bunnell
>
>Sounds like a good feature. I do not need it myself.
>How do we avoid sending a user multiple over quota
>messages?
>
>Ken Jones




Re: User over quota message

2001-06-27 Thread Agus Basyari


> chris wrote:
> >
> > Hello all,
> >
> > I've read the archive about this subject already, but still don't have a
> > clear answer.  I have hardquota set.  I tested it and it worked
correctly by
> > bouncing a message > 1K back to the sender, while still allowing <1K
> > messages to be delivered.
> >
> > What I haven't figured out is how to generate a message to the OWNER of
the
> > mail box that he/she is over quota and needs to clear out some mail.
> >
> > I saw other's ask this, but never saw a clear answer to that issue.  I'd
> > guess that the C code could be hacked to create an email to the owner at
the
> > same time as the "bounce" message, but that sounds more complicated than
I
> > think I can handle.
> >
> > Anyone else solve this?
> >
> > Thanks,
> > Chris Bunnell
>
> Sounds like a good feature. I do not need it myself.
> How do we avoid sending a user multiple over quota
> messages?
>
> Ken Jones
>

With my vdlivermail.c .. it will create ".quotawarn1" and ".quotawarn2"
(with dot) ... and if this file is in user directory, then Admin mail will
not send the warning message. If the quota is less then 80% .. then
vdelivermail will delete both.

If the quotas is becaming between 80 - 90% after more then 90%, vdelivermail
will not send the 80% warning messages, but if you up agian more then 90%,
the warning message will sending again, because it just delete the
.quotawarn2. It's my setting in my system. But if you still do not want the
system to send warning in this situation, you can edit  the vdelivermail.c
in your own setting, maybe not 80 and 90% but 80% and 95%, then you change
0.9 with 0.95.





Re: User over quota message

2001-06-27 Thread Adrian Purnama

Hi,

> > I've read the archive about this subject already, but still don't have a
> > clear answer.  I have hardquota set.  I tested it and it worked
correctly by
> > bouncing a message > 1K back to the sender, while still allowing <1K
> > messages to be delivered.

Can we disable this feature ?

> Sounds like a good feature. I do not need it myself.
> How do we avoid sending a user multiple over quota messages?

Put a flag on a file/table and reset the value when not over quota ?
So when an email coming and the user is over quota, bounce back
the email, and if the flag is unset, send a warning email and set the flag.
When another email coming, and the user is not over quota, send
the email, and if the flag is set, unset it.


Regards,
Adrian Purnama





Re: User over quota message

2001-06-27 Thread Thomas Foerster

Hi,

> chris wrote:
>>
>> Hello all,
>>
>> I've read the archive about this subject already, but still don't have a
>> clear answer.  I have hardquota set.  I tested it and it worked correctly by
>> bouncing a message > 1K back to the sender, while still allowing <1K
>> messages to be delivered.
>>
>> What I haven't figured out is how to generate a message to the OWNER of the
>> mail box that he/she is over quota and needs to clear out some mail.
>>
>> I saw other's ask this, but never saw a clear answer to that issue.  I'd
>> guess that the C code could be hacked to create an email to the owner at the
>> same time as the "bounce" message, but that sounds more complicated than I
>> think I can handle.

> Sounds like a good feature. I do not need it myself.
> How do we avoid sending a user multiple over quota
> messages?

Easy (i think ;) ):

If the user is over quota, check for ~vpopmail/domain/user/.overquota file.
If it doesn't exist, create it and the send the message to the owner. If it already
exist, just bounce the message back (normal behavior).

If the user isn't over quota anymore and the .overquota file exists, delete it.

Thomas




Re: User over quota message

2001-06-27 Thread Ken Jones

chris wrote:
> 
> Hello all,
> 
> I've read the archive about this subject already, but still don't have a
> clear answer.  I have hardquota set.  I tested it and it worked correctly by
> bouncing a message > 1K back to the sender, while still allowing <1K
> messages to be delivered.
> 
> What I haven't figured out is how to generate a message to the OWNER of the
> mail box that he/she is over quota and needs to clear out some mail.
> 
> I saw other's ask this, but never saw a clear answer to that issue.  I'd
> guess that the C code could be hacked to create an email to the owner at the
> same time as the "bounce" message, but that sounds more complicated than I
> think I can handle.
> 
> Anyone else solve this?
> 
> Thanks,
> Chris Bunnell

Sounds like a good feature. I do not need it myself.
How do we avoid sending a user multiple over quota
messages?

Ken Jones



Re: User over quota message

2001-06-26 Thread Agus Basyari

Yeah , i add some tag in vpopmail's source code. To generate a message like
warning massage if the quotas are more than 80% and 90%, I used like
sqwebmail's way to generate massages. This tag will copy a file to "NEW"
directory.The file like an email, have a subject,body message, form etc (if
on sqwebmail's file is named "quotawarn").
My step :
1. Copy file quotawarn to directory ~VPOPMAILDIR/bin/

2. Add after
void deliver_mail(..
 {
 
char 
   with
char tempe[256];

3. Then in this procedure, before

  }

   I add with :

  if (yourquota >= 0.9) {
  sprintf(tempe, "/bin/cp -u %s/bin/quotawarn1
new/quotawarn",VPOPMAILDIR);
  system(tempe);
  }

   but the yourquota is the other tag to calculate your quota.
   like: yourquota = quotasize/currentsize.

But if you want to be like my system.
I use vpopmail-4.9.10.
Then you just change your vdelivermail.c with my vdelivermail.c
And copy the quotawarn1 and quotawarn2 to your ~VPOPMAILDIR/bin/
Change the form field on quotawarn1 and quotawarn2 with your email.
It will bounce the new mail if equal or more than 100%, and the size is 0.3
k (the standart is 1 k)

Agus Basyari
http://www.brawijaya.ac.id
email: [EMAIL PROTECTED]


> Hello all,
>
> I've read the archive about this subject already, but still don't have a
> clear answer.  I have hardquota set.  I tested it and it worked correctly
by
> bouncing a message > 1K back to the sender, while still allowing <1K
> messages to be delivered.
>
> What I haven't figured out is how to generate a message to the OWNER of
the
> mail box that he/she is over quota and needs to clear out some mail.
>
> I saw other's ask this, but never saw a clear answer to that issue.  I'd
> guess that the C code could be hacked to create an email to the owner at
the
> same time as the "bounce" message, but that sounds more complicated than I
> think I can handle.
>
> Anyone else solve this?
>
> Thanks,
> Chris Bunnell
>
>
>

 quotawarn1
 quotawarn2
 vdelivermail.c