Dovecot >=2.2.29 + Filesystem quota = incorrect storage information

Macka dovecot at macka.pl
Wed Oct 18 12:40:14 EEST 2017


W dniu 17.10.2017 o 21:57, Timo Sirainen pisze:
> On 17 Oct 2017, at 18.02, Macka <dovecot at macka.pl> wrote:
>> I have to resume the thread.
>>
>> Apparently the problem is caused by the new /usr/include/sys/quota.h file (glibc-2.25 and newer)
>>
>> When I use the quota.h with glibc-headers-2.25, the filesystem quota limits are badly displayed.
>> When using the same glibc-2.25 library but replacing ONLY one quota.h file from the older version of glibc-2.24, after compilation, the limits are correct.
> Looks like they removed the _LINUX_QUOTA_VERSION define from quota.h. This causes Dovecot to assume it's quota v1. I wonder if there's a way to detect that it's a new quota.h or should we just drop support for _LINUX_QUOTA_VERSION==1..
>
>
>

Simple patch for dovecot-2.2.32-1.src.rpm from PLD Linux Distribution.

# diff -urN dovecot.spec.orig dovecot.spec
--- dovecot.spec.orig   2017-08-25 09:07:19.808464432 +0200
+++ dovecot.spec        2017-10-18 11:08:20.077955941 +0200
@@ -175,7 +175,7 @@
  %{__automake}
  %configure \
         ac_cv_prog_VALGRIND=no \
-       CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" \
+       CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer 
-D_LINUX_QUOTA_VERSION=2" \
         --disable-static \
         %{?debug:--enable-debug} \
         %{?with_ldap:--with-ldap=yes} \


Added

# define _LINUX_QUOTA_VERSION 2

to /usr/include/sys/quota.h solves the problem too, but only 
temporarily, until the next update of the original library.




More information about the dovecot mailing list