quota: fix handling negative max size when configured for an account, and clarify value is in bytes in config file

for #115 by pmarini-nc
This commit is contained in:
Mechiel Lukkien
2024-01-12 15:02:16 +01:00
parent 7b6cfcd572
commit aea8740e65
5 changed files with 17 additions and 16 deletions

View File

@ -657,12 +657,13 @@ See https://pkg.go.dev/github.com/mjl-/sconf for details.
# (optional)
OutgoingTLSReportsForAllSuccess: false
# Default maximum total message size for accounts, only applicable if greater than
# zero. Can be overridden per account. Attempting to add new messages beyond the
# maximum size will result in an error. Useful to prevent a single account from
# filling storage. The quota only applies to the email message files, not to any
# file system overhead and also not the message index database file (account for
# approximately 15% overhead). (optional)
# Default maximum total message size in bytes for each individual account, only
# applicable if greater than zero. Can be overridden per account. Attempting to
# add new messages to an account beyond its maximum total size will result in an
# error. Useful to prevent a single account from filling storage. The quota only
# applies to the email message files, not to any file system overhead and also not
# the message index database file (account for approximately 15% overhead).
# (optional)
QuotaMessageSize: 0
# domains.conf
@ -934,11 +935,11 @@ See https://pkg.go.dev/github.com/mjl-/sconf for details.
# How long unique values are accepted after generating, e.g. 12h.
Period: 0s
# Default maximum total message size for the account, overriding any globally
# configured maximum size if non-zero. A negative value can be used to have no
# limit in case there is a limit by default. Attempting to add new messages beyond
# the maximum size will result in an error. Useful to prevent a single account
# from filling storage. (optional)
# Default maximum total message size in bytes for the account, overriding any
# globally configured default maximum size if non-zero. A negative value can be
# used to have no limit in case there is a limit by default. Attempting to add new
# messages to an account beyond its maximum total size will result in an error.
# Useful to prevent a single account from filling storage. (optional)
QuotaMessageSize: 0
# Mail that looks like spam will be rejected, but a copy can be stored temporarily