dovecot-2.0: pop3: If mail storage couldn't be initialized, send...
dovecot at dovecot.org
dovecot at dovecot.org
Mon May 16 17:34:58 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/ac006833cd66
changeset: 12811:ac006833cd66
user: Timo Sirainen <tss at iki.fi>
date: Mon May 16 17:34:42 2011 +0300
description:
pop3: If mail storage couldn't be initialized, send -ERR to client before disconnecting.
diffstat:
src/pop3/main.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r f786d95dc5c0 -r ac006833cd66 src/pop3/main.c
--- a/src/pop3/main.c Mon May 16 17:29:40 2011 +0300
+++ b/src/pop3/main.c Mon May 16 17:34:42 2011 +0300
@@ -14,6 +14,7 @@
#include "master-login.h"
#include "master-interface.h"
#include "var-expand.h"
+#include "mail-error.h"
#include "mail-user.h"
#include "mail-storage-service.h"
@@ -88,14 +89,18 @@
int fd_in, int fd_out, const buffer_t *input_buf,
const char **error_r)
{
+ const char *lookup_error_str =
+ "-ERR [IN-USE] "MAIL_ERRSTR_CRITICAL_MSG"\r\n";
struct mail_storage_service_user *user;
struct mail_user *mail_user;
struct client *client;
const struct pop3_settings *set;
if (mail_storage_service_lookup_next(storage_service, input,
- &user, &mail_user, error_r) <= 0)
+ &user, &mail_user, error_r) <= 0) {
+ (void)write(fd_out, lookup_error_str, strlen(lookup_error_str));
return -1;
+ }
restrict_access_allow_coredumps(TRUE);
set = mail_storage_service_user_get_set(user)[1];
More information about the dovecot-cvs
mailing list