Unable to set quota-fs plugin
Hello There,
I am try desperatly to setup quota-fs plugin in Dovecot. I have the following configuration in place:
/etc/dovecot/conf.d/10-mail.conf:mail_plugins = $mail_plugins quota zlib /etc/dovecot/conf.d/20-imap.conf: mail_plugins = $mail_plugins imap_quota /etc/dovecot/conf.d/90-quota.conf: plugin { #quota = dirsize:User quota #quota = maildir:User quota #quota = dict:User quota::proxy::quota #quota = fs:User quota:user quota = fs:user } The logs report the following error each time quota is requested: Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory
I have no idea of which file or directory is missing.
Any advice is welcome.
Thanks and best regards,
- Eric Grammatico _/)
To complete, I am on Fedora 28, kernel 4.20.14-100.fc28.x86_64
Thanks and regards,
Eric Grammatico _/) 13 mars 2019 10:14 "Eric Grammatico" a écrit:
Hello There,
I am try desperatly to setup quota-fs plugin in Dovecot. I have the following configuration in place:
/etc/dovecot/conf.d/10-mail.conf:mail_plugins = $mail_plugins quota zlib /etc/dovecot/conf.d/20-imap.conf: mail_plugins = $mail_plugins imap_quota /etc/dovecot/conf.d/90-quota.conf: plugin { #quota = dirsize:User quota #quota = maildir:User quota #quota = dict:User quota::proxy::quota #quota = fs:User quota:user quota = fs:user } The logs report the following error each time quota is requested: Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory
I have no idea of which file or directory is missing.
Any advice is welcome.
Thanks and best regards,
- Eric Grammatico _/)
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote:
[...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx)<4939><S0Opc9SDjLyjrKVa>: Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory
That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Looks working.
[root@mail ~]# ls -lh / total 72K -rw------- 1 root root 8.0K Mar 13 09:56 aquota.group -rw------- 1 root root 7.0K Mar 13 09:56 aquota.user ....
[root@mail ~]# repquota -a *** Report for user quotas on device /dev/vda1 Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace
rpcuser -- 12 0 0 3 0 0
ntp -- 12 0 0 3 0 0
systemd-network -- 12 0 0 3 0 0
mysql -- 219680 0 0 564 0 0
squid -- 96 0 0 4 0 0
xxxxxx -- 869532 3170304 4194304 119 0 0
tss -- 12 0 0 2 0 0
mail -- 4 0 0 1 0 0
rpc -- 0 0 0 1 0 0
polkitd -- 8 0 0 2 0 0
xxxx -- 623880 3170304 4194304 12784 0 0
smmsp -- 8 0 0 2 0 0
apache -- 395616 0 0 19173 0 0
xxxxxxxx -- 1580 0 0 147 0 0
dovecot -- 4 0 0 1 0 0
root -- 3575932 0 0 65814 0 0
#1003 -- 0 0 0 1 0 0
Thanks and regards,
Eric Grammatico _/)
13 mars 2019 10:54 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Can you try
strace doveadm quota get -u victim
and post the output of this?
Aki
On 13.3.2019 12.11, Eric Grammatico via dovecot wrote:
Looks working.
[root@mail ~]# ls -lh / total 72K -rw------- 1 root root 8.0K Mar 13 09:56 aquota.group -rw------- 1 root root 7.0K Mar 13 09:56 aquota.user ....
[root@mail ~]# repquota -a *** Report for user quotas on device /dev/vda1 Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace
rpcuser -- 12 0 0 3 0 0
ntp -- 12 0 0 3 0 0
systemd-network -- 12 0 0 3 0 0
mysql -- 219680 0 0 564 0 0
squid -- 96 0 0 4 0 0
xxxxxx -- 869532 3170304 4194304 119 0 0
tss -- 12 0 0 2 0 0
mail -- 4 0 0 1 0 0
rpc -- 0 0 0 1 0 0
polkitd -- 8 0 0 2 0 0
xxxx -- 623880 3170304 4194304 12784 0 0
smmsp -- 8 0 0 2 0 0
apache -- 395616 0 0 19173 0 0
xxxxxxxx -- 1580 0 0 147 0 0
dovecot -- 4 0 0 1 0 0
root -- 3575932 0 0 65814 0 0
#1003 -- 0 0 0 1 0 0Thanks and regards,
Eric Grammatico _/)
13 mars 2019 10:54 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Here is attached.
- Eric Grammatico _/)
13 mars 2019 11:29 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you try
strace doveadm quota get -u victim
and post the output of this?
Aki
On 13.3.2019 12.11, Eric Grammatico via dovecot wrote:
Looks working.
[root@mail ~]# ls -lh / total 72K -rw------- 1 root root 8.0K Mar 13 09:56 aquota.group -rw------- 1 root root 7.0K Mar 13 09:56 aquota.user ....
[root@mail ~]# repquota -a *** Report for user quotas on device /dev/vda1 Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace
rpcuser -- 12 0 0 3 0 0 ntp -- 12 0 0 3 0 0 systemd-network -- 12 0 0 3 0 0 mysql -- 219680 0 0 564 0 0 squid -- 96 0 0 4 0 0 xxxxxx -- 869532 3170304 4194304 119 0 0 tss -- 12 0 0 2 0 0 mail -- 4 0 0 1 0 0 rpc -- 0 0 0 1 0 0 polkitd -- 8 0 0 2 0 0 xxxx -- 623880 3170304 4194304 12784 0 0 smmsp -- 8 0 0 2 0 0 apache -- 395616 0 0 19173 0 0 xxxxxxxx -- 1580 0 0 147 0 0 dovecot -- 4 0 0 1 0 0 root -- 3575932 0 0 65814 0 0 #1003 -- 0 0 0 1 0 0
Thanks and regards,
Eric Grammatico _/)
13 mars 2019 10:54 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
The doveadm command seems to have worked. Can you retry with imap?
strace /usr/lib/dovecot/imap -u victim
Aki
On 13.3.2019 12.58, Eric Grammatico via dovecot wrote:
Here is attached.
- Eric Grammatico _/)
13 mars 2019 11:29 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you try
strace doveadm quota get -u victim
and post the output of this?
Aki
On 13.3.2019 12.11, Eric Grammatico via dovecot wrote:
Looks working.
[root@mail ~]# ls -lh / total 72K -rw------- 1 root root 8.0K Mar 13 09:56 aquota.group -rw------- 1 root root 7.0K Mar 13 09:56 aquota.user ....
[root@mail ~]# repquota -a *** Report for user quotas on device /dev/vda1 Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace
rpcuser -- 12 0 0 3 0 0 ntp -- 12 0 0 3 0 0 systemd-network -- 12 0 0 3 0 0 mysql -- 219680 0 0 564 0 0 squid -- 96 0 0 4 0 0 xxxxxx -- 869532 3170304 4194304 119 0 0 tss -- 12 0 0 2 0 0 mail -- 4 0 0 1 0 0 rpc -- 0 0 0 1 0 0 polkitd -- 8 0 0 2 0 0 xxxx -- 623880 3170304 4194304 12784 0 0 smmsp -- 8 0 0 2 0 0 apache -- 395616 0 0 19173 0 0 xxxxxxxx -- 1580 0 0 147 0 0 dovecot -- 4 0 0 1 0 0 root -- 3575932 0 0 65814 0 0 #1003 -- 0 0 0 1 0 0
Thanks and regards,
Eric Grammatico _/)
13 mars 2019 10:54 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
Thanks Aki,
Please find attached strace for imap and quota-status which report an error at the end.
Regards,
- Eric Grammatico _/)
13 mars 2019 12:23 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
The doveadm command seems to have worked. Can you retry with imap?
strace /usr/lib/dovecot/imap -u victim
Aki
On 13.3.2019 12.58, Eric Grammatico via dovecot wrote:
Here is attached.
- Eric Grammatico _/)
13 mars 2019 11:29 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you try
strace doveadm quota get -u victim
and post the output of this?
Aki
On 13.3.2019 12.11, Eric Grammatico via dovecot wrote:
Looks working.
[root@mail ~]# ls -lh / total 72K -rw------- 1 root root 8.0K Mar 13 09:56 aquota.group -rw------- 1 root root 7.0K Mar 13 09:56 aquota.user ....
[root@mail ~]# repquota -a *** Report for user quotas on device /dev/vda1 Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace
rpcuser -- 12 0 0 3 0 0 ntp -- 12 0 0 3 0 0 systemd-network -- 12 0 0 3 0 0 mysql -- 219680 0 0 564 0 0 squid -- 96 0 0 4 0 0 xxxxxx -- 869532 3170304 4194304 119 0 0 tss -- 12 0 0 2 0 0 mail -- 4 0 0 1 0 0 rpc -- 0 0 0 1 0 0 polkitd -- 8 0 0 2 0 0 xxxx -- 623880 3170304 4194304 12784 0 0 smmsp -- 8 0 0 2 0 0 apache -- 395616 0 0 19173 0 0 xxxxxxxx -- 1580 0 0 147 0 0 dovecot -- 4 0 0 1 0 0 root -- 3575932 0 0 65814 0 0 #1003 -- 0 0 0 1 0 0
Thanks and regards,
Eric Grammatico _/)
13 mars 2019 10:54 "Aki Tuomi" aki.tuomi@open-xchange.com a écrit:
Can you ensure that quota actually works on your system? Do the aquota files exist?
Aki
On 13 March 2019 at 11:41 Eric Grammatico via dovecot dovecot@dovecot.org wrote:
Thanks Yassine,
My / is mounted from /dev/vda1 with the following options: [root@mail ~]# cat /etc/mtab |grep "vda1 " /dev/vda1 / ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0
Regards,
Eric Grammatico _/) 13 mars 2019 10:31 "Yassine Chaouche via dovecot" a écrit:
On 3/13/19 10:14 AM, Eric Grammatico via dovecot wrote: [...] Mar 11 17:56:20 mail.xxxxxxx.xx dovecot[4923]: imap(xxxx): Error: Failed to get quota resource STORAGE: quota-fs: quotactl(Q_GETQUOTA, /dev/vda1) failed: No such file or directory That's odd, I usually see s*da (not *v*da) in most systems I've worked with, as in *S*csi Drive A.
Yassine.
On 3/13/19 2:10 PM, Eric Grammatico via dovecot wrote:
Thanks Aki,
Please find attached strace for imap and quota-status which report an error at the end.
Regards,
write(2, "/usr/libexec/dovecot/quota-statu"..., 57/usr/libexec/dovecot/quota-status: invalid option -- 'u'
Please retry with the good options (-u is invalid)
Yassine.
On 3/14/19 9:53 AM, Yassine Chaouche via dovecot wrote:
On 3/13/19 2:10 PM, Eric Grammatico via dovecot wrote:
Thanks Aki,
Please find attached strace for imap and quota-status which report an error at the end.
Regards,
write(2, "/usr/libexec/dovecot/quota-statu"..., 57/usr/libexec/dovecot/quota-status: invalid option -- 'u'
Please retry with the good options (-u is invalid)
Yassine.
Ah, that seems to be the service that is called by the MTA before delivering the mail to the LDA, in case the user is over quota, so that the MTA may bounce the e-mail right away instead of accepting it first then bouncing afterwards (after the LDA refuses the message).
But according to the error message you posted on your first e-mail, the error happens with imap, I don't know if quota-status is involved here (might be) ?
In any case, I would concentrate on imap and not quota-status. Nothing in the imap strace shows any trace of errors. Particulary, I was looking for a quotactl line in the strace, but I couldn't find it.
In the other hand, it is present in the doveadm quota strace, and has completed successfully
dovecot.strace:quotactl(QCMD(Q_GETQUOTA, USRQUOTA), "/dev/vda1", 1000, {dqb_bhardlimit=4194304, dqb_bsoftlimit=3170304, dqb_curspace=638853120, dqb_ihardlimit=0, dqb_isoftlimit=0, dqb_curinodes=12784, ...}) = 0
Someone has to tell us under what conditions will the imap daemon check for quota (at login ? at delivery or any other action involving moving mail around like copying or expunging ?)
For the quota-status libexec, I have set it to run with quota-status -f postfix but your setup may vary (if it's every configured). If it is running, you can just grep it's pid with pgrep quota-status then strace -p $PID and see how it behaves (wait until a quota operation is needed).
Yassine.
participants (3)
-
Aki Tuomi
-
Eric Grammatico
-
Yassine Chaouche