]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: If write fails with EFBIG, give an error that mentions ulimit -f.
authorTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 16:36:35 +0000 (17:36 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 25 May 2010 16:36:35 +0000 (17:36 +0100)
--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-storage.c

index 9ef3a5790ca754c8af618eaaf19ef30139368c24..261c74cd1e595a0cb09753272013da772012836e 100644 (file)
@@ -75,9 +75,12 @@ int mbox_set_syscall_error(struct mbox_mailbox *mbox, const char *function)
                mail_storage_set_error(&mbox->storage->storage,
                        MAIL_ERROR_NOSPACE, MAIL_ERRSTR_NO_SPACE);
        } else {
+               const char *toobig_error = errno != EFBIG ? "" :
+                       " (process was started with ulimit -f limit)";
                mail_storage_set_critical(&mbox->storage->storage,
-                                         "%s failed with mbox file %s: %m",
-                                         function, mbox->box.path);
+                                         "%s failed with mbox file %s: %m%s",
+                                         function, mbox->box.path,
+                                         toobig_error);
        }
        return -1;
 }