Skip to content

Commit

Permalink
Merge pull request #4919 from cyrusimap/mailbox_messages_over_quota
Browse files Browse the repository at this point in the history
mailbox.c: use the correct error code for over message quota
  • Loading branch information
ksmurchison committed May 15, 2024
2 parents cfe4c2c + 3d0f00b commit 930fcd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cassandane/Cassandane/Cyrus/MaxMessages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ sub test_maxmsg_email_limited
};
my $e = $@;
$self->assert_not_null($e);
$self->assert_matches(qr{over.*quota}, $e);
$self->assert_matches(qr{Over quota}, $e);

# should have syslogged about it too
$self->assert_syslog_matches($self->{instance},
Expand Down
6 changes: 3 additions & 3 deletions imap/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -4596,7 +4596,7 @@ EXPORTED int mailbox_append_index_record(struct mailbox *mailbox,
xsyslog(LOG_ERR, "IOERROR: client hit per-addressbook exists limit",
"mailbox=<%s>",
mailbox_name(mailbox));
return IMAP_NO_OVERQUOTA;
return IMAP_QUOTA_EXCEEDED;
}
}
else if (mbtype_isa(mailbox_mbtype(mailbox)) == MBTYPE_CALENDAR) {
Expand All @@ -4605,7 +4605,7 @@ EXPORTED int mailbox_append_index_record(struct mailbox *mailbox,
xsyslog(LOG_ERR, "IOERROR: client hit per-calendar exists limit",
"mailbox=<%s>",
mailbox_name(mailbox));
return IMAP_NO_OVERQUOTA;
return IMAP_QUOTA_EXCEEDED;
}
}
else if (mbtype_isa(mailbox_mbtype(mailbox)) == MBTYPE_EMAIL) {
Expand All @@ -4614,7 +4614,7 @@ EXPORTED int mailbox_append_index_record(struct mailbox *mailbox,
xsyslog(LOG_ERR, "IOERROR: client hit per-mailbox exists limit",
"mailbox=<%s>",
mailbox_name(mailbox));
return IMAP_NO_OVERQUOTA;
return IMAP_QUOTA_EXCEEDED;
}
}
else {
Expand Down

0 comments on commit 930fcd9

Please sign in to comment.