atom feed4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] szmlink counts as...
FromSent OnAttachments
SZÉPE ViktorMay 18, 2017 6:31 pm 
Gordon MessmerJun 16, 2017 11:36 pm.patch
SZÉPE ViktorJun 17, 2017 7:54 am 
Sam VarshavchikJun 17, 2017 6:35 pm 
Subject:Re: [courier-users] szmlink counts as quota
From:Gordon Messmer (gord@gmail.com)
Date:Jun 16, 2017 11:36:50 pm
List:net.sourceforge.lists.courier-users
Attachments:

On 05/18/2017 06:31 PM, SZÉPE Viktor wrote:

Could it be that that Courier counts Sent folder size three time while calculating quota?

Can you test this patch?

diff --git a/maildir/maildirquota.c b/maildir/maildirquota.c index 3f3e0bd..3ff78f1 100644 --- a/maildir/maildirquota.c +++ b/maildir/maildirquota.c @@ -454,6 +454,9 @@ static int docheckquota(struct maildirsize *info, dirp=opendir(info->maildir); while (dirp && (de=readdir(dirp)) != 0) { +#ifdef _DIRENT_HAVE_D_TYPE + if (de->d_type == DT_LNK) continue; +#endif if (countsubdir(info->maildir, de->d_name, &maxtime, &maildirsize_size, &maildirsize_cnt)) @@ -520,6 +523,9 @@ static int docheckquota(struct maildirsize *info, dirp=opendir(info->maildir); while (dirp && (de=readdir(dirp)) != 0) { +#ifdef _DIRENT_HAVE_D_TYPE + if (de->d_type == DT_LNK) continue; +#endif if (statsubdir(info->maildir, de->d_name, &tm)) { errno=EIO;

------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot