Defer email via LMTP when there is 'no space left on device' instead of rejecting it

Christian Rohmann crohmann at
Tue Jul 22 15:11:05 UTC 2014

Hello dovecot-users,

(This problem was being discussed a little in this thread from 2011:

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:


Or did I simply miss or completely misunderstood anything here?



More information about the dovecot mailing list