Re: [exim] exim maildirsize quota calculation in the face of…

Página Inicial
Delete this message
Reply to this message
Autor: Cyborg
Data:  
Para: exim-users
Assunto: Re: [exim] exim maildirsize quota calculation in the face of symlinks
Am 16.02.22 um 14:46 schrieb Maarten van Baarsel via Exim-users:
> I'd like to say thanks for the replies, and ask for guidance how to
> put this on the feature-addition-list so that it won't be forgotten, I
> did find the problem Cyborg was alluding to in a post from a while ago :)
>
> I had a quick look at the code but did not see a fast path to a fix.
>
> Maarten.
>
>
>


Just an idea:

Calc() ...
   array = new array();
   Loop:
       file = openfile( ... );
       if file.inode.linkcounter == 1 || array.get( file.inode.id ) ==
NULL  {
            array.put( file.inode.id );
            count file.size
       } // skip if it's a known hardlink


(note: the linkcounter check is actually obsolete, because it would not
matter. It's just for illustration. )

IMHO, it's dovecot who's causing this by adding hardlinks to files in
the first place. it's not Exims fault, even if it could avoid this
"miscount" easily.

Best regards,
Marius