You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a bug in imap/lmtpengine.c, function process_recipient:
verify_user returns the correct error code as we can see with LOG_DEBUG
"on":
Nov 2 14:10:50 popc lmtp[2092]: verify_user(test@sendmaid.org) failed:
Over quota
but this return code is not used in process_recipient
There we have:
[...]
if (sl) {
char *rcpt = xstrndup(addr, sl);
mbname = mbname_from_recipient(rcpt, msg->ns);
free(rcpt);
int forcedowncase = config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);
if (forcedowncase) mbname_downcaseuser(mbname);
/* strip username if postuser */
if (!strcmpsafe(mbname_localpart(mbname),
config_getstring(IMAPOPT_POSTUSER))) {
mbname_set_localpart(mbname, NULL);
if (!config_virtdomains ||
!strcmpsafe(mbname_domain(mbname), config_defdomain))
mbname_set_domain(mbname, NULL);
}
if (verify_user(mbname,
(quota_t) (ignorequota ? -1 : msg->size),
ignorequota ? -1 : 1, msg->authstate)) {
mbname_free(&mbname);
}
}
if (!mbname) {
const char *catchall =
config_getstring(IMAPOPT_LMTP_CATCHALL_MAILBOX);
if (catchall) {
mbname = mbname_from_userid(catchall);
if (verify_user(mbname,
ignorequota ? -1 : msg->size,
ignorequota ? -1 : 1, msg->authstate)) {
mbname_free(&mbname);
}
}
}
if (!mbname) {
/* we lost */
return IMAP_MAILBOX_NONEXISTENT;
}
[...]
means as far as I understand: if verify_user returns its error (for
example IMAP_QUOTA_EXCEEDED), mbname is freed and process_recipient
always returns IMAP_MAILBOX_NONEXISTENT.
Below is a patch that works for me. But I don't know if this is a good
way to fix it.
Hopefully one of the developers helps :)
Hello,
i'm using compiled cyrus version 3.0.4 on Debian 9.2.
When the Postfix server is trying to deliver a message via lmtp to
cyrus mailbox which is over quota, it receives the 550-Mailbox unknown
return code and not the 452 or 552 Over quota.
In the previous version 2.5.10 it worked fine with default values in
imapd.conf
Is it a bug or my fault?
Thanks
Maros Vegh
The text was updated successfully, but these errors were encountered:
@elliefm@brong Any chance of a new point release with this in it, before year end? We have a few Cyrus 2.5.X to 3.0.X upgrades planned for the holidays, but proper over-quota response is critical to these clients. A new 3.0.5 release would be greatly appreciated.
The text was updated successfully, but these errors were encountered: