Christian Rohmann
2014-Jul-22 15:11 UTC
Defer email via LMTP when there is 'no space left on device' instead of rejecting it
Hello dovecot-users,
(This problem was being discussed a little in this thread from 2011:
http://www.dovecot.org/list/dovecot/2011-May/059009.html)
I noticed (using LMTP) that Dovecot handles 'no space left on device'
just like an 'over-quota', if I read this part of method "static
int
client_deliver(struct client *client, const struct mail_recipient *rcpt,
struct mail *src_mail, struct mail_deliver_session *session)"
"lmtp/commands.c" correctly:
--- cut ---
[...]
else if (storage != NULL) {
error = mail_storage_get_last_error(storage, &mail_error);
if (mail_error == MAIL_ERROR_NOSPACE) {
client_send_line(client, "%s <%s> %s",
dctx.set->quota_full_tempfail ?
"452 4.2.2" : "552
5.2.2",
rcpt->address, error);
} else {
client_send_line(client, "451 4.2.0 <%s>
%s",
rcpt->address, error);
}
ret = -1;
[...]
--- /cut ---
In consequence this means the configuration option quota_full_tempfail
is applied in both cases. But to me there is a major difference between
a full disk (a.k.a "admin fucked up") and over-quota (a.k.a.
"user has
simply too much stuff in his mailbox"). So I would like to be able tell
Dovecot to reject messages due to full mailboxes, but simply defer those
that cannot be stored due to a full disk (which I am to blame for).
To me this should result in two separate configuration options for the
two problem root-causes:
quota_full_tempfail
storage_full_tempfail
Or did I simply miss or completely misunderstood anything here?
Regards
Christian
Reindl Harald
2014-Jul-22 15:31 UTC
Defer email via LMTP when there is 'no space left on device' instead of rejecting it
Am 22.07.2014 17:11, schrieb Christian Rohmann:> In consequence this means the configuration option quota_full_tempfail > is applied in both cases. But to me there is a major difference between > a full disk (a.k.a "admin fucked up") and over-quota (a.k.a. "user has > simply too much stuff in his mailbox"). So I would like to be able tell > Dovecot to reject messages due to full mailboxes, but simply defer those > that cannot be stored due to a full disk (which I am to blame for). > > To me this should result in two separate configuration options for the > two problem root-causes: > > quota_full_tempfail > storage_full_tempfail > > Or did I simply miss or completely misunderstood anything here?no - in case of quota full i can take a phone and call the RCPT, he can make free space due the phone call and say "try it again please" in case of disk full *this is* a permanent error likely not correctable by the user given that after delete a message a different one get a new and the disk is full again that sort of mistakes happens one per decade and hardly need special handling - if that happens your user quotas are wrongly configured because the idea behind them is to prevent "disk full" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 246 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20140722/89c9feff/attachment.sig>