Disallow setting this setting to 0. Make the relevant checks against
"unlimited" instead.
struct smtp_server_cmd_ctx *cmd ATTR_UNUSED,
struct smtp_server_cmd_mail *data ATTR_UNUSED)
{
- if (client->lmtp_set->lmtp_user_concurrency_limit > 0) {
+ if (client->lmtp_set->lmtp_user_concurrency_limit < SET_UINT_UNLIMITED) {
/* Connect to anvil before dropping privileges */
lmtp_anvil_init();
}
rcpt, SMTP_SERVER_RECIPIENT_HOOK_APPROVED,
lmtp_local_rcpt_approved, llrcpt);
- if (client->lmtp_set->lmtp_user_concurrency_limit == 0) {
+ if (client->lmtp_set->lmtp_user_concurrency_limit == SET_UINT_UNLIMITED) {
(void)lmtp_local_rcpt_anvil_finish(llrcpt);
} else {
/* NOTE: username may change as the result of the userdb
set->lmtp_hdr_delivery_address);
return FALSE;
}
+
+ if (set->lmtp_user_concurrency_limit == 0) {
+ *error_r = "lmtp_user_concurrency_limit must not be 0 "
+ "(did you mean \"unlimited\"?)";
+ return FALSE;
+ }
+
return TRUE;
}
/* </settings checks> */