dovecot disk space settings
Hi,
is there an option to leave some disk space free? Let's say, don't store new mails if the storage mount point has less than 1% free disk space. What's the way to go?
I don't want to restrict each mailbox size. It's just to prevent running out space completely.
Thanks!
Best regards,
Marcel
is there an option to leave some disk space free? Let's say, don't store new mails if the storage mount point has less than 1% free disk space. What's the way to go?
I don't want to restrict each mailbox size. It's just to prevent running out space completely.
emails are often accepted by an mta like postfix before handed over to dovecot. You could configure a postfix policy service that checks your disk usage and temporarily rejects new emails.
On the server you should check your filesystem: ext4 reserves 5% of storage for root by default. If dovecot does not need root to deliver mails, you already might have some space left.
Or you might use linux system quota. If all your mailusers are in the same group you can set a group quota.
Another alternative would be to create a big dummy file that you can delete if necessary. E.g. truncate -s 20g /var/mail/DELETEME (man truncate)
Best regards Gerald
marcel bendler via dovecot skrev den 2019-10-22 10:52:
I don't want to restrict each mailbox size. It's just to prevent running out space completely.
dovecot quotas policy server can limit out of space problems, the trick is to not allow more then storages can hold, if this test is done in postfix its only for postfix queue dir, not neseserly same partion that dovecot use to storage, but postfix can call dovecot policy service to check its not out of space, the dovecot policy service can still be optimised for this propose
participants (4)
-
Benny Pedersen
-
Gerald Galster
-
Marc Roos
-
marcel bendler