How to exclude "Archived" email from Quota usage ?

2019-06-06 Thread Jayesh Shinde

Hi ,

I am testing Archiving  feature with Cyrus-imapd-3.0.9 .

Is it possible to exclude the mailbox quota for "Archived emails" ( 
which is in different partition )  and only consider mailbox quota of 
default partition ?


OR

Is it possible to know how much quota used for end user's mailbox in 
Archive partition ?


By  listquota command I am able to view overall Mailbox Quota.

Thank You

Regards
Jayesh Shinde

https://ps1.saymails.com/client_customize/raman/reg_lp.php?utm_source=email-disclaimerutm_medium=emailutm_campaign=beatraman


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: script to check quota failed

2019-03-19 Thread Stephane Branchoux

Hello,

My solution was to rename a user sub folder whose length was 240 
caracters ( file name too long).


open("/var/lib/imap/quota/a/user.myuser.Diffusion 2nd 
degr relative au d de fonctionnaires dans 
les corps enseignants du second degr, des personnels 
d' et des psychologues de l' nationale 
relevant du minist de l' nationale", O_RDWR) = -1 
ENAMETOOLONG (File name too long)


And now my script runs without any problem.

Thanks

Le 18/03/2019 à 17:23, Simon Matter via Info-cyrus a écrit :

Hi,

seems that there is a problem with your cyrus quota tree
(/var/lib/cyrus/quota) or at least some of its files.

In the case of RHEL6 this will be /var/lib/imap/quota/.

I suggest to look at the quota files there, they have names like
user. and are text files with two lines. Should be easy to find
the broken file.

Regards,
Simon


Maybe strace command may help you find which files are corrupt:
su - cyrus -c "strace /usr/lib/cyrus-imapd/quota user"

Anthony Prades

On 3/18/19 2:32 PM, Stephane Branchoux wrote:

Hello,

We run cyrus-imapd-2.3.16-6 on a Red Hat Enterprise Linux Server
release 6.10.

2 days ago, a power crash occured in our Datacenter.

After reboot of cyrus imap, all seems ok except our script to check
quota :

su - cyrus -c "/usr/lib/cyrus-imapd/quota user"
failed building quota list for 'user': System I/O error: %m

I tried :

  su - cyrus -c "/usr/lib/cyrus-imapd/quota -f"
failed building quota list for '*': System I/O error: %m

Any idea ?

Many thanks in advance



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


--
Stephane BRANCHOUX
Centre de Ressources Informatiques de l'Université de Perpignan.
Systèmes/Réseaux - RSSI
mailto:stephane.branch...@univ-perp.fr
04 68 66 21 24 / 07 60 73 38 42




smime.p7s
Description: Signature cryptographique S/MIME

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: script to check quota failed

2019-03-18 Thread Simon Matter via Info-cyrus
> Hi,
>
> seems that there is a problem with your cyrus quota tree
> (/var/lib/cyrus/quota) or at least some of its files.

In the case of RHEL6 this will be /var/lib/imap/quota/.

I suggest to look at the quota files there, they have names like
user. and are text files with two lines. Should be easy to find
the broken file.

Regards,
Simon

>
> Maybe strace command may help you find which files are corrupt:
> su - cyrus -c "strace /usr/lib/cyrus-imapd/quota user"
>
> Anthony Prades
>
> On 3/18/19 2:32 PM, Stephane Branchoux wrote:
>> Hello,
>>
>> We run cyrus-imapd-2.3.16-6 on a Red Hat Enterprise Linux Server
>> release 6.10.
>>
>> 2 days ago, a power crash occured in our Datacenter.
>>
>> After reboot of cyrus imap, all seems ok except our script to check
>> quota :
>>
>> su - cyrus -c "/usr/lib/cyrus-imapd/quota user"
>> failed building quota list for 'user': System I/O error: %m
>>
>> I tried :
>>
>>  su - cyrus -c "/usr/lib/cyrus-imapd/quota -f"
>> failed building quota list for '*': System I/O error: %m
>>
>> Any idea ?
>>
>> Many thanks in advance
>>
>>
>> 
>> 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: script to check quota failed

2019-03-18 Thread Anthony Prades via Info-cyrus
Hi,

seems that there is a problem with your cyrus quota tree
(/var/lib/cyrus/quota) or at least some of its files.

Maybe strace command may help you find which files are corrupt:
su - cyrus -c "strace /usr/lib/cyrus-imapd/quota user"

Anthony Prades

On 3/18/19 2:32 PM, Stephane Branchoux wrote:
> Hello,
>
> We run cyrus-imapd-2.3.16-6 on a Red Hat Enterprise Linux Server
> release 6.10.
>
> 2 days ago, a power crash occured in our Datacenter.
>
> After reboot of cyrus imap, all seems ok except our script to check
> quota :
>
> su - cyrus -c "/usr/lib/cyrus-imapd/quota user"
> failed building quota list for 'user': System I/O error: %m
>
> I tried :
>
>  su - cyrus -c "/usr/lib/cyrus-imapd/quota -f"
> failed building quota list for '*': System I/O error: %m
>
> Any idea ?
>
> Many thanks in advance
>
>
> 
> 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

script to check quota failed

2019-03-18 Thread Stephane Branchoux

Hello,

We run cyrus-imapd-2.3.16-6 on a Red Hat Enterprise Linux Server release 
6.10.


2 days ago, a power crash occured in our Datacenter.

After reboot of cyrus imap, all seems ok except our script to check quota :

su - cyrus -c "/usr/lib/cyrus-imapd/quota user"
failed building quota list for 'user': System I/O error: %m

I tried :

 su - cyrus -c "/usr/lib/cyrus-imapd/quota -f"
failed building quota list for '*': System I/O error: %m

Any idea ?

Many thanks in advance

--
Stephane BRANCHOUX
Centre de Ressources Informatiques de l'Université de Perpignan.
Systèmes/Réseaux - RSSI
mailto:stephane.branch...@univ-perp.fr
04 68 66 21 24 / 07 60 73 38 42




smime.p7s
Description: Signature cryptographique S/MIME

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: HELP: Can't fix quota, it seems renamed-back mailbox doesn't exists at all

2018-12-05 Thread Javier Angulo


On 12/4/18 5:53 PM, Heiler Bemerguy via Info-cyrus wrote:
> Hail, this is a Cyrus 2.5.10-3 on Debian 9
> 
> A mailbox was accidentaly deleted, as the log shows:
> 
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque -> DELETED.user.planejamento^funbosque.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque.Drafts ->
> DELETED.user.planejamento^funbosque.Drafts.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque.Drafts
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque.Junk ->
> DELETED.user.planejamento^funbosque.Junk.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque.Junk
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque.Sent ->
> DELETED.user.planejamento^funbosque.Sent.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque.Sent
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque.Spam ->
> DELETED.user.planejamento^funbosque.Spam.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque.Spam
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename:
> user.planejamento^funbosque.Trash ->
> DELETED.user.planejamento^funbosque.Trash.5C0695AA
> Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox
> user.planejamento^funbosque.Trash
> 
> I renamed it back to try to recover it, manually with cyradm:
> 
> Dec  4 12:59:38 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.5C0695AA -> user.planejamento^funbosque
> Dec  4 12:59:38 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.5C0695AA
> Dec  4 13:02:03 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.Drafts.5C0695AA ->
> user.planejamento^funbosque.Drafts
> Dec  4 13:02:03 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.Drafts.5C0695AA
> Dec  4 13:02:27 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.Junk.5C0695AA ->
> user.planejamento^funbosque.Junk
> Dec  4 13:02:27 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.Junk.5C0695AA
> Dec  4 13:02:54 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.Sent.5C0695AA ->
> user.planejamento^funbosque.Sent
> Dec  4 13:02:54 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.Sent.5C0695AA
> Dec  4 13:03:20 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.Spam.5C0695AA ->
> user.planejamento^funbosque.Spam
> Dec  4 13:03:20 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.Spam.5C0695AA
> Dec  4 13:04:18 localhost cyrus/imap[39601]: Rename:
> DELETED.user.planejamento^funbosque.Trash.5C0695AA ->
> user.planejamento^funbosque.Trash
> Dec  4 13:04:18 localhost cyrus/imap[39601]: Deleted mailbox
> DELETED.user.planejamento^funbosque.Trash.5C0695AA
> 
> All the files are there on the filesystem, but the quota usage isn't
> right. I've already tried
> 
>   cyrus reconstruct -r -f user/planejamento^funbosque
>   cyrus quota -f user/planejamento^funbosque
>   cyrus quota -f user/planejamento.funbosque
> 
> And a full "cyrus check" with no luck.. The command LQ simply shows
> nothing. Like this:
> 
> 127.0.0.1> lq user/planejamento.funbosque
> 
> Any ideas?!
> 
> root@mailer:/var/spool/cyrus/mail/p/user/planejamento^funbosque# cat
> cyrus.header
> Cyrus mailbox header
> "The best thing about this system was that it had lots of goals."
>     --Jim Morris on Andrew
>     3e5650f459303706
> $MDNSent $Forwarded
> planejamento.funbosque  lrswipkxtecdan
> root@mailer:/var/spool/cyrus/mail/p/user/planejamento^funbosque# du -hs
> 570M    .
> 
> 


From my experience (recently tested this on cyrus 3.0), quota info is
removed on deletion and you have to set it again after renaming back
from DELETED.

Cheers,
Javier.



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

HELP: Can't fix quota, it seems renamed-back mailbox doesn't exists at all

2018-12-04 Thread Heiler Bemerguy via Info-cyrus

Hail, this is a Cyrus 2.5.10-3 on Debian 9

A mailbox was accidentaly deleted, as the log shows:

Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque -> DELETED.user.planejamento^funbosque.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque
Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque.Drafts -> 
DELETED.user.planejamento^funbosque.Drafts.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque.Drafts
Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque.Junk -> 
DELETED.user.planejamento^funbosque.Junk.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque.Junk
Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque.Sent -> 
DELETED.user.planejamento^funbosque.Sent.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque.Sent
Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque.Spam -> 
DELETED.user.planejamento^funbosque.Spam.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque.Spam
Dec  4 11:56:42 localhost cyrus/imap[27354]: Rename: 
user.planejamento^funbosque.Trash -> 
DELETED.user.planejamento^funbosque.Trash.5C0695AA
Dec  4 11:56:42 localhost cyrus/imap[27354]: Deleted mailbox 
user.planejamento^funbosque.Trash


I renamed it back to try to recover it, manually with cyradm:

Dec  4 12:59:38 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.5C0695AA -> user.planejamento^funbosque
Dec  4 12:59:38 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.5C0695AA
Dec  4 13:02:03 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.Drafts.5C0695AA -> 
user.planejamento^funbosque.Drafts
Dec  4 13:02:03 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.Drafts.5C0695AA
Dec  4 13:02:27 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.Junk.5C0695AA -> 
user.planejamento^funbosque.Junk
Dec  4 13:02:27 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.Junk.5C0695AA
Dec  4 13:02:54 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.Sent.5C0695AA -> 
user.planejamento^funbosque.Sent
Dec  4 13:02:54 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.Sent.5C0695AA
Dec  4 13:03:20 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.Spam.5C0695AA -> 
user.planejamento^funbosque.Spam
Dec  4 13:03:20 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.Spam.5C0695AA
Dec  4 13:04:18 localhost cyrus/imap[39601]: Rename: 
DELETED.user.planejamento^funbosque.Trash.5C0695AA -> 
user.planejamento^funbosque.Trash
Dec  4 13:04:18 localhost cyrus/imap[39601]: Deleted mailbox 
DELETED.user.planejamento^funbosque.Trash.5C0695AA


All the files are there on the filesystem, but the quota usage isn't 
right. I've already tried


  cyrus reconstruct -r -f user/planejamento^funbosque
  cyrus quota -f user/planejamento^funbosque
  cyrus quota -f user/planejamento.funbosque

And a full "cyrus check" with no luck.. The command LQ simply shows 
nothing. Like this:


127.0.0.1> lq user/planejamento.funbosque

Any ideas?!

root@mailer:/var/spool/cyrus/mail/p/user/planejamento^funbosque# cat 
cyrus.header

Cyrus mailbox header
"The best thing about this system was that it had lots of goals."
    --Jim Morris on Andrew
    3e5650f459303706
$MDNSent $Forwarded
planejamento.funbosque  lrswipkxtecdan
root@mailer:/var/spool/cyrus/mail/p/user/planejamento^funbosque# du -hs
570M    .


--

Atenciosamente,

Heiler Bensimon Bemerguy - CINBESA
Analista de Redes, Wi-Fi,
Virtualização e Serviços Internet
(55) 91 98151-4894


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: Invalid user returned from quota -f command

2018-08-07 Thread Hiago Prata
I'm running Cyrus version 2.5.10. 

On 2018-07-23 23:44, ellie timoney wrote:

> Hi, 
> 
> Which version of Cyrus are you using? 
> 
> Cheers, 
> 
> ellie 
> 
> On Thu, Jul 19, 2018, at 12:31 AM, Hiago Prata wrote: 
> 
> Hi, many users have been complaining about their quota usage being displayed 
> wrongly. When trying to solve that using QUOTA -F, the command returned a 
> System I/O Error due to the nonexistence of some invalid mailboxes that are 
> not even listed under CTL_MBOXLIST -D, such as: '' (empty string) and 
> DELETED.user.teste3cyrus.5A902111EFJulho 2017.5B2E7DCF4DE7725F3314. 
> 
> Here is the full output of the command: 
> 
> failed opening header for mailbox 
> 'domain.com!DELETED.user.teste3cyrus.5A902111EFJulho 
> 2017.5B2E7DCF4DE7725F3314': System I/O error: No such file or directory 
> processing mbox list for '': System I/O error: No such file or directory 
> 
> Can anyone that has ever faced something like this help me?
> 
> -- 
> 
> Hiago Prata 
> Graduando em Engenharia da Computação 
> DataCenter da UFPA - CTIC 
> Faculdade de Engenharia da 
> Computação e Telecomunicações - ITEC 
> Universidade Federal do Pará 
>  
> 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 

-- 
Hiago Prata
Graduando em Engenharia da Computação
DataCenter da UFPA - CTIC
Faculdade de Engenharia da
Computação e Telecomunicações - ITEC
Universidade Federal do Pará
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: Invalid user returned from quota -f command

2018-07-23 Thread ellie timoney
Hi,

Which version of Cyrus are you using?

Cheers,

ellie

On Thu, Jul 19, 2018, at 12:31 AM, Hiago Prata wrote:
> Hi, many users have been complaining about their quota usage being
> displayed wrongly. When trying to solve that using *quota -f*, the
> command returned a System I/O Error due to the nonexistence of some
> invalid mailboxes that are not even listed under *ctl_mboxlist -d*,
> such as: '' (empty string) and
> DELETED.user.teste3cyrus.5A902111EFJulho 2017.5B2E7DCF4DE7725F3314.> Here is 
> the full output of the command:


>> failed opening header for mailbox
>> 'domain.com!DELETED.user.teste3cyrus.5A902111EFJulho
>> 2017.5B2E7DCF4DE7725F3314': System I/O error: No such file or
>> directory>> processing mbox list for '': System I/O error: No such file or
>> directory> Can anyone that has ever faced something like this help me?


> -- 
> 
> Hiago Prata
>  Graduando em Engenharia da Computação
>  DataCenter da UFPA - CTIC
>  Faculdade de Engenharia da
>  Computação e Telecomunicações - ITEC
>  Universidade Federal do Pará
> 
> 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

Invalid user returned from quota -f command

2018-07-18 Thread Hiago Prata
Hi, many users have been complaining about their quota usage being
displayed wrongly. When trying to solve that using QUOTA -F, the command
returned a System I/O Error due to the nonexistence of some invalid
mailboxes that are not even listed under CTL_MBOXLIST -D, such as: ''
(empty string) and DELETED.user.teste3cyrus.5A902111EFJulho
2017.5B2E7DCF4DE7725F3314. 

Here is the full output of the command:

> failed opening header for mailbox 
> 'domain.com!DELETED.user.teste3cyrus.5A902111EFJulho 
> 2017.5B2E7DCF4DE7725F3314': System I/O error: No such file or directory
> processing mbox list for '': System I/O error: No such file or directory

Can anyone that has ever faced something like this help me?

-- 
Hiago Prata
Graduando em Engenharia da Computação
DataCenter da UFPA - CTIC
Faculdade de Engenharia da
Computação e Telecomunicações - ITEC
Universidade Federal do Pará
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: over quota not working

2018-07-11 Thread ellie timoney
Hi Rudolf,

Have you checked the output from quota(8) to see if the quota database
contents look sensible?
What value do you have for the unixhierarchysep imapd.conf setting?

Cheers,

ellie

On Tue, Jul 10, 2018, at 11:30 PM, Rudolf Gabler wrote:
> Hi,
> 
> On the stable release 3.0.7 (self-compiled on centos 6) I have


> lmtp_over_quota_perm_failure: on
> lmtp_strict_quota: on

> in my imapd.conf. I came from 2.5.5 where quotas where in effect but
> now messages are delivered even when the user is overquota. What may
> be the problem?> Regards,


> Rudi G.
> 
> 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
> Email had 1 attachment:


>  * signature.asc 1k (application/pgp-signature)

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

over quota not working

2018-07-10 Thread Rudolf Gabler
Hi,

On the stable release 3.0.7 (self-compiled on centos 6) I have

lmtp_over_quota_perm_failure: on
lmtp_strict_quota: on

in my imapd.conf. I came from 2.5.5 where quotas where in effect but now 
messages are delivered even when the user is overquota. What may be the problem?

Regards,

Rudi G.


signature.asc
Description: Message signed with OpenPGP

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: IMAPD Missing quota root

2018-05-23 Thread James B. Byrne via Info-cyrus

On Wed, May 23, 2018 03:18, Michael Menge wrote:
> Hi,
>
>
> Quoting "James B. Byrne via Info-cyrus"
> <info-cyrus@lists.andrew.cmu.edu>:
>
>> We have a problem with quota settings on a new v3.0.5 service. The
>> mailboxes were transferred via rsync from oldserver:/var/spool/imap/
>> to newserver:/var/spool/imap
>>
>> The mailboxes.db was unloaded on the old server using mboxelist,
>> transferred to the new server, and then loaded into an empty
>> mailboxes.db.
>>
>
> Did you also rsync the config dir (see man imapd.conf
> configdirectory:)?
> It is often set to /var/lib/imap
>

Yes I did:

rsync \
  --chown=cyrus:cyrus \
  --delete-after \
  --group \
  --hard-links \
  --links \
  --owner \
  --perms \
  --progress \
  --recursive \
  --specials \
  --times \
  --verbose \
  --rsh="ssh " \
  --exclude="delivery.db" \
  --exclude="ptscache.db" \
  --exclude="socket" \
  --exclude="statuscache.db" \
  --exclude="tls_sessions.db" \
 remotehost:/var/lib/imap  \
 localhost:/var/imap



-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


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: IMAPD Missing quota root

2018-05-23 Thread Michael Menge

Hi,


Quoting "James B. Byrne via Info-cyrus" <info-cyrus@lists.andrew.cmu.edu>:


We have a problem with quota settings on a new v3.0.5 service. The
mailboxes were transferred via rsync from oldserver:/var/spool/imap/
to newserver:/var/spool/imap

The mailboxes.db was unloaded on the old server using mboxelist,
transferred to the new server, and then loaded into an empty
mailboxes.db.



Did you also rsync the config dir (see man imapd.conf configdirectory:)?
It is often set to /var/lib/imap





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

IMAPD Missing quota root

2018-05-22 Thread James B. Byrne via Info-cyrus
We have a problem with quota settings on a new v3.0.5 service. The
mailboxes were transferred via rsync from oldserver:/var/spool/imap/
to newserver:/var/spool/imap

The mailboxes.db was unloaded on the old server using mboxelist,
transferred to the new server, and then loaded into an empty
mailboxes.db.

We ran 'reconstruct -f -r -G -V max user/*'.  All this when well. 
However, we cannot re-establish a quota root for the transferred
mailboxes.  When we try to run quota from the command line then we see
this:

sudo -u cyrus /usr/local/cyrus/sbin/quota -f user/*
   Quota   % Used Used Resource Root

If we just run it to get a list of the user quotas then we the same
thing:

sudo -u cyrus /usr/local/cyrus/sbin/quota
   Quota   % Used Used Resource Root

And if we run it to rebuild the quotas for a specific user then we
first see this:

# sudo -u cyrus /usr/local/cyrus/sbin/quota -f user.x
user.x: quota root user.x --> (none)
user.x.Bayshore_Hobbies: quota root user.x --> (none)
user.x.Drafts: quota root user.x --> (none)
user.x.HLL: quota root user.x --> (none)
.  .  .

But if we rerun the same command after seeing the above then we this
instead:

# sudo -u cyrus /usr/local/cyrus/sbin/quota -f user.x
   Quota   % Used Used Resource Root

In maillog we see things like this:

May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: LOSTQUOTA: unable to
record change of 1639 bytes and 1 messages in quota user.x: Quota root
does not exist
May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: Delivered:
<20180522120340.067...@imap.internal.harte-lyne.ca> to mailbox:
user.x.delivery
May 22 12:03:43 inet17 CYRUS/lmtpunix[85335]: USAGE x user: 0.010593
sys: 0.010593

and this:

May 22 04:14:00 inet17 CYRUS/ipurge[68591]: Expunged 33 messages from
user.y.Sent
May 22 04:14:00 inet17 CYRUS/ipurge[68591]: LOSTQUOTA: unable to
record change of -1634898 bytes and -33 messages in quota user.y:
Quota root does not exist.

May 22 04:10:00 inet17 CYRUS/ipurge[63950]: Expunged 252 messages from
user.x.Trash
May 22 04:10:00 inet17 CYRUS/ipurge[63950]: LOSTQUOTA: unable to
record change of -22899753 bytes and -252 messages in quota user.x:
Quota root does not exist


On the old (v2.3) service we have no such problems.

How do I transfer quotas?  How do I create the missing quota roots?


-- 
***  e-Mail is NOT a SECURE channel  ***
Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrnemailto:byrn...@harte-lyne.ca
Harte & Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


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: Cyrus 3.0.4 - Over quota returns 550-Mailbox unknown

2017-11-07 Thread ellie timoney
This is now merged, and will be in the next Cyrus release.  Thanks all!
Cheers,

ellie


On Fri, Nov 3, 2017, at 11:18 AM, Bron Gondwana wrote:
> I have created https://github.com/cyrusimap/cyrus-imapd/issues/2191 to
> track this.  Thanks for the patch!> 
> Cheers,
> 
> Bron.
> 
> 
> On Fri, 3 Nov 2017, at 00:38, Edda wrote:
>> Hi,
>> 
>> that's surprising and the same here.
>> 
>> I think there is a bug in imap/lmtpengine.c, function
>> process_recipient:>> 
>> verify_user returns the correct error code as we can see with
>> LOG_DEBUG>> "on":
>> 
>> Nov  2 14:10:50 popc lmtp[2092]: verify_user(t...@sendmaid.org)
>> failed:>> Over quota
>> 
>> but this return code is not used in process_recipient
>> 
>> There we have:
>> [...]
>> if (sl) {
>> char *rcpt = xstrndup(addr, sl);
>> mbname = mbname_from_recipient(rcpt, msg->ns);
>> free(rcpt);
>> 
>> int forcedowncase =
>> config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);>> if 
>> (forcedowncase) mbname_downcaseuser(mbname);
>> 
>> /* strip username if postuser */
>> if (!strcmpsafe(mbname_localpart(mbname),
>> config_getstring(IMAPOPT_POSTUSER))) {
>> mbname_set_localpart(mbname, NULL);
>> if (!config_virtdomains ||
>> !strcmpsafe(mbname_domain(mbname), config_defdomain))
>> mbname_set_domain(mbname, NULL);
>> }
>> 
>> if (verify_user(mbname,
>> (quota_t) (ignorequota ? -1 : msg->size),
>> ignorequota ? -1 : 1, msg->authstate)) {
>> mbname_free();
>> }
>> }
>> 
>> if (!mbname) {
>> const char *catchall =
>> config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);
>> if (catchall) {
>> mbname = mbname_from_userid(catchall);
>> if (verify_user(mbname,
>> ignorequota ? -1 : msg->size,
>> ignorequota ? -1 : 1, msg->authstate)) {>>   
>>   mbname_free();
>> }
>> }
>> }
>> 
>> if (!mbname) {
>> /* we lost */
>> return IMAP_MAILBOX_NONEXISTENT;
>> }
>> [...]
>> 
>> means as far as I understand: if verify_user returns its error (for
>> example IMAP_QUOTA_EXCEEDED), mbname is freed and process_recipient
>> always returns IMAP_MAILBOX_NONEXISTENT.
>> 
>> Below is a patch that works for me. But I don't know if this
>> is a good>> way to fix it.
>> Hopefully one of the developers helps :)
>> 
>> Regards, Edda
>> 
>> 
>> diff -Naur cyrus-imapd-3.0.4.orig/imap/lmtpengine.c
>> cyrus-imapd-3.0.4/imap/lmtpengine.c
>> --- cyrus-imapd-3.0.4.orig/imap/lmtpengine.c2017-09-04
>> 02:09:46.0 +0200
>> +++ cyrus-imapd-3.0.4/imap/lmtpengine.c2017-11-02
>> 13:59:56.764175245>> +0100
>> @@ -830,6 +830,7 @@
>>  }
>> 
>>  mbname_t *mbname = NULL;
>> +int r = 0;
>> 
>>  size_t sl = strlen(addr);
>>  if (addr[sl-1] == '>') sl--;
>> @@ -849,7 +850,7 @@
>>  mbname_set_domain(mbname, NULL);
>>  }
>> 
>> -if (verify_user(mbname,
>> +if (r = verify_user(mbname,
>>  (quota_t) (ignorequota ? -1 : msg->size),
>>  ignorequota ? -1 : 1, msg->authstate)) {
>>  mbname_free();
>> @@ -860,7 +861,7 @@
>>  const char *catchall =
>> config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);
>>  if (catchall) {
>>  mbname = mbname_from_userid(catchall);
>> -if (verify_user(mbname,
>> +if (r = verify_user(mbname,
>>  ignorequota ? -1 : msg->size,
>>  ignorequota ? -1 : 1, msg->authstate)) {>>  
>> mbname_free();
>> @@ -870,6 +871,9 @@
>> 
>>  if (!mbname) {
>>  /* we lost */
>> +if (r) {
>> +return r;
>> +}
>>  return IMAP_MAILBOX_NONEXISTENT;
>>  }
>> 
>> 
>> 
>> Am 02.11.17 um 09:27 schrieb Maros Vegh:
>>> Hello,
>>> 
>>> i'm using compiled cyrus version 3.0.4 on Debian 9.2.
>>> 
>>> When the Postfix server is trying to

Re: Cyrus 3.0.4 - Over quota returns 550-Mailbox unknown

2017-11-02 Thread Bron Gondwana
I have created https://github.com/cyrusimap/cyrus-imapd/issues/2191 to
track this.  Thanks for the patch!
Cheers,

Bron.


On Fri, 3 Nov 2017, at 00:38, Edda wrote:
> Hi,
> 
> that's surprising and the same here.
> 
> I think there is a bug in imap/lmtpengine.c, function
> process_recipient:> 
> verify_user returns the correct error code as we can see with
> LOG_DEBUG> "on":
> 
> Nov  2 14:10:50 popc lmtp[2092]: verify_user(t...@sendmaid.org)
> failed:> Over quota
> 
> but this return code is not used in process_recipient
> 
> There we have:
> [...]
> if (sl) {
> char *rcpt = xstrndup(addr, sl);
> mbname = mbname_from_recipient(rcpt, msg->ns);
> free(rcpt);
> 
> int forcedowncase =
> config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);> if 
> (forcedowncase) mbname_downcaseuser(mbname);
> 
> /* strip username if postuser */
> if (!strcmpsafe(mbname_localpart(mbname),
> config_getstring(IMAPOPT_POSTUSER))) {
> mbname_set_localpart(mbname, NULL);
> if (!config_virtdomains ||
> !strcmpsafe(mbname_domain(mbname), config_defdomain))
> mbname_set_domain(mbname, NULL);
> }
> 
> if (verify_user(mbname,
> (quota_t) (ignorequota ? -1 : msg->size),
> ignorequota ? -1 : 1, msg->authstate)) {
> mbname_free();
> }
> }
> 
> if (!mbname) {
> const char *catchall =
> config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);
> if (catchall) {
> mbname = mbname_from_userid(catchall);
> if (verify_user(mbname,
> ignorequota ? -1 : msg->size,
> ignorequota ? -1 : 1, msg->authstate)) {
> mbname_free();
> }
> }
> }
> 
> if (!mbname) {
> /* we lost */
> return IMAP_MAILBOX_NONEXISTENT;
> }
> [...]
> 
> means as far as I understand: if verify_user returns its error (for
> example IMAP_QUOTA_EXCEEDED), mbname is freed and process_recipient
> always returns IMAP_MAILBOX_NONEXISTENT.
> 
> Below is a patch that works for me. But I don't know if this is a good> way 
> to fix it.
> Hopefully one of the developers helps :)
> 
> Regards, Edda
> 
> 
> diff -Naur cyrus-imapd-3.0.4.orig/imap/lmtpengine.c
> cyrus-imapd-3.0.4/imap/lmtpengine.c
> --- cyrus-imapd-3.0.4.orig/imap/lmtpengine.c2017-09-04
> 02:09:46.0 +0200
> +++ cyrus-imapd-3.0.4/imap/lmtpengine.c2017-11-02
> 13:59:56.764175245> +0100
> @@ -830,6 +830,7 @@
>  }
> 
>  mbname_t *mbname = NULL;
> +int r = 0;
> 
>  size_t sl = strlen(addr);
>  if (addr[sl-1] == '>') sl--;
> @@ -849,7 +850,7 @@
>  mbname_set_domain(mbname, NULL);
>  }
> 
> -if (verify_user(mbname,
> +if (r = verify_user(mbname,
>  (quota_t) (ignorequota ? -1 : msg->size),
>  ignorequota ? -1 : 1, msg->authstate)) {
>  mbname_free();
> @@ -860,7 +861,7 @@
>  const char *catchall =
> config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);
>  if (catchall) {
>  mbname = mbname_from_userid(catchall);
> -if (verify_user(mbname,
> +if (r = verify_user(mbname,
>  ignorequota ? -1 : msg->size,
>  ignorequota ? -1 : 1, msg->authstate)) {>
>   mbname_free();
> @@ -870,6 +871,9 @@
> 
>  if (!mbname) {
>  /* we lost */
> +if (r) {
> +return r;
> +}
>  return IMAP_MAILBOX_NONEXISTENT;
>  }
> 
> 
> 
> Am 02.11.17 um 09:27 schrieb Maros Vegh:
>> Hello,
>> 
>> i'm using compiled cyrus version 3.0.4 on Debian 9.2.
>> 
>> When the Postfix server is trying to deliver a message via lmtp to
>> cyrus mailbox which is over quota, it receives the 550-Mailbox
>> unknown>> return code and not the 452 or 552 Over quota.
>> 
>> In the previous version 2.5.10 it worked fine with default values in>> 
>> imapd.conf
>> 
>> Is it a bug or my fault?
>> 
>> Thanks
>> 
>> Maros Vegh
>> 
>> 
> 
> 
> 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

--
  Bron Gondwana, CEO, FastMail Pty Ltd
  br...@fastmailteam.com



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: Cyrus 3.0.4 - Over quota returns 550-Mailbox unknown

2017-11-02 Thread Edda

Hi,

that's surprising and the same here.

I think there is a bug in imap/lmtpengine.c, function process_recipient:

verify_user returns the correct error code as we can see with LOG_DEBUG 
"on":


Nov  2 14:10:50 popc lmtp[2092]: verify_user(t...@sendmaid.org) failed: 
Over quota


but this return code is not used in process_recipient

There we have:
[...]
    if (sl) {
    char *rcpt = xstrndup(addr, sl);
    mbname = mbname_from_recipient(rcpt, msg->ns);
    free(rcpt);

    int forcedowncase = config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);
    if (forcedowncase) mbname_downcaseuser(mbname);

    /* strip username if postuser */
    if (!strcmpsafe(mbname_localpart(mbname), 
config_getstring(IMAPOPT_POSTUSER))) {

    mbname_set_localpart(mbname, NULL);
    if (!config_virtdomains || 
!strcmpsafe(mbname_domain(mbname), config_defdomain))

    mbname_set_domain(mbname, NULL);
    }

    if (verify_user(mbname,
    (quota_t) (ignorequota ? -1 : msg->size),
    ignorequota ? -1 : 1, msg->authstate)) {
    mbname_free();
    }
    }

    if (!mbname) {
    const char *catchall = 
config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);

    if (catchall) {
    mbname = mbname_from_userid(catchall);
    if (verify_user(mbname,
    ignorequota ? -1 : msg->size,
    ignorequota ? -1 : 1, msg->authstate)) {
    mbname_free();
    }
    }
    }

    if (!mbname) {
    /* we lost */
    return IMAP_MAILBOX_NONEXISTENT;
    }
[...]

means as far as I understand: if verify_user returns its error (for 
example IMAP_QUOTA_EXCEEDED), mbname is freed and process_recipient 
always returns IMAP_MAILBOX_NONEXISTENT.


Below is a patch that works for me. But I don't know if this is a good 
way to fix it.

Hopefully one of the developers helps :)

Regards, Edda


diff -Naur cyrus-imapd-3.0.4.orig/imap/lmtpengine.c 
cyrus-imapd-3.0.4/imap/lmtpengine.c
--- cyrus-imapd-3.0.4.orig/imap/lmtpengine.c    2017-09-04 
02:09:46.0 +0200
+++ cyrus-imapd-3.0.4/imap/lmtpengine.c    2017-11-02 13:59:56.764175245 
+0100

@@ -830,6 +830,7 @@
 }

 mbname_t *mbname = NULL;
+    int r = 0;

 size_t sl = strlen(addr);
 if (addr[sl-1] == '>') sl--;
@@ -849,7 +850,7 @@
 mbname_set_domain(mbname, NULL);
 }

-    if (verify_user(mbname,
+    if (r = verify_user(mbname,
 (quota_t) (ignorequota ? -1 : msg->size),
 ignorequota ? -1 : 1, msg->authstate)) {
 mbname_free();
@@ -860,7 +861,7 @@
 const char *catchall = 
config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);

 if (catchall) {
 mbname = mbname_from_userid(catchall);
-    if (verify_user(mbname,
+    if (r = verify_user(mbname,
 ignorequota ? -1 : msg->size,
 ignorequota ? -1 : 1, msg->authstate)) {
 mbname_free();
@@ -870,6 +871,9 @@

 if (!mbname) {
 /* we lost */
+    if (r) {
+        return r;
+    }
 return IMAP_MAILBOX_NONEXISTENT;
 }



Am 02.11.17 um 09:27 schrieb Maros Vegh:

Hello,

i'm using compiled cyrus version 3.0.4 on Debian 9.2.

When the Postfix server is trying to deliver a message via lmtp to 
cyrus mailbox which is over quota, it receives the 550-Mailbox unknown 
return code and not the 452 or 552 Over quota.


In the previous version 2.5.10 it worked fine with default values in 
imapd.conf


Is it a bug or my fault?

Thanks

Maros Vegh





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 3.0.4 - Over quota returns 550-Mailbox unknown

2017-11-02 Thread Maros Vegh

Hello,

i'm using compiled cyrus version 3.0.4 on Debian 9.2.

When the Postfix server is trying to deliver a message via lmtp to cyrus 
mailbox which is over quota, it receives the 550-Mailbox unknown return 
code and not the 452 or 552 Over quota.


In the previous version 2.5.10 it worked fine with default values in 
imapd.conf


Is it a bug or my fault?

Thanks

Maros Vegh


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: quota for whole virtual domain

2017-10-13 Thread Egoitz Aurrekoetxea
Good morning,


I know you can do that with vpopmail mda and Qmail...


Cheers,


On 13/10/17 09:54, Vladislav Kurz wrote:
> On 10/13/17 02:12, Nicola Nye wrote:
>> Hi Vladislav,
>>
>> Will Quota Roots do what you're
>> after? https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html
>> <https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html?highlight=quota>
> Hi Nicola,
>
> that page does not say anything about virtual domains. I understand that
> a quotaroot may be INBOX or any sub mailbox in the hierarchy, but how do
> I specify quotaroot for domain?
>
> I can set a quota (quotaroot) for user/some...@domain.com, but can I set
> quota for user/domain.com? or user/@domain.com, what is the syntax?
>
>>
>> On Thu, Oct 12, 2017, at 09:01 PM, Vladislav Kurz wrote:
>>> Hello all,
>>>
>>> is it possible to set quota for the whole virtual domain, instead of
>>> individual mailboxes?
>>>
>>> --
>>> Best Regards
>>>         Vladislav Kurz
>>>
>>> 
>>> 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
>>
>

-- 


sarenet
*Egoitz Aurrekoetxea*
Departamento de sistemas
944 209 470
Parque Tecnológico. Edificio 103
48170 Zamudio (Bizkaia)
ego...@sarenet.es <mailto:ego...@sarenet.es>
www.sarenet.es <https://www.sarenet.es>

Antes de imprimir este correo electrónico piense si es necesario hacerlo.

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: quota for whole virtual domain

2017-10-13 Thread Vladislav Kurz
On 10/13/17 02:12, Nicola Nye wrote:
> Hi Vladislav,
> 
> Will Quota Roots do what you're
> after? https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html
> <https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html?highlight=quota>

Hi Nicola,

that page does not say anything about virtual domains. I understand that
a quotaroot may be INBOX or any sub mailbox in the hierarchy, but how do
I specify quotaroot for domain?

I can set a quota (quotaroot) for user/some...@domain.com, but can I set
quota for user/domain.com? or user/@domain.com, what is the syntax?

> 
> 
> On Thu, Oct 12, 2017, at 09:01 PM, Vladislav Kurz wrote:
>> Hello all,
>>
>> is it possible to set quota for the whole virtual domain, instead of
>> individual mailboxes?
>>
>> --
>> Best Regards
>>         Vladislav Kurz
>>
>> 
>> 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
> 


-- 
S pozdravem
Vladislav Kurz

Centrála: Celní 17/5, 63900 Brno, CZ
Web: http://www.webstep.net
E-Mail: podp...@webstep.net
Tel: 840 840 700, +420 548 214 711
Obchodní podmínky: https://zkrat.to/op

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: quota for whole virtual domain

2017-10-12 Thread Nicola Nye
Hi Vladislav,

Will Quota Roots do what you're after?
https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html[1]

On Thu, Oct 12, 2017, at 09:01 PM, Vladislav Kurz wrote:
> Hello all,
> 
> is it possible to set quota for the whole virtual domain, instead of
> individual mailboxes?
> 
> --
> Best Regards
> Vladislav Kurz
> 
> 
> 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


Links:

  1. 
https://www.cyrusimap.org/imap/reference/admin/quotas/quotaroots.html?highlight=quota

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

quota for whole virtual domain

2017-10-12 Thread Vladislav Kurz
Hello all,

is it possible to set quota for the whole virtual domain, instead of
individual mailboxes?

-- 
Best Regards
Vladislav Kurz


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-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 <paolo.crav...@csi.it>:


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 <paolo.crav...@csi.it> 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/ <http://www.cyrusimap.org/>
>>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ 
>>> <http://lists.andrew.cmu.edu/pipermail/info-cyrus/>
>>> To Unsubscribe:
>>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus 
>>> <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

Re: Did calculating the quota change from 2.3 to 2.5?

2016-12-31 Thread Wolfgang Breyha via Info-cyrus
On 31/12/16 06:17, Bron Gondwana via Info-cyrus wrote:

> If your cyrus.* files are identical then you have pretty weird mailboxes,
> but yeah - I guess it could happen if you had two folders with identical
> messages in identical order and all the timestamps identical.

Especially empty mailbox cyrus.cache/squat and most cyrus.annotation (2.5)
files got linked together on my testhost.

I use freedup with the patch sent in
https://mid.mail-archive.com/info-cyrus@lists.andrew.cmu.edu/msg42850.html
on regular basis without harm.

Meanwhile the patch is included in the most recent 1.6-3 release of freedup.

Greetings, Wolfgang
-- 
Wolfgang Breyha  | http://www.blafasel.at/
Vienna University Computer Center | Austria


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: Did calculating the quota change from 2.3 to 2.5?

2016-12-30 Thread Bron Gondwana via Info-cyrus
On Sat, 31 Dec 2016, at 10:57, Wolfgang Breyha via Info-cyrus wrote:
> On 29/11/16 22:37, Jason L Tibbitts III via Info-cyrus wrote:
> > Fun random question: Does anything blow up if you run hardlink on your
> > mail spool?  (The hardlink program finds identical files and hardlinks
> > them.)
> 
> Using "hardlink" is IMO not save on imap spools since it also links cyrus.*
> files what's definitely not what you want.

If your cyrus.* files are identical then you have pretty weird mailboxes, but 
yeah - I guess it could happen if you had two folders with identical messages 
in identical order and all the timestamps identical.

> I recommend using freedup instead. Something like
> freedup -n -v -a -T -o '-name "*."' -l /var/spool/..

But yeah, that looks safe :)

It shouldn't blow anything up so long as it renames the file into place 
atomically.  Also be a little careful about file ownership, you'll want to run 
this as the cyrus user, so it retains ownership and access (unless freedup 
fixes up ownership, I've never tried it myself)

Bron.



-- 
  Bron Gondwana
  br...@fastmail.fm

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: Did calculating the quota change from 2.3 to 2.5?

2016-12-30 Thread Wolfgang Breyha via Info-cyrus
On 29/11/16 22:37, Jason L Tibbitts III via Info-cyrus wrote:
> Fun random question: Does anything blow up if you run hardlink on your
> mail spool?  (The hardlink program finds identical files and hardlinks
> them.)

Using "hardlink" is IMO not save on imap spools since it also links cyrus.*
files what's definitely not what you want.

I recommend using freedup instead. Something like
freedup -n -v -a -T -o '-name "*."' -l /var/spool/..

Greetings, Wolfgang
-- 
Wolfgang Breyha  | http://www.blafasel.at/
Vienna University Computer Center | Austria


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: Did calculating the quota change from 2.3 to 2.5?

2016-11-30 Thread Adam Tauno Williams via Info-cyrus
> > If you use imapsync, it doesn't know about that, and will upload
> > the same message twice. 2.5 doesn't have the smarts to recognise
> > that it's the same message.
> imapsync can only sync mail the old server knows about. And in the
> end there is more quota used on the new server!?
> The only explanation is the quota on the old server is broken, isn't
> it?

No, IMAP doesn't know about deduplication;  so imapsync between two
servers dededuplicates.  imapsync may also repair damaged or missing
message headers - meaning the messages are no longer are the same - so
a tool like hardlinks will not return you to the same count in du as on
the old server.

And then there is the [virtuous] issue of delayed expunge.

-- 
Adam Tauno Williams <mailto:awill...@whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-30 Thread Marc Patermann via Info-cyrus

Bron,

Am 29.11.2016 um 22:18 Uhr schrieb Bron Gondwana:

Quota is a sum of byte sizes of raw unexpunged messages. It doesn't
deduplicate. Likely issue is incorrect quota_mailbox_used in the
cyrus.index header on 2.3. a reconstruct will fix those, then quota
-f again.

Does not change anything.


It's not related to du.

The problem with imapsync is that it doesn't handle single instance
store. If you have copied messages or delivered then into multiple
mailboxes with sieve, they will have hard links on disk.

If you use imapsync, it doesn't know about that, and will upload the
same message twice. 2.5 doesn't have the smarts to recognise that
it's the same message.
imapsync can only sync mail the old server knows about. And in the end 
there is more quota used on the new server!?


The only explanation is the quota on the old server is broken, isn't it?

Marc

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-29 Thread Bron Gondwana via Info-cyrus
On Wed, 30 Nov 2016, at 08:37, Jason L Tibbitts III via Info-cyrus wrote:
> > "BG" == Bron Gondwana via Info-cyrus  
> > writes:
> 
> BG> If you use imapsync, it doesn't know about that, and will upload the
> BG> same message twice. 2.5 doesn't have the smarts to recognise that
> BG> it's the same message.
> 
> Fun random question: Does anything blow up if you run hardlink on your
> mail spool?  (The hardlink program finds identical files and hardlinks
> them.)

No, that is fine.

> Given an index of message-id/filenames it should be possible to write a
> deduplicator that's orders of magnitude faster than hardlink, but I have
> a sneaking suspicion that someone's already done that.

Yep, I wrote something which can read 2.5 cyrus.index files and hardlink
matching files.  It depends on a ton of FastMail internals though.

3.0 will have much better support for deduplication when you upload via
IMAP, because it will know where all the other copies in the same user are
(there's no support for cross-user deduplication because we don't use it at
all, every user gets their own sieve script and their own lmtp pre-processing
at FastMail, so every message will have different headers and hence be a
different GUID.  I have to prioritise designs that I actually use)


#!/usr/bin/perl -w

# SETUP {{{
use strict;
use warnings;
use ME;
use Date::Manip;
use IO::File;
use ME::Machine;
use Cyrus::HeaderFile;
use Data::Dumper;
use Cyrus::IndexFile;
use Getopt::Std;
use Digest::SHA;
use ME::CyrusBackup;
use ME::User;
use Data::Dumper;
# }}}

my $sn = shift;

my (undef,undef,$uid,$gid) = getpwnam('cyrus');

foreach my $Slot (ME::Machine->ImapSlots()) {
  next if ($sn and $sn ne $Slot->Name());
  my $users = $Slot->AllMailboxes();
  my $conf = $Slot->ImapdConf();
  foreach my $user (sort keys %$users) {
process($conf, $user, $users->{$user});
  }
}

sub process {
  my ($conf, $user, $folders) = @_;
  print "$user\n";
  my %ihave;
  foreach my $folder (@$folders) {
my $meta = $conf->GetUserLocation('meta', $user, 'default', $folder);
my $index = Cyrus::IndexFile->new_file("$meta/cyrus.index") || die "Failed 
to open $meta/cyrus.index";
while (my $record = $index->next_record()) {
  push @{$ihave{$record->{MessageGuid}}}, [$folder, $record->{Uid}];
}
  }

  foreach my $guid (keys %ihave) {
next if @{$ihave{$guid}} <= 1;
my ($inode, $srcname);
my @others;
foreach my $item (@{$ihave{$guid}}) {
  my $spool = $conf->GetUserLocation('spool', $user, 'default', $item->[0]);
  $spool =~ s{/$}{};
  my $file = "$spool/$item->[1].";
  my (@sd) = stat($file);
  if ($inode) {
next if $sd[1] == $inode;
push @others, $file;
  }
  else {
$inode = $sd[1];
$srcname = $file;
  }
}
next unless @others;
print "fixing up files for $guid ($srcname)\n";
foreach my $file (@others) {
  my $tmpfile = $file . "tmp";
  print "link error $tmpfile\n" unless link($srcname, $tmpfile);
  chown($uid, $gid, $tmpfile);
  chmod(0600, $tmpfile);
  print "rename error $file\n" unless rename($tmpfile, $file);
}
  }
}





-- 
  Bron Gondwana
  br...@fastmail.fm

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-29 Thread Jason L Tibbitts III via Info-cyrus
> "BG" == Bron Gondwana via Info-cyrus  
> writes:

BG> If you use imapsync, it doesn't know about that, and will upload the
BG> same message twice. 2.5 doesn't have the smarts to recognise that
BG> it's the same message.

Fun random question: Does anything blow up if you run hardlink on your
mail spool?  (The hardlink program finds identical files and hardlinks
them.)

Given an index of message-id/filenames it should be possible to write a
deduplicator that's orders of magnitude faster than hardlink, but I have
a sneaking suspicion that someone's already done that.

 - J<

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-29 Thread Bron Gondwana via Info-cyrus
Quota is a sum of byte sizes of raw unexpunged messages. It doesn't 
deduplicate. Likely issue is incorrect quota_mailbox_used in the cyrus.index 
header on 2.3. a reconstruct will fix those, then quota -f again.

It's not related to du.

The problem with imapsync is that it doesn't handle single instance store. If 
you have copied messages or delivered then into multiple mailboxes with sieve, 
they will have hard links on disk.

If you use imapsync, it doesn't know about that, and will upload the same 
message twice. 2.5 doesn't have the smarts to recognise that it's the same 
message.

Bron.

On Wed, 30 Nov 2016, at 01:24, Marc Patermann via Info-cyrus wrote:
> Bron,
> 
> Am 29.11.2016 um 13:26 Uhr schrieb Bron Gondwana via Info-cyrus:
> > No, the quota calculations are identical.  It's possible that your
> > quota was incorrectly calculated on the source server though.  A
> > quota -f there should correct the calculations.
> unluckily it does not.
> 
> quota -f on seems not to be related to the du counter on the old server 
> in any way for some mailboxes.
> 
> First we create the mailbox on the new server and sync the quota.
> Then imapsync syncs the messages.
> Till the quota is exceeded …
> 
> oldserver> lq user.xxx
>   STORAGE 658949/125 (52.71592%)
> 
> # du -sh /var/lib/imap/meta/user/xxx/
> 105M/var/lib/imap/meta/user/xxx/
> # du -sh /var/spool/imap/user/xxx/
> 1,2G/var/spool/imap/user/xxx/
> 
> 
> newserver> lq user.xxx
>   STORAGE 1098788/125 (87.90304%)
> 
> # du -sh /var/spool/imap/user/xxx/
> 1,7G/var/spool/imap/user/xxx/
> 
> There is no separate meta partition on the new server.
> Meta data is about 500 MB now on the new server, this is about 5x the space.
> 
> I think quota is just plain wrong on the old server.
> 
> squatter file are huge in comparison now.
> Is this right?
> 
> 
> Marc
> 
> 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


-- 
  Bron Gondwana
  br...@fastmail.fm

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-29 Thread Marc Patermann via Info-cyrus

Bron,

Am 29.11.2016 um 13:26 Uhr schrieb Bron Gondwana via Info-cyrus:

No, the quota calculations are identical.  It's possible that your
quota was incorrectly calculated on the source server though.  A
quota -f there should correct the calculations.

unluckily it does not.

quota -f on seems not to be related to the du counter on the old server 
in any way for some mailboxes.


First we create the mailbox on the new server and sync the quota.
Then imapsync syncs the messages.
Till the quota is exceeded …

oldserver> lq user.xxx
 STORAGE 658949/125 (52.71592%)

# du -sh /var/lib/imap/meta/user/xxx/
105M/var/lib/imap/meta/user/xxx/
# du -sh /var/spool/imap/user/xxx/
1,2G/var/spool/imap/user/xxx/


newserver> lq user.xxx
 STORAGE 1098788/125 (87.90304%)

# du -sh /var/spool/imap/user/xxx/
1,7G/var/spool/imap/user/xxx/

There is no separate meta partition on the new server.
Meta data is about 500 MB now on the new server, this is about 5x the space.

I think quota is just plain wrong on the old server.

squatter file are huge in comparison now.
Is this right?


Marc

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: Did calculating the quota change from 2.3 to 2.5?

2016-11-29 Thread Bron Gondwana via Info-cyrus
No, the quota calculations are identical.  It's possible that your quota was 
incorrectly calculated on the source server though.  A quota -f there should 
correct the calculations.

Regards,

Bron.

On Tue, 29 Nov 2016, at 01:36, Marc Patermann via Info-cyrus wrote:
> Hi,
> 
> while migrating from 2.3 to 2.5 (see my last post here), mailboxes can 
> not be synced, because the quota is exceeded on the new server.
> 
> A mailbox which has a du of about 800 MB in a 900 MB quota mailbox fills 
> the new mailbox by over 100%.
> 
> Are meta files now calculated into the quota?
> 
> 
> Marc
> 
> 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


-- 
  Bron Gondwana
  br...@fastmail.fm

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


Did calculating the quota change from 2.3 to 2.5?

2016-11-28 Thread Marc Patermann via Info-cyrus

Hi,

while migrating from 2.3 to 2.5 (see my last post here), mailboxes can 
not be synced, because the quota is exceeded on the new server.


A mailbox which has a du of about 800 MB in a 900 MB quota mailbox fills 
the new mailbox by over 100%.


Are meta files now calculated into the quota?


Marc

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


failed repair quota: quota root does not exist

2016-10-13 Thread Sergey via Info-cyrus
Hello.

I was encountered with the problem of updating quota:

# su -l cyrus -s /bin/bash -c "/usr/lib/cyrus/quota -d my.dom -f"
failed reading quota record for 'my.dom!u': Quota root does not exist
failed building quota list for 'my.dom!': System I/O error: No such file or 
directory

Cyrus-IMAP 2.5.9 with virtual domains enabled. The problem
exists only on one of the domains. Per user quota repair for
broken domain works. How can I restore the ability to restore
the quota globally ?

-- 
Regards, Sergey

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


Quota root not removed if folder is on a different partition

2015-10-27 Thread Paolo Cravero
Hello, I think I found an unexpected feature. Or a bug.

Here's the setup: Cyrus IMAP v2.4.17-Invoca-RPM-2.4.17-6 single instance on
RHEL5.

Amongst other partitions I have an "archive" partition where I attach all
users' "Archive" folders with a separate, very large, quotaroot. Something
like

cm user/me/arch...@example.com archivepartition
sqr user/me/arch...@example.com 123456789

Then the Archive folder is deleted. It goes under user's Trash on the
mailbox primary partition (user/me/Trash/arch...@example.com) and it gains
the default mailbox quota. Delayed delete/expunge is in action, FWIW. So far
so good.

If the Archive folder is created again through a generic IMAP client, it is
created on the mailbox primary partition, which is ok, but it inherits the
original quota root as if it were on the archive partition, which is NOT OK.

It looks like the quotaroot information is not removed when the folder is
deleted, or it is kept without the partition information. Is it related to
delayed delete, perhaps? Or a bug? Maybe fixed in a later release?

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: Quota root not removed if folder is on a different partition

2015-10-27 Thread Eric Luyten
On Tue, October 27, 2015 2:26 pm, Paolo Cravero wrote:
> Hello, I think I found an unexpected feature. Or a bug.
>
>
> Here's the setup: Cyrus IMAP v2.4.17-Invoca-RPM-2.4.17-6 single instance on
> RHEL5.
>
>
> Amongst other partitions I have an "archive" partition where I attach all
> users' "Archive" folders with a separate, very large, quotaroot. Something 
> like
>
>
> cm user/me/arch...@example.com archivepartition sqr
> user/me/arch...@example.com 123456789
>
> Then the Archive folder is deleted. It goes under user's Trash on the
> mailbox primary partition (user/me/Trash/arch...@example.com) and it gains the
> default mailbox quota. Delayed delete/expunge is in action, FWIW. So far so
> good.
>
> If the Archive folder is created again through a generic IMAP client, it is
> created on the mailbox primary partition, which is ok, but it inherits the
> original quota root as if it were on the archive partition, which is NOT OK.
>
> It looks like the quotaroot information is not removed when the folder is
> deleted, or it is kept without the partition information. Is it related to
> delayed delete, perhaps? Or a bug? Maybe fixed in a later release?


FWIW, in 2.3.16 when removing a top level mailbox the quota root file does
not get removed because of some variable expansion in the code going wrong.

This bug may have propagated into the 2.4 code.


Eric.



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: Problem with quota

2015-04-04 Thread Simon Matter
 /Hi,
 we
 - stoped cyrus-imapd
 - reconstructed a mailbox (/usr/lib/cyrus-imapd/reconstruct -r -f
 user.account)
 ///- started cyrus-imapd/
 - deleted file /var/lib/imap/quota/a/user.account//
 - set quota (sq user.account  3000)
 -//recalculated the quota (/usr/lib/cyrus-imapd/quota -f
 user.///account)/

 The output of cyrus quota is differente to real space of mailbox on
 disk.


 lq///user.account/
   STORAGE 9789922/3000 (32.63307%)

 du -s /var/spool/imap/a/user/account/
 7308012var/spool/imap/a/user/account//

 There are a difference//greater than  2.0 GB (9.8 GB - 7.3 GB)

 //Why?

Hi,

I guess that's because of single instance store. It's not a bug then but a
feature if duplicatesuppression: 1. Duplicate messages are hardlinked on
disk, they don't consume space there, but are still calculated in quota
usage.

Regards,
Simon


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: Problem with quota

2015-04-04 Thread Rudy Gevaert

Quoting Simon Matter simon.mat...@invoca.ch, Sat, 04 Apr 2015:

 I guess that's because of single instance store. It's not a bug then but a
 feature if duplicatesuppression: 1. Duplicate messages are hardlinked on
 disk, they don't consume space there, but are still calculated in quota
 usage.

I have noticed that when such big difference it is because cyr_expire  
didn't run.

Rudy



-- 
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  Rudy Gevaert e-mail: rudy.geva...@ugent.be
  Directie ICT, Afdeling Infrastructuur
  Groep Systemen  tel: +32 9 264 4750
  Universiteit Gent   fax: +32 9 264 4994
  Krijgslaan 281, gebouw S9, 9000 Gent, Belgie   www.UGent.be
  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



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: Problem with quota

2015-04-04 Thread Simon Matter
 On 04/04/2015 09:02 AM, Patrick Boutilier wrote:
 Quoting Simon Matter simon.mat...@invoca.ch, Sat, 04 Apr 2015:

 I guess that's because of single instance store. It's not a bug then
 but a
 feature if duplicatesuppression: 1. Duplicate messages are
 hardlinked on
 disk, they don't consume space there, but are still calculated in
 quota
 usage.

 Isn't that singleinstancestore:1 ? duplicatesuppression is where lmtpd
 will suppress delivery of a message to a mailbox if a message with the
 same message-id (or resent-message-id) is recorded as having already
 been delivered to the mailbox.

 Yes Patrick, you're correct.  However there is a connection, in that
 singleinstancestore requires the duplicate DB in order to do its work,
 so people often conflate the two.

Thanks Nic, that's correct. I shouldn't post before having a useful
coffeine level.

Simon


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: Problem with quota

2015-04-04 Thread Nic Bernstein
On 04/04/2015 09:02 AM, Patrick Boutilier wrote:
 Quoting Simon Matter simon.mat...@invoca.ch, Sat, 04 Apr 2015:

 I guess that's because of single instance store. It's not a bug then 
 but a
 feature if duplicatesuppression: 1. Duplicate messages are 
 hardlinked on
 disk, they don't consume space there, but are still calculated in quota
 usage.

 Isn't that singleinstancestore:1 ? duplicatesuppression is where lmtpd 
 will suppress delivery of a message to a mailbox if a message with the 
 same message-id (or resent-message-id) is recorded as having already 
 been delivered to the mailbox.

Yes Patrick, you're correct.  However there is a connection, in that 
singleinstancestore requires the duplicate DB in order to do its work, 
so people often conflate the two.

Cheers,
 -nic

-- 
Nic Bernstein n...@onlight.com
Onlight llc.  www.onlight.com
219 N. Milwaukee St., Ste. 2A v. 414.272.4477
Milwaukee, Wisconsin  53202   f. 414.290.0335


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: Problem with quota

2015-04-04 Thread Patrick Boutilier

Quoting Simon Matter simon.mat...@invoca.ch, Sat, 04 Apr 2015:


I guess that's because of single instance store. It's not a bug then but a
feature if duplicatesuppression: 1. Duplicate messages are hardlinked on
disk, they don't consume space there, but are still calculated in quota
usage.


Isn't that singleinstancestore:1 ? duplicatesuppression is where lmtpd 
will suppress delivery of a message to a mailbox if a message with the 
same message-id (or resent-message-id) is recorded as having already 
been delivered to the mailbox.


attachment: boutilpj.vcf
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

Problem with quota

2015-04-03 Thread Antonella Monducci

/Hi,
we
- stoped cyrus-imapd
- reconstructed a mailbox (/usr/lib/cyrus-imapd/reconstruct -r -f 
user.account)
///- started cyrus-imapd/
- deleted file /var/lib/imap/quota/a/user.account//
- set quota (sq user.account  3000)
-//recalculated the quota (/usr/lib/cyrus-imapd/quota -f  user.///account)/

The output of cyrus quota is differente to real space of mailbox on disk.


lq///user.account/
 STORAGE 9789922/3000 (32.63307%)

du -s /var/spool/imap/a/user/account/
7308012var/spool/imap/a/user/account//

There are a difference//greater than  2.0 GB (9.8 GB - 7.3 GB)

//Why?

/Could  youhelp us?

Thanks in advance.


Antonella


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: Help on quota usage.

2014-02-17 Thread Anant Athavale
Thank you.  This helped to trace the usage.


On Fri, Feb 14, 2014 at 7:13 PM, Joseph Brennan bren...@columbia.eduwrote:



 --On February 14, 2014 5:11:19 PM +0530 Anant Athavale
 athavale.an...@gmail.com wrote:

 
 
 
  Dear List,
 
  for one user, the lq user.xx is showing 1.6 GB, where as actual usage on
  file system is less than 1 GB.  I want to know, how can get where is the
  additional quota sitting in /var/spool/imap partition for user xxx.
 


 mbexamine user.xx | egrep '(Number.of.Messages|^Examining)'


 Joseph Brennan
 Columbia University IT



 
 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




-- 
anant athavale.
bangalore

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

Help on quota usage.

2014-02-14 Thread Anant Athavale
Dear List,

for one user, the lq user.xx is showing 1.6 GB, where as actual usage on
file system is less than 1 GB.  I want to know, how can get where is the
additional quota sitting in /var/spool/imap partition for user xxx.

Thanks in advance.

-- 
anant athavale.
bangalore

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: Help on quota usage.

2014-02-14 Thread mayak
On 02/14/2014 12:41 PM, Anant Athavale wrote:
 Dear List,

 for one user, the lq user.xx is showing 1.6 GB, where as actual usage
 on file system is less than 1 GB.  I want to know, how can get where
 is the additional quota sitting in /var/spool/imap partition for user xxx.

 Thanks in advance.

 -- 
 anant athavale.
 bangalore
hi anant

try:

su - cyrus
/usr/lib/cyrus-imapd/quota -f

to fix quota calculation

cheers

mayak

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: Help on quota usage.

2014-02-14 Thread Eric Luyten
On Fri, February 14, 2014 1:30 pm, mayak wrote:
 On 02/14/2014 12:41 PM, Anant Athavale wrote:

 Dear List,


 for one user, the lq user.xx is showing 1.6 GB, where as actual usage on
 file system is less than 1 GB.  I want to know, how can get where is the
 additional quota sitting in /var/spool/imap partition for user xxx.

 Thanks in advance.


 --
 anant athavale. bangalore
 hi anant

 try:


 su - cyrus /usr/lib/cyrus-imapd/quota -f


 to fix quota calculation


The underlying filesystem MAY have compression capabilities, which will most
certainly lead to 'du' returning a lower value than Cyrus 'list quota'.


Eric Luyten, Computing Centre VUB/ULB, mail spool compression factor 1.68



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: Help on quota usage.

2014-02-14 Thread Joseph Brennan


--On February 14, 2014 5:11:19 PM +0530 Anant Athavale 
athavale.an...@gmail.com wrote:




 Dear List,

 for one user, the lq user.xx is showing 1.6 GB, where as actual usage on
 file system is less than 1 GB.  I want to know, how can get where is the
 additional quota sitting in /var/spool/imap partition for user xxx.



mbexamine user.xx | egrep '(Number.of.Messages|^Examining)'


Joseph Brennan
Columbia University IT




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: Help on quota usage.

2014-02-14 Thread Adam Tauno Williams
On Fri, 2014-02-14 at 13:56 +0100, Eric Luyten wrote:
 On Fri, February 14, 2014 1:30 pm, mayak wrote:
  On 02/14/2014 12:41 PM, Anant Athavale wrote:
  for one user, the lq user.xx is showing 1.6 GB, where as actual usage on
  file system is less than 1 GB.  I want to know, how can get where is the
  additional quota sitting in /var/spool/imap partition for user xxx.
 The underlying filesystem MAY have compression capabilities, which will most
 certainly lead to 'du' returning a lower value than Cyrus 'list quota'.

+1.  The utilization of the underlying storage and the value calculated
by Cyrus may not correspond 1:1 for a variety of reasons [although, I
guess one might expect them to the close-ish - unless delayed expunge,
deduplication, etc... features are used].  I have seen the filesystem
and Cyrus quota values differ into both directions [fq  fq] for
apparently valid reasons.



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: Help on quota usage.

2014-02-14 Thread John Wade
Isn't the most likely cause of  cyrus quota showing more usage than file 
system  the single instance store feature? (Assuming you have tried 
fixing the quota as others have suggested)   If you do any lists or mass 
emailing with an MTA that can use the single instance store feature, 
this can save a lot of disk space. You should be able to find these 
hardlinked messages via


find . -type f -links +1

Hope this helps,
John

On 2/14/2014 5:41 AM, Anant Athavale wrote:

Dear List,

for one user, the lq user.xx is showing 1.6 GB, where as actual usage 
on file system is less than 1 GB.  I want to know, how can get where 
is the additional quota sitting in /var/spool/imap partition for user xxx.


Thanks in advance.

--
anant athavale.
bangalore



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

Remove quota using Cyrus::IMAP::Admin?

2013-07-25 Thread Sebastian Hagedorn

Hi,

you can remove the quota for a mailbox with cyradm by setting the quota to 
none:


$ cyradm cyrus
Password:
server sq user/xxx none
remove quota
server

But when I try to do the same using Cyrus::IMAP::Admin I get an error, 
because a number is expected as argument. Is that a bug or a feature? 
Here's my code:


$result = $imapcon-setquota(user/$user, STORAGE, $quota);

If I set $quota to 'none', I get:

Error: xxx, STORAGE: none: not a number
--
   .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
.:.Regionales Rechenzentrum (RRZK).:.
  .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.

p7sIfohK8Rvma.p7s
Description: S/MIME cryptographic signature

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: Remove quota using Cyrus::IMAP::Admin?

2013-07-25 Thread Nic Bernstein
Sebastian,
Please take a look at this thread from January of last year, which
discusses the issue in full.

http://comments.gmane.org/gmane.mail.imap.cyrus/36194

-nic

On 07/25/2013 10:51 AM, Sebastian Hagedorn wrote:
 Hi,

 you can remove the quota for a mailbox with cyradm by setting the
 quota to none:

 $ cyradm cyrus
 Password:
 server sq user/xxx none
 remove quota
 server

 But when I try to do the same using Cyrus::IMAP::Admin I get an error,
 because a number is expected as argument. Is that a bug or a feature?
 Here's my code:

 $result = $imapcon-setquota(user/$user, STORAGE, $quota);

 If I set $quota to 'none', I get:

 Error: xxx, STORAGE: none: not a number


 
 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
219 N. Milwaukee St., Suite 2av. 414.272.4477
Milwaukee, Wisconsin  53202


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: Remove quota using Cyrus::IMAP::Admin?

2013-07-25 Thread Sebastian Hagedorn

Thanks Nic,

I should've checked the archives first :(

-- Nic Bernstein n...@onlight.com is rumored to have mumbled on 25. Juli 
2013 11:13:34 -0500 regarding Re: Remove quota using Cyrus::IMAP::Admin?:



Sebastian,
Please take a look at this thread from January of last year, which
discusses the issue in full.

http://comments.gmane.org/gmane.mail.imap.cyrus/36194


--
Sebastian Hagedorn - Weyertal 121, Zimmer 2.02
Regionales Rechenzentrum (RRZK)
Universität zu Köln / Cologne University - Tel. +49-221-470-89578

p7s16EvT0UNqn.p7s
Description: S/MIME cryptographic signature

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

problems with quota files

2013-02-20 Thread Riccardo Veraldi
Hello I am running cyrus 2.4.17

I realized that quota shown for users with quota command is much less 
than real filesystem usage

an example:

/usr/lib/cyrus-imapd/quota user.username
Quota   % Used Used Root
  1500   34  5189501 user.username

du -sh /var/spool/imap/m/user/username
11G/var/spool/imap/m/user/username

I am a bit worried about it.

I am using ext4

the same problem was also on the previous cyrus version I was using 
2.3.16  because I have the same problems.

I fixed the quota files with quota -f but it did not resolve my problem.

any hints ?

thank you

Rick



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: problems with quota files

2013-02-20 Thread Simon Matter
 Hello I am running cyrus 2.4.17

 I realized that quota shown for users with quota command is much less
 than real filesystem usage

 an example:

 /usr/lib/cyrus-imapd/quota user.username
 Quota   % Used Used Root
   1500   34  5189501 user.username

 du -sh /var/spool/imap/m/user/username
 11G/var/spool/imap/m/user/username

 I am a bit worried about it.

 I am using ext4

 the same problem was also on the previous cyrus version I was using
 2.3.16  because I have the same problems.

 I fixed the quota files with quota -f but it did not resolve my problem.

 any hints ?

Maybe single instance store is causing it?

Regards,
Simon


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: problems with quota files

2013-02-20 Thread Riccardo Veraldi

Hi,
thanks for your reply.
I do not have any particular single instance store setup... it is just a 
normal raid5 DELL Perc with SATA disks...

Rick

On 2/20/13 8:17 PM, Simon Matter wrote:
 Hello I am running cyrus 2.4.17

 I realized that quota shown for users with quota command is much less
 than real filesystem usage

 an example:

 /usr/lib/cyrus-imapd/quota user.username
  Quota   % Used Used Root
1500   34  5189501 user.username

 du -sh /var/spool/imap/m/user/username
 11G/var/spool/imap/m/user/username

 I am a bit worried about it.

 I am using ext4

 the same problem was also on the previous cyrus version I was using
 2.3.16  because I have the same problems.

 I fixed the quota files with quota -f but it did not resolve my problem.

 any hints ?
 Maybe single instance store is causing it?

 Regards,
 Simon



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: problems with quota files

2013-02-20 Thread Robert Mueller

 I realized that quota shown for users with quota command is much less 
 than real filesystem usage

This is expected.

cyrus quota is sum of size in bytes of each email.

Disk quota used might be much higher because minimum size of a file on
lots of filesystems is 1 block.

Rob

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: problems with quota files

2013-02-20 Thread Michael Menge
Quoting Robert Mueller r...@fastmail.fm:


 I realized that quota shown for users with quota command is much less
 than real filesystem usage

 This is expected.

 cyrus quota is sum of size in bytes of each email.

 Disk quota used might be much higher because minimum size of a file on
 lots of filesystems is 1 block.


In addition:

- with delayed expunge deleted mails will be keept some time
- without metapartition cyrus header, index, cache, squat, expung (only 2.3.x)
   will use some space

Regards

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

Cyrus 2.4 converting quota

2013-01-08 Thread Peter Allgeyer
Hi!

I've upgraded Cyrus from 2.2 to 2.4.16. Everything seems working. The 
only point is that error message in the log:

Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: recovering cyrus databases
Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: converting 
/var/imap/config/quotas.db from skiplist to quotalegacy
Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: skiplist: checkpointed 
/var/imap/config/quotas.db (178 records, 10244 bytes) in 0 seconds
Jan  8 09:55:50 mail04 cyrus/ctl_cyrusdb[2280]: failed to rename 
upgraded file /var/imap/config/quotas.db

Database for quota should be skiplist, as defined in /etc/imapd.conf. 
Anyone who can explain, what's going on there?

best regards
-- 
Peter Allgeyer  Salzburg|Research Forschungsgesellschaft mbH
Dipl.-Inform. Univ. Jakob-Haringer-Strasse 5/III
phone +43.662.2288-264   5020 Salzburg | Austria
fax   +43.662.2288-222http://www.salzburgresearch.at

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: Cyrus 2.4 converting quota

2013-01-08 Thread Antonio Conte
* 08/01/2013, Peter Allgeyer wrote :
 Hi!
 
 I've upgraded Cyrus from 2.2 to 2.4.16. Everything seems working. The 
 only point is that error message in the log:
 
 Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: recovering cyrus databases
 Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: converting 
 /var/imap/config/quotas.db from skiplist to quotalegacy
 Jan  8 09:55:49 mail04 cyrus/ctl_cyrusdb[2280]: skiplist: checkpointed 
 /var/imap/config/quotas.db (178 records, 10244 bytes) in 0 seconds
 Jan  8 09:55:50 mail04 cyrus/ctl_cyrusdb[2280]: failed to rename 
 upgraded file /var/imap/config/quotas.db
 
 Database for quota should be skiplist, as defined in /etc/imapd.conf. 
 Anyone who can explain, what's going on there?
 
 best regards

permissions on file/directory ?

-- 
Never try to teach a pig to sing.
It wastes your time and annoys the pig.

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: Cyrus 2.4 converting quota

2013-01-08 Thread Peter Allgeyer
Am 01/08/2013 11:12 AM, schrieb Antonio Conte:
 permissions on file/directory ?
drwxr-x--- 12 cyrus mail4096 Jan  8 12:00 ./
drwxr-xr-x  7 root  root  62 Jan  7 13:07 ../
-rw---  1 cyrus mail 144 Jan  8 10:00 annotations.db
drwx--  2 cyrus mail 149 Jan  8 10:00 db/
drwx--  2 cyrus mail  46 Jan  8 12:00 db.backup1/
drwx--  2 cyrus mail  46 Jan  8 11:30 db.backup2/
-rw---  1 cyrus mail  565864 Jan  8 10:00 deliver.db
drwx-- 28 cyrus mail4096 Jan  7 14:38 lock/
drwx--  2 cyrus mail   6 Feb  9  2010 log/
-rw---  1 cyrus mail 1955692 Jan  8 10:00 mailboxes.db
-rw-r--r--  1 cyrus mail 1599521 Jan  6 22:39 mailboxes.txt
drwx--  2 cyrus mail   6 Oct 22  2009 msg/
drwx--  2 cyrus mail   16384 Jan  8 09:55 proc/
drwx-- 28 cyrus mail4096 Nov 10  2009 quota/
-rw---  1 cyrus mail 144 Dec 14  2011 quotas1.db
-rw---  1 cyrus mail 996 Dec 14  2011 quotas2.db
-rw---  1 cyrus mail   10244 Jan  8 10:00 quotas.db

Should be ok. And why wants cyrus convert the quotas.db from skiplist 
back to quotalegacy?

best regards

-- 
Peter Allgeyer  Salzburg|Research Forschungsgesellschaft mbH
Dipl.-Inform. Univ. Jakob-Haringer-Strasse 5/III
phone +43.662.2288-264   5020 Salzburg | Austria
fax   +43.662.2288-222http://www.salzburgresearch.at

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: Cyrus 2.4 converting quota - maybe coding bug

2013-01-08 Thread Peter Allgeyer
Am 01/08/2013 12:24 PM, schrieb Peter Allgeyer:
 Am 01/08/2013 11:12 AM, schrieb Antonio Conte:
 permissions on file/directory ?
 drwxr-x--- 12 cyrus mail4096 Jan  8 12:00 ./
 drwxr-xr-x  7 root  root  62 Jan  7 13:07 ../
 -rw---  1 cyrus mail 144 Jan  8 10:00 annotations.db
 drwx--  2 cyrus mail 149 Jan  8 10:00 db/
 drwx--  2 cyrus mail  46 Jan  8 12:00 db.backup1/
 drwx--  2 cyrus mail  46 Jan  8 11:30 db.backup2/
 -rw---  1 cyrus mail  565864 Jan  8 10:00 deliver.db
 drwx-- 28 cyrus mail4096 Jan  7 14:38 lock/
 drwx--  2 cyrus mail   6 Feb  9  2010 log/
 -rw---  1 cyrus mail 1955692 Jan  8 10:00 mailboxes.db
 -rw-r--r--  1 cyrus mail 1599521 Jan  6 22:39 mailboxes.txt
 drwx--  2 cyrus mail   6 Oct 22  2009 msg/
 drwx--  2 cyrus mail   16384 Jan  8 09:55 proc/
 drwx-- 28 cyrus mail4096 Nov 10  2009 quota/
 -rw---  1 cyrus mail 144 Dec 14  2011 quotas1.db
 -rw---  1 cyrus mail 996 Dec 14  2011 quotas2.db
 -rw---  1 cyrus mail   10244 Jan  8 10:00 quotas.db

 Should be ok. And why wants cyrus convert the quotas.db from skiplist
 back to quotalegacy?

* strace:
open(/var/imap/config/quotas.db.NEW, O_RDWR|O_CREAT, 0644) = 5
[...]
stat(/var/imap/config/quotas.db.NEW, {st_mode=S_IFREG|0600, 
st_size=10244, ...}) = 0
[...]
rename(/var/imap/config/quotas.db.NEW, /var/imap/config/quotas.db) = 0
[...]

* looking into users quota:
open(/var/imap/config/quota/m/user.mmuster, O_RDWR) = 13
[...]
rename(/var/imap/config/quota/m/user.mmuster.NEW, 
/var/imap/config/quota/m/user.mmuster) = 0

* and after that:
rename(/var/imap/config/quotas.db.NEW, /var/imap/config/quotas.db) = 
-1 ENOENT (No such file or directory)

double rename attempt???

I think I've hit a coding bug.

best regards
-- 
Peter Allgeyer  Salzburg|Research Forschungsgesellschaft mbH
Dipl.-Inform. Univ. Jakob-Haringer-Strasse 5/III
phone +43.662.2288-264   5020 Salzburg | Austria
fax   +43.662.2288-222http://www.salzburgresearch.at

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: lost quota root

2012-09-04 Thread Michael Menge

Hi,

diging into this I found that the quota -f user tiggert a
bug in the quota legacy db. Only a small part of the quotaroots
where found and the quotaroot for all other mailboxes was set to none

See https://bugzilla.cyrusimap.org/show_bug.cgi?id=3735 for details.

Regards

   Michael Menge

Quoting Michael Menge michael.me...@zdv.uni-tuebingen.de:


Hi,

after Upgrading Cryrus 2.3.16 to 2.4.16 we discovered a problem with quota.
The QUOTAROOT information seems to get lost. We use quotalegacy as   
quota_db backend.


Here is the telemetry logging with lost quotaroot:
134665467500b0 GETQUOTAROOT INBOX

1346654675* QUOTAROOT INBOX

00b0 OK Completed

A quota -f user/USERID shows many lines in the form

user.USERID: quota root (none) -- user.USERID
user.USERID.SUBFOLDER1: quota root (none) -- user.USERID
user.USERID.SUBFOLDER2: quota root (none) -- user.USERID
user.USERID: usage was X, now Y

After this the problem is fixed:
1346655162008a GETQUOTAROOT INBOX

1346655162* QUOTAROOT INBOX INBOX

* QUOTA INBOX (STORAGE 1380998 2048000)
008a OK Completed

The output of quota -f indicated that most/all mailboxes had lost the
quota root. This has happened twice in the last 2 weeks after upgrade.

As we sometimes had problems with corrupted mailboxes in 2.3.x,
we run reconstruct -r -G user and quota -f user each weekend.
Can this be the root of the problem? Some old mails indicate that you
had to run quota -f twice. But this bug should be fixed since 2.4.10

How can i debug this problem further?

Regards

Michael Menge



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







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

smime.p7s
Description: S/MIME Signatur

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

lost quota root

2012-09-03 Thread Michael Menge

Hi,

after Upgrading Cryrus 2.3.16 to 2.4.16 we discovered a problem with quota.
The QUOTAROOT information seems to get lost. We use quotalegacy as  
quota_db backend.


Here is the telemetry logging with lost quotaroot:
134665467500b0 GETQUOTAROOT INBOX

1346654675* QUOTAROOT INBOX

00b0 OK Completed

A quota -f user/USERID shows many lines in the form

user.USERID: quota root (none) -- user.USERID
user.USERID.SUBFOLDER1: quota root (none) -- user.USERID
user.USERID.SUBFOLDER2: quota root (none) -- user.USERID
user.USERID: usage was X, now Y

After this the problem is fixed:
1346655162008a GETQUOTAROOT INBOX

1346655162* QUOTAROOT INBOX INBOX

* QUOTA INBOX (STORAGE 1380998 2048000)
008a OK Completed

The output of quota -f indicated that most/all mailboxes had lost the
quota root. This has happened twice in the last 2 weeks after upgrade.

As we sometimes had problems with corrupted mailboxes in 2.3.x,
we run reconstruct -r -G user and quota -f user each weekend.
Can this be the root of the problem? Some old mails indicate that you
had to run quota -f twice. But this bug should be fixed since 2.4.10

How can i debug this problem further?

Regards

Michael Menge



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

smime.p7s
Description: S/MIME Signatur

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: Differences in imap quota reporting between v2.2.13 and v2.3.16]

2012-05-16 Thread James B. Byrne


On Tue, May 15, 2012 17:08, Dan White wrote:

 What you describe sounds like what would happen if there were a
 quotaroot defined at each sub-hierarchy level, rather than at
 just the user's INBOX level.

This is indeed the case.


 What does the output of quota/cyrquota look like? Do you see any quota
 roots defined other than for top level user mailboxes? If so, then you
 may need to manually remove them:

 http://cyrusimap.org/docs/cyrus-imapd/2.4.16/overview.php#recoveryquotasrm

 Which quota database format are you using (imapd.conf option
 quota_db)?

This option is not specified in imapd.conf so I infer that the default
value is used.

In any case, irrespective of format, I deleted all the files in
/var/lib/imap/quota/?/  pertaining to quotas set on sub folders. Then
ran sudo -u cyrus /usr/lib/cyrus-imapd/quota -f.  I discovered that I
needed to run the quota -f command twice before the % usage would
calculate correctly.  I will now transfer the new meta data to the new
server and see what happens.

Thank you.

-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3



-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


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


Differences in imap quota reporting between v2.2.13 and v2.3.16

2012-05-15 Thread James B. Byrne
OS CentOS-6.2
HW i86_64 KVM guest

We are migrating from cyrus-imapd-2.2.13 running on CentOS-4.9 to
v2.3.16 running on CentOS-6.2; being is the most recent version
distributed by the packager. To the best of my ability to determine I
have followed the upgrade instructions at
http://cyrusimap.web.cmu.edu/docs/cyrus-imapd/2.3.16/install-upgrade.php.

The data transfer and SELinux considerations completed successfully as
did the mailbox reconstruction and quota updates.  The new service is
running and I can administer user mailboxes. However, the quota usage
reported for user accounts under 2.3.16 differs dramatically from that
reported under 2.2.13.  It appears on the surface that the usage
reported is for each individual mailbox and not for the accumulated
usage under the user's INBOX.

For example, I have the situation under 2.3.16 where a user with 500mb
quota and 375mb usage is reported at the highest level as 3% usage
because there is very little mail in their INBOX but a great deal of
archived mail in subordinate folders.  On the 2.2.13 server this
identical user mailbox is reported as 75% utilization.

I see in the change logs that there were numerous changes to quotas.
But it seems odd to me that usage would no longer report cumulative
totals. Can somebody give me the short form explanation of how quota
is assigned to folders and usage is reported under 2.3.16?


-- 
***  E-Mail is NOT a SECURE channel  ***
James B. Byrnemailto:byrn...@harte-lyne.ca
Harte  Lyne Limited  http://www.harte-lyne.ca
9 Brockley Drive  vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada  L8E 3C3


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


Re: Differences in imap quota reporting between v2.2.13 and v2.3.16

2012-05-15 Thread Dan White
On 05/15/12 16:41 -0400, James B. Byrne wrote:
OS CentOS-6.2
HW i86_64 KVM guest

We are migrating from cyrus-imapd-2.2.13 running on CentOS-4.9 to
v2.3.16 running on CentOS-6.2; being is the most recent version
distributed by the packager. To the best of my ability to determine I
have followed the upgrade instructions at
http://cyrusimap.web.cmu.edu/docs/cyrus-imapd/2.3.16/install-upgrade.php.

The data transfer and SELinux considerations completed successfully as
did the mailbox reconstruction and quota updates.  The new service is
running and I can administer user mailboxes. However, the quota usage
reported for user accounts under 2.3.16 differs dramatically from that
reported under 2.2.13.  It appears on the surface that the usage
reported is for each individual mailbox and not for the accumulated
usage under the user's INBOX.

For example, I have the situation under 2.3.16 where a user with 500mb
quota and 375mb usage is reported at the highest level as 3% usage
because there is very little mail in their INBOX but a great deal of
archived mail in subordinate folders.  On the 2.2.13 server this
identical user mailbox is reported as 75% utilization.

I see in the change logs that there were numerous changes to quotas.
But it seems odd to me that usage would no longer report cumulative
totals. Can somebody give me the short form explanation of how quota
is assigned to folders and usage is reported under 2.3.16?

What you describe sounds like what would happen if there were a quotaroot
defined at each sub-hierarchy level, rather than at just the user's INBOX
level.

What does the output of quota/cyrquota look like? Do you see any quota
roots defined other than for top level user mailboxes? If so, then you may
need to manually remove them:

http://cyrusimap.org/docs/cyrus-imapd/2.4.16/overview.php#recoveryquotasrm

Which quota database format are you using (imapd.conf option quota_db)?

-- 
Dan White

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


How the quota as calculated by cyrus.

2012-03-30 Thread Manuel Vazquez
I has the next question, how cyrus calculated the quota occupied by user?
 This is very important but my server don't calculated correctly but error
in many accounts and his folder.

Un saludo.

-- 
Manuel Vázquez.
Técnico Informático.
manuel.vazquez.gonza...@hotmail.com
titocer...@gmail.com

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

Re: total space = (used quota) + (to be expunged)?

2012-02-07 Thread Adam Tauno Williams
Quoting Andre Felipe Machado andremach...@techforce.com.br:

 Hello
 After reading some archived list msg [1], and database formats doc (quotas
 topic)[2], I realized that there is not a high level cyrus command  
 to display
 total disk/partition space actually used at a Cyrus imap backend.
 In order to get exact (approximated when single instance store is  
 enabled) to be
 expunged messages space should a du / df be used ?
 df_used_blocks - used_quota = space_to_be_expunged

https://bugzilla.cyrusimap.org/show_bug.cgi?id=3562 is possibly related

 Is there a better approach (more exact, faster, lower system load)?
 What is the correct way to account for the single instance store effect?
 df or du -L ?
 (du -L)-(du)?

df/du are probably your only options currently; yea, they suck.


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


Re: total space = (used quota) + (to be expunged)?

2012-02-07 Thread Greg Banks


Sent from my iPhone

On 08/02/2012, at 0:51, Adam Tauno Williams awill...@whitemice.org  
wrote:

 Quoting Andre Felipe Machado andremach...@techforce.com.br:

 Hello
 After reading some archived list msg [1], and database formats doc  
 (quotas
 topic)[2], I realized that there is not a high level cyrus command
 to display
 total disk/partition space actually used at a Cyrus imap backend.
 In order to get exact (approximated when single instance store is
 enabled) to be
 expunged messages space should a du / df be used ?
 df_used_blocks - used_quota = space_to_be_expunged

 https://bugzilla.cyrusimap.org/show_bug.cgi?id=3562 is possibly  
 related

Indeed, and we certainly could do that, although it involves a  
cyrus.index header format change, which is unnecessarily painful with  
the current data format. The question is how much value would you get  
from it, given that the user's contribution to the cyrus.cache,  
cyrus.header, mboxlist, annotations (and on the fastmail branch,  
conversations) dbs are not accounted for.

Greg.


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


total space = (used quota) + (to be expunged)?

2012-02-06 Thread Andre Felipe Machado
Hello
After reading some archived list msg [1], and database formats doc (quotas 
topic)[2], I realized that there is not a high level cyrus command to display 
total disk/partition space actually used at a Cyrus imap backend.
In order to get exact (approximated when single instance store is enabled) to 
be 
expunged messages space should a du / df be used ?

df_used_blocks - used_quota = space_to_be_expunged

Is there a better approach (more exact, faster, lower system load)?
What is the correct way to account for the single instance store effect?
df or du -L ?
(du -L)-(du)?

At big partitions (with millions of messages) du may cause a high disk load...
Suggestions?

Regards
Andre Felipe

[1] http://lists.andrew.cmu.edu/pipermail/info-cyrus/2006-November/024314.html
[2] http://cyrusimap.org/docs/cyrus-imapd/2.4.13/internal/database-formats.php

[a] 
http://www.techforce.com.br/news/linux_blog/cyrus_murder_aggregator_2_3_16_debia
n_lenny_tutorial

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

Re: total space = (used quota) + (to be expunged)?

2012-02-06 Thread Greg Banks
On Mon, Feb 6, 2012, at 09:58 PM, Andre Felipe Machado wrote:
 Hello
 After reading some archived list msg [1], and database formats doc
 (quotas 
 topic)[2], I realized that there is not a high level cyrus command to
 display 
 total disk/partition space actually used at a Cyrus imap backend.

That's correct, we don't track that information, because doing it
properly would be hard.  We could track the size of messages in
expunged-but-not-unlinked state and accumulate them for display,
but accounting for the space used by database backends would be
quite hard.

 In order to get exact (approximated when single instance store is
 enabled) to be 
 expunged messages space should a du / df be used ?
 
 df_used_blocks - used_quota = space_to_be_expunged

Sure.

 Is there a better approach (more exact, faster, lower system load)?

Sadly, no.

 What is the correct way to account for the single instance store effect?
 df or du -L ?
 (du -L)-(du)?

I'm confused why you would want to use du -L.  The -L follows symlinks; Cyrus 
doesn't use symlinks internally at all (except for sieve scripts).  The 
singleinstancestore option is implemented using hardlinks, and du already 
accounts for those properly assuming you include all the links in the file 
trees seen by du.

 At big partitions (with millions of messages) du may cause a high disk
 load...
 Suggestions?

Only the obvious: you could use df, and not have anything else
but Cyrus data on the partition.  This works for us :)

-- 
Greg.

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


Re: [SOLVED] Re: Set quota none using Cyrus::IMAP::Admin

2012-01-18 Thread Greg Banks
G'day,

On Tue, Jan 17, 2012, at 01:18 PM, Wolfgang Breyha wrote:
 Ram wrote, on 17.01.2012 12:17:
  I am using cyrus-imapd-2.4.12-2
  As Wolfgang suggested using
  $imap-setquota(user/$user) removed the quota.
 
 Looking at the code of Cyrus::IMAP::Admin there is no code checking for
 none
 or something like that. There are two ways to craft a proper IMAP
 command.
 First the way I described setting no STORAGE argument at all resulting
 in:
 SETQUOTA id ()
 to remove quota.

That's the correct way according to RFC2087.

 And second setting
 -setquota(-id-, STORAGE, -1)
 resulting in
 SETQUOTA id (STORAGE -1)
 what Bron suggested. That should also work IMO. At least on 2.4.12+.

And that isn't correct according to RFC2087.  It works only because the
server is deliberately not enforcing syntax correctly, to workaround a bug in a
different part of the code.

 The man page of Cyrus::IMAP::Admin does not describe how to remove quota
 at
 all. Neither none nor anything else. Nothing wrong in that part so far.

You're right, that documentation is quite unclear.

This reminds me, we need to update the documentation on the master branch
to mention the other resources we support there.

-- 
Greg.

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


Re: [SOLVED] Re: Set quota none using Cyrus::IMAP::Admin

2012-01-18 Thread Wolfgang Breyha
On 2012-01-18 14:18, Greg Banks wrote:
 And second setting
 -setquota(-id-, STORAGE, -1)
 resulting in
 SETQUOTA id (STORAGE -1)
 what Bron suggested. That should also work IMO. At least on 2.4.12+.
 
 And that isn't correct according to RFC2087.  It works only because the
 server is deliberately not enforcing syntax correctly, to workaround a bug in 
 a
 different part of the code.

Yes, it's wanted behaviour;-) cyrus uses quota -1 if a quotaroot is set,
but quota is unlimited. If a mailbox is xfer'ed cyrus uses it itself after
some bugfixes when dumping the mailbox. eg.
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3188
and
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3559

In 3559 Bron said, that maybe 2.5 will handle that differently.

Greetings, Wolfgang
-- 
Wolfgang Breyha wbre...@gmx.net | http://www.blafasel.at/
Vienna University Computer Center | Austria

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


Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Ram
http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/
There is a setquota function which should accept none for removing 
quota. But that does not work

How do I set unlimited quota using the setquota function




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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Bron Gondwana


On Tue, Jan 17, 2012, at 03:57 PM, Ram wrote:
 http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/
 There is a setquota function which should accept none for removing 
 quota. But that does not work
 
 How do I set unlimited quota using the setquota function

Does '-1' work?
-- 
  Bron Gondwana
  br...@fastmail.fm


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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Ram
No -1 also gives an error not a number

Interestingly set_quota function using CPAN module works fine  with none
http://search.cpan.org/~eestabroo/IMAP-Admin-1.6.4/Admin.pm


But my GUI screens are already coded to use Cyrus::IMAP::Admin












On 01/17/2012 04:06 PM, Bron Gondwana wrote:

 On Tue, Jan 17, 2012, at 03:57 PM, Ram wrote:
 http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/
 There is a setquota function which should accept none for removing
 quota. But that does not work

 How do I set unlimited quota using the setquota function
 Does '-1' work?

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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Wolfgang Breyha
Bron Gondwana wrote, on 17.01.2012 11:36:
 On Tue, Jan 17, 2012, at 03:57 PM, Ram wrote:
 http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/
 There is a setquota function which should accept none for removing 
 quota. But that does not work
 
 How do I set unlimited quota using the setquota function
 
 Does '-1' work?

Setting an empty quota works:

use Cyrus::IMAP::Admin;

print setting some quota\n;
my $quotaroot = user.mailboxid;
my @quotaargv = ($quotaroot, STORAGE, 500);
$res = $backend-setquota(@quotaargv);

print setting \unlimited\\n;
@quotaargv = ($quotaroot);
$res = $backend-setquota(@quotaargv);

Greetings, Wolfgang
-- 
Wolfgang Breyha wbre...@gmx.net | http://www.blafasel.at/
Vienna University Computer Center | Austria


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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Bron Gondwana


On Tue, Jan 17, 2012, at 04:22 PM, Ram wrote:
 No -1 also gives an error not a number
 
 Interestingly set_quota function using CPAN module works fine  with none
 http://search.cpan.org/~eestabroo/IMAP-Admin-1.6.4/Admin.pm
 
 
 But my GUI screens are already coded to use Cyrus::IMAP::Admin

What version of Cyrus are you using?

Can you file a bug at bugzilla.cyrusimap.org if it's a 2.4 series, and I'll
get it fixed.

Thanks,

Bron.
-- 
  Bron Gondwana
  br...@fastmail.fm


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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Ram


On 01/17/2012 04:24 PM, Wolfgang Breyha wrote:
 Bron Gondwana wrote, on 17.01.2012 11:36:
 On Tue, Jan 17, 2012, at 03:57 PM, Ram wrote:
 http://www.manpagez.com/man/3/Cyrus::IMAP::Admin/
 There is a setquota function which should accept none for removing
 quota. But that does not work

 How do I set unlimited quota using the setquota function
 Does '-1' work?
 Setting an empty quota works:

 use Cyrus::IMAP::Admin;

 print setting some quota\n;
 my $quotaroot = user.mailboxid;
 my @quotaargv = ($quotaroot, STORAGE, 500);
 $res = $backend-setquota(@quotaargv);

 print setting \unlimited\\n;
 @quotaargv = ($quotaroot);
 $res = $backend-setquota(@quotaargv);

 Greetings, Wolfgang
That means we omit the word STORAGE , thanks .. will try that.

Hope that goes into the document












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


Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Wolfgang Breyha
Ram wrote, on 17.01.2012 12:03:
 That means we omit the word STORAGE , thanks .. will try that.

Yes. I'm always setting some quota before to get it into a defined state
to remove it afterwards. I use it for several years now and recently moved
~100k users without any troubles.

Maybe you have to check/fix your quotaroots before, too.

I had to do that in the past migrating from older cyrus releases. Maybe it's
not necessary anymore.

Greetings, Wolfgang
-- 
Wolfgang Breyha wbre...@gmx.net | http://www.blafasel.at/
Vienna University Computer Center | Austria


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


[SOLVED] Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Ram


On 01/17/2012 04:27 PM, Bron Gondwana wrote:

 On Tue, Jan 17, 2012, at 04:22 PM, Ram wrote:
 No -1 also gives an error not a number

 Interestingly set_quota function using CPAN module works fine  with none
 http://search.cpan.org/~eestabroo/IMAP-Admin-1.6.4/Admin.pm


 But my GUI screens are already coded to use Cyrus::IMAP::Admin
 What version of Cyrus are you using?

 Can you file a bug at bugzilla.cyrusimap.org if it's a 2.4 series, and I'll
 get it fixed.

 Thanks,

 Bron.



I am using cyrus-imapd-2.4.12-2
As Wolfgang suggested using
$imap-setquota(user/$user) removed the quota.

Problem solved



Thanks
Ram






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


Re: [SOLVED] Re: Set quota none using Cyrus::IMAP::Admin

2012-01-17 Thread Wolfgang Breyha
Ram wrote, on 17.01.2012 12:17:
 I am using cyrus-imapd-2.4.12-2
 As Wolfgang suggested using
 $imap-setquota(user/$user) removed the quota.

Looking at the code of Cyrus::IMAP::Admin there is no code checking for none
or something like that. There are two ways to craft a proper IMAP command.
First the way I described setting no STORAGE argument at all resulting in:
SETQUOTA id ()
to remove quota. And second setting
-setquota(-id-, STORAGE, -1)
resulting in
SETQUOTA id (STORAGE -1)
what Bron suggested. That should also work IMO. At least on 2.4.12+.

The man page of Cyrus::IMAP::Admin does not describe how to remove quota at
all. Neither none nor anything else. Nothing wrong in that part so far.

Greetings, Wolfgang
-- 
Wolfgang Breyha wbre...@gmx.net | http://www.blafasel.at/
Vienna University Computer Center | Austria


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


Strange cyrus quota problem

2011-11-24 Thread Thomas Kirchtag
I am rather new to cyrus imap. We took over a client who uses it and has a
strange quota problem. One single user keeps getting Over quota alerts
although cyrus (as well as the client show very small quota usage (24%...)

The cyrus log file shows sending the alert, a few lines below it shows the
correct quota:

  1 -- username Thu Nov 24 10:33:21 2011
  2
  3 13221272013 OK User logged in^M
  4 13221272014 namespace^M
  5 1322127201* NAMESPACE ((INBOX. .)) ((user. .)) ((
.))^M
  6 4 OK Completed^M
  7 13221272015 ID (name Thunderbird version 8.0)^M
  8 1322127201* ID (name Cyrus IMAPD version v2.2.12 2005/02/14
16:43:51 vendor Project Cyrus support-url http://asg.web.cmu.edu
/cyrus os Linux os-version 2.6.13-15.16-smp environment Built
w/Cyrus SASL 2.1.21; Running w/Cyrus SASL 2.1.21; Built w/Sleepycat
Software: Berkeley DB 4.3.27: (September  9, 2005); Running w/Sleepycat
Software: Berkeley DB 4.3.27: (September  9, 2005); Built w/OpenSSL
0.9.7g 11 Apr 2005; Running w/OpenSSL 0.9.7g 11 Apr 2005; CMU Sieve 2.2;
DRAC; TCP Wrappers; mmap = shared; lock = fcntl; nonblock = fcntl; a
uth = unix; idle = idled)^M
  9 5 OK Completed^M
 10 13221272016 lsub  INBOX.*^M
 11 1322127201* LSUB (\HasChildren) . INBOX.Archives^M
snip

181 * LSUB () . INBOX.privat^M
182 8 OK Completed (0.010 secs 85 calls)^M
183 13221272019 list  INBOX^M
184 1322127201* LIST (\HasChildren) . INBOX^M
185 9 OK Completed (0.000 secs 85 calls)^M
186 132212720110 select INBOX^M
187 1322127201* FLAGS (\Answered \Flagged \Draft \Deleted \Seen
$Forwarded $label1 $MDNSent wartet wartet_auf_entscheidung $label4 zur_info
Junk $label2 erledigt $label3 NonJunk $label5)^M
188 * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen
$Forwarded $label1 $MDNSent wartet wartet_auf_entscheidung $label4 zur_info
Junk $label2 erledigt $label3 NonJunk $label5 \*)]  ^M
189 * 77 EXISTS^M
190 * 0 RECENT^M
191 * OK [UNSEEN 77]  ^M
192 * OK [UIDVALIDITY 1307090395]  ^M
193 * OK [UIDNEXT 2680]  ^M
194 * NO [ALERT] Mailbox is over quota^M
195 10 OK [READ-WRITE] Completed^M
196 132212720111 myrights INBOX^M
197 1322127201* MYRIGHTS INBOX lrswipcda^M
198 11 OK Completed^M
199 132212720112 getacl INBOX^M
200 1322127201* ACL INBOX username lrswipcda^M
201 12 OK Completed^M
202 132212720113 getquotaroot INBOX^M
203 1322127201* QUOTAROOT INBOX user.username^M
204 * QUOTA user.username (STORAGE 2441822 1000)^M
205 13 OK Completed^M


I gather from this that the server sends the over quota alert (194 *
NO [ALERT] Mailbox is over quota) and a few lines down the server finds that
the user uses 24% of his quota (204 * QUOTA user.username (STORAGE
2441822 1000))

I tried setting the quota to several different values increasing, decreasing
it from the 1, even setting it to none but the result is always as
above. I tried running quota -f and restarting cyrus several times without
any result.

I'd really appreciate any suggestions on this.

Regards 
Thomas

PS.: I am aware, that the cyrus version in use is old, yet we cannot change
this at the moment.

-- 
=
iPodion GmbH
Rotensterngasse 20/3
A-1020 Wien, Austria
Mobil: +43-660-216 32 98
Tel.:+43-1-216 32 985-00  mailto:off...@ipodion.at
Fax: +43-1-216 32 985-99 http://www.iPodion.at
=
Neu und gratis für iPodion-Kunden: E-Mail-SSL-Zertifikate für Digitale
Signaturen.




smime.p7s
Description: S/MIME cryptographic signature

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

Re: Strange cyrus quota problem

2011-11-24 Thread Julien Coloos
Le 24/11/2011 11:09, Thomas Kirchtag a écrit :
 I am rather new to cyrus imap. We took over a client who uses it and has a
 strange quota problem. One single user keeps getting Over quota alerts
 although cyrus (as well as the client show very small quota usage (24%...)

 ...


 I gather from this that the server sends the over quota alert (194 *
 NO [ALERT] Mailbox is over quota) and a few lines down the server finds that
 the user uses 24% of his quota (204 * QUOTA user.username  (STORAGE
 2441822 1000))

 I tried setting the quota to several different values increasing, decreasing
 it from the 1, even setting it to none but the result is always as
 above. I tried running quota -f and restarting cyrus several times without
 any result.


Hi,

The problem with versions older than 2.3 is that quota data are handled 
through 32-bits variables: signed for limit, unsigned for usage.
In your case quota usage is handled correctly (under the 2^32-1 limit), 
but your quota limit being 1000 KiB triggers the quota alert because 
it is compared to the quota usage in bytes: 1000*1024 exceeds the 
capacity of the 32-bit signed variable.

Actually I believe you are experiencing the same thing that we did with 
2.1.x versions some years ago: when overflowing a 32-bit value, the sign 
bit would be flipped (e.g. 2^31 in a signed variable would become -2^31).
So for example in your case cyrus would believe the actual limit is 
1000*1024 - 2*(2^32)  (variable overflowed two times): the usage 
would thus be around 150%, that is over quota.

So in those old versions you will experience all kind of issues when 
dealing with quota over 2GiB.
Of course the code was reworked since cyrus 2.3 and now works as expected.


Regards

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


deleted user, but quota remains

2011-11-08 Thread Shelley Waltz
I just noticed in my log files (cyrus-imapd-2.3.7 on redhat el5) that a user I 
removed
a while ago(using cyradm), still has a /var/lib/imap/quota/k/user.kname file.  
I am using
quotalegacy.  All of the account is gone, but for this.  My cron job which uses 
ipurge
spews error messages about the missing folder.

It it  possible to just remove the quota file for the user or do I need to do 
some other
magic?  Also, why did this file remain, this has not happened before.

thanks
SWaltz


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


Re: deleted user, but quota remains

2011-11-08 Thread Dan White
On 08/11/11 08:50 -0500, Shelley Waltz wrote:
I just noticed in my log files (cyrus-imapd-2.3.7 on redhat el5) that a user I 
removed
a while ago(using cyradm), still has a /var/lib/imap/quota/k/user.kname file.  
I am using
quotalegacy.  All of the account is gone, but for this.  My cron job which 
uses ipurge
spews error messages about the missing folder.

It it  possible to just remove the quota file for the user or do I need to do 
some other
magic?  Also, why did this file remain, this has not happened before.

This briefly discusses how to remove a quotaroot for a mailbox, when using
quotalegacy:

http://www.cyrusimap.org/docs/cyrus-imapd/2.4.12/overview.php#recoveryquotasrm

Since that user's mailbox hierarchy no longer exists, I assume quota -f can
be safely skipped.

-- 
Dan White

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


Re: deleted user, but quota remains

2011-11-08 Thread Eric Luyten
On Tue, November 8, 2011 2:50 pm, Shelley Waltz wrote:
 I just noticed in my log files (cyrus-imapd-2.3.7 on redhat el5) that a user
 I removed
 a while ago(using cyradm), still has a /var/lib/imap/quota/k/user.kname file.
 I am using
 quotalegacy.  All of the account is gone, but for this.  My cron job which
 uses ipurge spews error messages about the missing folder.

 It it  possible to just remove the quota file for the user or do I need to do
 some other magic?  Also, why did this file remain, this has not happened
 before.


Shelley,


FYI, our 2.3.16 Cyrus server exhibits identical behaviour.


Eric Luyten, Computing Centre Brussels Free University.



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


Re: Usage of a user with unlimited quota.

2011-09-07 Thread Jeroen van Meeuwen (Kolab Systems)
Ashay Chitnis wrote:
 Hi all,
 
 I am using cyrus-imapd-2.3.7 on a CentOS 5 32 bit platform. There are some
 users with unlimited quota and some with limited quota.
 
 My problem is when I issue a GETQUOTAROOT command for an unlimited quota
 user it returns nothing. This may be a standard. But I need to update the
 IMAP usage of a user irrespective of whether the user has limited quota or
 unlimited quota without having to manually calculate the data of the user.
 Is there a way to get the IMAP usage of a user with unlimited quota without
 having to manually calculate it?
 

The '/vendor/cmu/cyrus-imapd/size' annotation should give you the size of the 
mailfolder.

Kind regards,

Jeroen van Meeuwen

-- 
Senior Engineer, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
t: +44 144 340 9500
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08

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

quota bug in 2.4 ?

2011-09-06 Thread Eero Hänninen
Hi..

In some reasons my cyrus host quotas.db has crashed, so I have 
recovered them by setting quotas again over IMAP port with script and 
then run quota -f locally.
In fixing process I discovered that if I have two users like bar and 
bar1 and bar have quota lets say for example 10mb and bar1 have 
unlimited quota (never have set quota) then seems like user/bar and 
user/bar1 box usages will be sum to user/bar quota usage.
Ok to make sur for myself that this is not OS or setup specific thing, 
I have taken another host and created test case:
Here is output:

$ cyradm --server localhost --user cyrus
Password:
localhost cm user/bar
localhost cm user/bar1
localhost cm user/bar11
localhost sam user/bar bar lrswipkxtecda
localhost sam user/bar1 bar1 lrswipkxtecda
localhost sam user/bar11 bar11 lrswipkxtecda
localhost sq user/bar 1
quota:1
localhost sq user/bar11 1
quota:1

next copied some messages and run reconstruct -rf user/bar{,1,11}
and then quota -f:

$ /usr/local/cyrus/bin/quota -f
user.bar1: quota root (none) -- user.bar
user.bar: usage was 3210927, now 7505017
Quota   % Used Used Root
1   73 7329 user/bar
1  12112131 user/bar11

Here is filesystem level view:
$ du -s *
3914bar
4792bar1
12708   bar11

Here is what cyrus thinks:

$ cyradm --server localhost --user cyrus
Password:
localhost lq user/bar
  STORAGE 7329/1 (73.29%)
localhost lq user/bar1

localhost lq user/bar11
  STORAGE 12131/1 (121.31%)

Note, that this will happen if user/bar11 never have any quota set, if 
quota was set before and then set it 0 then this thing is not happening.

And version info:
Discovered from Debian Linux 6.0 x86_64 (squeeze)
Self compiled cyrus-imapd 2.4.10

for reproduce used FreeBSD 8.2 x86_64
and cyrus-imapd-2.4.10 from freebsd ports.

Is this normal, or known bug, or need to be fill in bugzilla ? :)

Best Regards,
Eero


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


Re: quota bug in 2.4 ?

2011-09-06 Thread Bron Gondwana
On Tue, Sep 06, 2011 at 05:23:15PM +0300, Eero Hänninen wrote:
 Is this normal, or known bug, or need to be fill in bugzilla ? :)

Filed and fixed for 2.4.11 - which will be out real-soon-now[tm].

Bron.

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


Usage of a user with unlimited quota.

2011-08-16 Thread Ashay Chitnis
Hi all,

I am using cyrus-imapd-2.3.7 on a CentOS 5 32 bit platform. There are some
users with unlimited quota and some with limited quota.

My problem is when I issue a GETQUOTAROOT command for an unlimited quota
user it returns nothing. This may be a standard. But I need to update the
IMAP usage of a user irrespective of whether the user has limited quota or
unlimited quota without having to manually calculate the data of the user.
Is there a way to get the IMAP usage of a user with unlimited quota without
having to manually calculate it?

Regards,
Ashay.

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

  1   2   3   4   5   6   7   8   9   >