[Dovecot] Well, "Hard filesystem quota can also be problematic"
Jeroen Scheerder
Jeroen.Scheerder at phil.uu.nl
Wed Jul 27 09:12:59 EEST 2005
"Hard filesystem quota can also be problematic", quoth <http://www.dovecot.org/>.
Since we actually use quota for our userbasg, this merited further investigation.
Using 1.0-stable, we enabled quota on /var and /users filesystems, and set
very low quota for a test account. Then we had some mail delivered on it, and
we moved some messages about.
At some point, Thunderbird started to croak about
"The current command did not succeed. The mail server responded:
Internal error occured. Refer to server log for more information.
[<timestamp>].",
"The current command did not succeed. The mail server responded: .",
"The current command did not succeed. The mail server responded:
Out of disk space."
This I can live with. Hoever, at some point in our experiments we also found
that a mailbox (mbox format) that did contain a few dozen messages suddenly
was truncated to 0 bytes. Not so hot.
Can anyone tell me whether or not there is, or will be, some way of using
dovecot on a system with quota without risk of data loss when quota limits are
reached? How do people cope with this?
Regards, Jeroen.
p.s. That first error message gave rise to the enclosed patch.
-------------- next part --------------
diff -r -c1 dovecot-1.0-stable-patched/doc/auth-protocol.txt dovecot-1.0-stable/doc/auth-protocol.txt
*** dovecot-1.0-stable-patched/doc/auth-protocol.txt Wed Jul 27 08:08:35 2005
--- dovecot-1.0-stable/doc/auth-protocol.txt Mon Jan 31 17:37:54 2005
***************
*** 171,173 ****
! FAIL reply means an internal error occurred. Usually either a configuration
mistake or temporary error caused by lost resource (eg. database down).
--- 171,173 ----
! FAIL reply means an internal error occured. Usually either a configuration
mistake or temporary error caused by lost resource (eg. database down).
diff -r -c1 dovecot-1.0-stable-patched/doc/index.txt dovecot-1.0-stable/doc/index.txt
*** dovecot-1.0-stable-patched/doc/index.txt Wed Jul 27 08:08:39 2005
--- dovecot-1.0-stable/doc/index.txt Mon Jan 31 17:37:54 2005
***************
*** 89,91 ****
processes has to scan the mailbox, other processes simply check from the
! log file what changes occurred.
--- 89,91 ----
processes has to scan the mailbox, other processes simply check from the
! log file what changes occured.
diff -r -c1 dovecot-1.0-stable-patched/src/imap/client.h dovecot-1.0-stable/src/imap/client.h
*** dovecot-1.0-stable-patched/src/imap/client.h Wed Jul 27 08:08:26 2005
--- dovecot-1.0-stable/src/imap/client.h Mon Jan 31 17:37:54 2005
***************
*** 68,70 ****
/* Read a number of arguments. Returns TRUE if everything was read or
! FALSE if either needs more data or error occurred. */
int client_read_args(struct client *client, unsigned int count,
--- 68,70 ----
/* Read a number of arguments. Returns TRUE if everything was read or
! FALSE if either needs more data or error occured. */
int client_read_args(struct client *client, unsigned int count,
diff -r -c1 dovecot-1.0-stable-patched/src/imap/cmd-idle.c dovecot-1.0-stable/src/imap/cmd-idle.c
*** dovecot-1.0-stable-patched/src/imap/cmd-idle.c Wed Jul 27 08:08:30 2005
--- dovecot-1.0-stable/src/imap/cmd-idle.c Mon Jan 31 17:37:54 2005
***************
*** 159,161 ****
} else if (ctx->sync_pending) {
! /* more changes occurred while we were sending changes to
client */
--- 159,161 ----
} else if (ctx->sync_pending) {
! /* more changes occured while we were sending changes to
client */
diff -r -c1 dovecot-1.0-stable-patched/src/lib/file-cache.h dovecot-1.0-stable/src/lib/file-cache.h
*** dovecot-1.0-stable-patched/src/lib/file-cache.h Wed Jul 27 08:06:28 2005
--- dovecot-1.0-stable/src/lib/file-cache.h Mon Jan 31 17:37:55 2005
***************
*** 12,14 ****
/* Read data from file, returns how many bytes was actually read or -1 if
! error occurred. */
ssize_t file_cache_read(struct file_cache *cache, uoff_t offset, size_t size);
--- 12,14 ----
/* Read data from file, returns how many bytes was actually read or -1 if
! error occured. */
ssize_t file_cache_read(struct file_cache *cache, uoff_t offset, size_t size);
diff -r -c1 dovecot-1.0-stable-patched/src/lib/istream.h dovecot-1.0-stable/src/lib/istream.h
*** dovecot-1.0-stable-patched/src/lib/istream.h Wed Jul 27 08:06:32 2005
--- dovecot-1.0-stable/src/lib/istream.h Mon Jan 31 17:37:54 2005
***************
*** 60,62 ****
/* Like i_stream_next_line(), but reads for more data if needed. Returns NULL
! if more data is needed or error occurred. */
char *i_stream_read_next_line(struct istream *stream);
--- 60,62 ----
/* Like i_stream_next_line(), but reads for more data if needed. Returns NULL
! if more data is needed or error occured. */
char *i_stream_read_next_line(struct istream *stream);
diff -r -c1 dovecot-1.0-stable-patched/src/lib/read-full.h dovecot-1.0-stable/src/lib/read-full.h
*** dovecot-1.0-stable-patched/src/lib/read-full.h Wed Jul 27 08:06:38 2005
--- dovecot-1.0-stable/src/lib/read-full.h Mon Jan 31 17:37:54 2005
***************
*** 3,5 ****
! /* Read data from file. Returns -1 if error occurred, or 0 if EOF came before
everything was read, or 1 if all was ok. */
--- 3,5 ----
! /* Read data from file. Returns -1 if error occured, or 0 if EOF came before
everything was read, or 1 if all was ok. */
diff -r -c1 dovecot-1.0-stable-patched/src/lib/strfuncs.c dovecot-1.0-stable/src/lib/strfuncs.c
*** dovecot-1.0-stable-patched/src/lib/strfuncs.c Wed Jul 27 08:06:47 2005
--- dovecot-1.0-stable/src/lib/strfuncs.c Mon May 16 23:15:10 2005
***************
*** 100,102 ****
if (len < 0) {
! /* some error occurred */
len = 0;
--- 100,102 ----
if (len < 0) {
! /* some error occured */
len = 0;
diff -r -c1 dovecot-1.0-stable-patched/src/lib/write-full.h dovecot-1.0-stable/src/lib/write-full.h
*** dovecot-1.0-stable-patched/src/lib/write-full.h Wed Jul 27 08:06:43 2005
--- dovecot-1.0-stable/src/lib/write-full.h Mon Jan 31 17:37:55 2005
***************
*** 3,5 ****
! /* Write data into file. Returns -1 if error occurred, or 0 if all was ok.
If there's not enough space in device, -1 with ENOSPC is returned, and
--- 3,5 ----
! /* Write data into file. Returns -1 if error occured, or 0 if all was ok.
If there's not enough space in device, -1 with ENOSPC is returned, and
diff -r -c1 dovecot-1.0-stable-patched/src/lib-imap/imap-parser.h dovecot-1.0-stable/src/lib-imap/imap-parser.h
*** dovecot-1.0-stable-patched/src/lib-imap/imap-parser.h Wed Jul 27 08:07:00 2005
--- dovecot-1.0-stable/src/lib-imap/imap-parser.h Mon Jan 31 17:37:55 2005
***************
*** 88,90 ****
need to do that. Returns number of arguments read (may be less than count
! in case of EOL), -2 if more data is needed or -1 if error occurred.
--- 88,90 ----
need to do that. Returns number of arguments read (may be less than count
! in case of EOL), -2 if more data is needed or -1 if error occured.
diff -r -c1 dovecot-1.0-stable-patched/src/lib-mail/message-parser.h dovecot-1.0-stable/src/lib-mail/message-parser.h
*** dovecot-1.0-stable-patched/src/lib-mail/message-parser.h Wed Jul 27 08:06:56 2005
--- dovecot-1.0-stable/src/lib-mail/message-parser.h Mon Jan 31 17:37:55 2005
***************
*** 112,114 ****
input stream is non-blocking and more data needs to be read, -1 when all is
! done or error occurred (see stream's error status). */
int message_parse_header_next(struct message_header_parser_ctx *ctx,
--- 112,114 ----
input stream is non-blocking and more data needs to be read, -1 when all is
! done or error occured (see stream's error status). */
int message_parse_header_next(struct message_header_parser_ctx *ctx,
diff -r -c1 dovecot-1.0-stable-patched/src/lib-sql/sql-api.h dovecot-1.0-stable/src/lib-sql/sql-api.h
*** dovecot-1.0-stable-patched/src/lib-sql/sql-api.h Wed Jul 27 08:06:51 2005
--- dovecot-1.0-stable/src/lib-sql/sql-api.h Mon Jan 31 17:37:55 2005
***************
*** 23,25 ****
/* Go to next row, returns 1 if ok, 0 if this was the last row or -1 if error
! occurred. This needs to be the first call for result. */
int sql_result_next_row(struct sql_result *result);
--- 23,25 ----
/* Go to next row, returns 1 if ok, 0 if this was the last row or -1 if error
! occured. This needs to be the first call for result. */
int sql_result_next_row(struct sql_result *result);
diff -r -c1 dovecot-1.0-stable-patched/src/lib-storage/index/maildir/maildir-sync.c dovecot-1.0-stable/src/lib-storage/index/maildir/maildir-sync.c
*** dovecot-1.0-stable-patched/src/lib-storage/index/maildir/maildir-sync.c Wed Jul 27 08:08:03 2005
--- dovecot-1.0-stable/src/lib-storage/index/maildir/maildir-sync.c Mon Jan 31 17:37:55 2005
***************
*** 7,9 ****
We want to be as efficient as we can. The most efficient way to
! check if changes have occurred is to stat() the new/ and cur/
directories and uidlist file - if their mtimes haven't changed,
--- 7,9 ----
We want to be as efficient as we can. The most efficient way to
! check if changes have occured is to stat() the new/ and cur/
directories and uidlist file - if their mtimes haven't changed,
***************
*** 14,16 ****
then make a modification. Such modifications wouldn't get noticed
! until a new modification occurred later.
--- 14,16 ----
then make a modification. Such modifications wouldn't get noticed
! until a new modification occured later.
diff -r -c1 dovecot-1.0-stable-patched/src/lib-storage/mail-storage.c dovecot-1.0-stable/src/lib-storage/mail-storage.c
*** dovecot-1.0-stable-patched/src/lib-storage/mail-storage.c Wed Jul 27 08:07:58 2005
--- dovecot-1.0-stable/src/lib-storage/mail-storage.c Mon Jan 31 17:37:55 2005
***************
*** 12,14 ****
#define CRITICAL_MSG \
! "Internal error occurred. Refer to server log for more information."
#define CRITICAL_MSG_STAMP CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
--- 12,14 ----
#define CRITICAL_MSG \
! "Internal error occured. Refer to server log for more information."
#define CRITICAL_MSG_STAMP CRITICAL_MSG " [%Y-%m-%d %H:%M:%S]"
diff -r -c1 dovecot-1.0-stable-patched/src/lib-storage/mail-storage.h dovecot-1.0-stable/src/lib-storage/mail-storage.h
*** dovecot-1.0-stable-patched/src/lib-storage/mail-storage.h Wed Jul 27 08:07:25 2005
--- dovecot-1.0-stable/src/lib-storage/mail-storage.h Mon Jan 31 17:37:55 2005
***************
*** 225,227 ****
/* Deinitialize mailbox list request. Returns FALSE if some error
! occurred while listing. */
int mail_storage_mailbox_list_deinit(struct mailbox_list_context *ctx);
--- 225,227 ----
/* Deinitialize mailbox list request. Returns FALSE if some error
! occured while listing. */
int mail_storage_mailbox_list_deinit(struct mailbox_list_context *ctx);
***************
*** 239,241 ****
! /* Returns the error message of last occurred error. */
const char *mail_storage_get_last_error(struct mail_storage *storage,
--- 239,241 ----
! /* Returns the error message of last occured error. */
const char *mail_storage_get_last_error(struct mail_storage *storage,
***************
*** 252,254 ****
const char *name, enum mailbox_open_flags flags);
! /* Close the box. Returns FALSE if some cleanup errors occurred, but
the mailbox was closed anyway. */
--- 252,254 ----
const char *name, enum mailbox_open_flags flags);
! /* Close the box. Returns FALSE if some cleanup errors occured, but
the mailbox was closed anyway. */
***************
*** 373,378 ****
/* Get the time message was received (IMAP INTERNALDATE).
! Returns (time_t)-1 if error occurred. */
time_t (*get_received_date)(struct mail *mail);
/* Get the Date-header in mail. Timezone is in minutes.
! Returns (time_t)-1 if error occurred, 0 if field wasn't found or
couldn't be parsed. */
--- 373,378 ----
/* Get the time message was received (IMAP INTERNALDATE).
! Returns (time_t)-1 if error occured. */
time_t (*get_received_date)(struct mail *mail);
/* Get the Date-header in mail. Timezone is in minutes.
! Returns (time_t)-1 if error occured, 0 if field wasn't found or
couldn't be parsed. */
***************
*** 380,385 ****
/* Get the full virtual size of mail (IMAP RFC822.SIZE).
! Returns (uoff_t)-1 if error occurred */
uoff_t (*get_virtual_size)(struct mail *mail);
/* Get the full physical size of mail.
! Returns (uoff_t)-1 if error occurred */
uoff_t (*get_physical_size)(struct mail *mail);
--- 380,385 ----
/* Get the full virtual size of mail (IMAP RFC822.SIZE).
! Returns (uoff_t)-1 if error occured */
uoff_t (*get_virtual_size)(struct mail *mail);
/* Get the full physical size of mail.
! Returns (uoff_t)-1 if error occured */
uoff_t (*get_physical_size)(struct mail *mail);
diff -r -c1 dovecot-1.0-stable-patched/src/lib-storage/subscription-file/subscription-file.h dovecot-1.0-stable/src/lib-storage/subscription-file/subscription-file.h
*** dovecot-1.0-stable-patched/src/lib-storage/subscription-file/subscription-file.h Wed Jul 27 08:08:08 2005
--- dovecot-1.0-stable/src/lib-storage/subscription-file/subscription-file.h Mon Jan 31 17:37:55 2005
***************
*** 9,11 ****
! /* Deinitialize subscription file listing. Returns FALSE if some error occurred
while listing. */
--- 9,11 ----
! /* Deinitialize subscription file listing. Returns FALSE if some error occured
while listing. */
diff -r -c1 dovecot-1.0-stable-patched/src/login-common/ssl-proxy-gnutls.c dovecot-1.0-stable/src/login-common/ssl-proxy-gnutls.c
*** dovecot-1.0-stable-patched/src/login-common/ssl-proxy-gnutls.c Wed Jul 27 08:08:22 2005
--- dovecot-1.0-stable/src/login-common/ssl-proxy-gnutls.c Mon Jan 31 17:37:55 2005
***************
*** 82,84 ****
if (verbose_ssl) {
! /* fatal error occurred */
if (error == GNUTLS_E_FATAL_ALERT_RECEIVED) {
--- 82,84 ----
if (verbose_ssl) {
! /* fatal error occured */
if (error == GNUTLS_E_FATAL_ALERT_RECEIVED) {
diff -r -c1 dovecot-1.0-stable-patched/src/login-common/ssl-proxy.h dovecot-1.0-stable/src/login-common/ssl-proxy.h
*** dovecot-1.0-stable-patched/src/login-common/ssl-proxy.h Wed Jul 27 08:08:14 2005
--- dovecot-1.0-stable/src/login-common/ssl-proxy.h Mon Jan 31 17:37:55 2005
***************
*** 9,11 ****
/* establish SSL connection with the given fd, returns a new fd which you
! must use from now on, or -1 if error occurred. Unless -1 is returned,
the given fd must be simply forgotten. */
--- 9,11 ----
/* establish SSL connection with the given fd, returns a new fd which you
! must use from now on, or -1 if error occured. Unless -1 is returned,
the given fd must be simply forgotten. */
More information about the dovecot
mailing list