Re: Sieve RFC5490 checks user quota usage

2017-03-22 Thread Paolo Cravero

Il 21 marzo 2017 alle 19.19 Nic Bernstein ha scritto:Paolo,Attached is the script we've been using for ages for this purpose. Ouruses LDAP as a source of user ID information, but it could be easilyadapted for other AAA databases.Thank you Nic. That's a good alternative.My request about doing it with sieve was to mimick Sun JES/Messaging behaviour that sent the overrquota warning upon new message receipt (only once) or, in case of no incoming traffic, on user login (not with sieve in this case, obviously).On a multiserver deployment with specialised systems (cyruses on their own machine, postfixes on another, imap proxies on third systems), Merlin's suggested approach is not practical.So, dealing locally with the output of quota helper tool is still the way to go. Simple. Stable. Flexible. Available.Paolo
 

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-21 Thread Nic Bernstein

Paolo,
Attached is the script we've been using for ages for this purpose. Our 
uses LDAP as a source of user ID information, but it could be easily 
adapted for other AAA databases.


Cheers,
-nic

On 03/21/2017 10:59 AM, Paolo Cravero wrote:


And for Nic, yes, I mean the "IMAP STORAGE quota". I would like to 
warn the user that his quota is about to fill up through an email, 
triggered on new mail arrival or login. Why? Because not all clients 
support reading the quota over IMAP or handling an alert (think of 
some smartphone IMAP client or an (active)sync system).


Is there a way to achieve the same result somehow, with stock cyrus?



--
Nic Bernstein n...@onlight.com
Onlight, Inc. www.onlight.com
6525 W Bluemound Road, Suite 24   v. 414.272.4477
Milwaukee, Wisconsin  53213-4073



quota-report.sh
Description: application/shellscript
<>
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-21 Thread Michael Menge

Hi,

Quoting Paolo Cravero :


And for Nic, yes, I mean the "IMAP STORAGE quota". I would like to warn the
user that his quota is about to fill up through an email, triggered on new
mail arrival or login. Why? Because not all clients support reading the
quota over IMAP or handling an alert (think of some smartphone IMAP client
or an (active)sync system).

Is there a way to achieve the same result somehow, with stock cyrus?



We have a daily cron-job which checks the quota usage and informs
the user via mail if more than 85% is used. The scripts limits the  mails
send to each user to one every week. An other mail is send if 100%
usage is reached.

Two other ways i can think of is parsing cyrus logs, or using the  
notify daemon




Michael


M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-21 Thread Paolo Cravero

There is no mailbox annotation that exposes quota that could be used with the mboxmetadata extension (RFC5490) and there is no current Sieve extension for checking quota.Thank you Ken. Given the double negative answer I guess that developing such a feature would require a lot of work, or it is not possible at all.And for Nic, yes, I mean the "IMAP STORAGE quota". I would like to warn the user that his quota is about to fill up through an email, triggered on new mail arrival or login. Why? Because not all clients support reading the quota over IMAP or handling an alert (think of some smartphone IMAP client or an (active)sync system).Is there a way to achieve the same result somehow, with stock cyrus?PaoloOn 03/17/2017 11:01 AM, Paolo Cravero wrote:Hello.I am trying to figure out if sieve, with RFC5490 support, is able to read user's disk quota (used) and act accordingly. I would like to trigger a mail to "self" if quota is above a given percent. Something like a vacation message (so once a day or so), triggered on arrival AND if quota is above X %. If sieve doesn't support this, is there another way to do it? Thanks and have a nice weekend,Paolo 
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
 

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-21 Thread Merlin Hartley
You could do it with your MTA instead - you could write a filter/router/acl in 
exim for example - these can use arbitrary command output to decide on what to 
do with a message.

M


--
Merlin Hartley
Computer Officer
MRC Mitochondrial Biology Unit
Cambridge, CB2 0XY
United Kingdom

> On 21 Mar 2017, at 15:59, Paolo Cravero  wrote:
> 
> 
> 
>> There is no mailbox annotation that exposes quota that could be used with 
>> the mboxmetadata extension (RFC5490) and there is no current Sieve extension 
>> for checking quota.
>> 
> Thank you Ken. Given the double negative answer I guess that developing such 
> a feature would require a lot of work, or it is not possible at all.
> 
> 
> 
> And for Nic, yes, I mean the "IMAP STORAGE quota". I would like to warn the 
> user that his quota is about to fill up through an email, triggered on new 
> mail arrival or login. Why? Because not all clients support reading the quota 
> over IMAP or handling an alert (think of some smartphone IMAP client or an 
> (active)sync system).
> 
> Is there a way to achieve the same result somehow, with stock cyrus?
> 
> Paolo
> 
> 
> 
>> On 03/17/2017 11:01 AM, Paolo Cravero wrote:
>>> Hello.
>>> I am trying to figure out if sieve, with RFC5490 support, is able to read 
>>> user's disk quota (used) and act accordingly.
>>>  
>>> I would like to trigger a mail to "self" if quota is above a given percent. 
>>> Something like a vacation message (so once a day or so), triggered on 
>>> arrival AND if quota is above X %.
>>>  
>>> If sieve doesn't support this, is there another way to do it?
>>>  
>>> Thanks and have a nice weekend,
>>> Paolo
>>> 
>>> 
>>> 
>>> Cyrus Home Page: http://www.cyrusimap.org/ 
>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ 
>>> 
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus 
>>> 
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-17 Thread Ken Murchison
There is no mailbox annotation that exposes quota that could be used 
with the mboxmetadata extension (RFC5490) and there is no current Sieve 
extension for checking quota.



On 03/17/2017 11:01 AM, Paolo Cravero wrote:

Hello.
I am trying to figure out if sieve, with RFC5490 support, is able to 
read user's disk quota (used) and act accordingly.
I would like to trigger a mail to "self" if quota is above a given 
percent. Something like a vacation message (so once a day or so), 
triggered on arrival AND if quota is above X %.

If sieve doesn't support this, is there another way to do it?
Thanks and have a nice weekend,
Paolo



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


--
Kenneth Murchison
Principal Systems Software Engineer
Carnegie Mellon University


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve RFC5490 checks user quota usage

2017-03-17 Thread Nic Bernstein

Paolo,
Please clarify; when you say "disk quota," do you mean a filesystem 
level quota, or do you really mean IMAP STORAGE quota, as administered 
through Cyrus?

-nic

On 03/17/2017 10:01 AM, Paolo Cravero wrote:

Hello.
I am trying to figure out if sieve, with RFC5490 support, is able to 
read user's disk quota (used) and act accordingly.
I would like to trigger a mail to "self" if quota is above a given 
percent. Something like a vacation message (so once a day or so), 
triggered on arrival AND if quota is above X %.

If sieve doesn't support this, is there another way to do it?
Thanks and have a nice weekend,
Paolo



Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


--
Nic Bernstein n...@onlight.com
Onlight, Inc. www.onlight.com
6525 W Bluemound Road, Suite 24   v. 414.272.4477
Milwaukee, Wisconsin  53213-4073

<>
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Sieve RFC5490 checks user quota usage

2017-03-17 Thread Paolo Cravero
Hello.
I am trying to figure out if sieve, with RFC5490 support, is able to read
user's disk quota (used) and act accordingly.
 
I would like to trigger a mail to "self" if quota is above a given percent.
Something like a vacation message (so once a day or so), triggered on
arrival AND if quota is above X %.
 
If sieve doesn't support this, is there another way to do it?
 
Thanks and have a nice weekend,
Paolo
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus