Skip to content
Snippets Groups Projects
Commit 12b28e57 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Made attempt to store in a namespace prefix fall back into INBOX.

parent e4c6a900
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ static void act_store_get_storage_error ...@@ -186,7 +186,7 @@ static void act_store_get_storage_error
} }
static struct mailbox *act_store_mailbox_open static struct mailbox *act_store_mailbox_open
(const struct sieve_action_exec_env *aenv, const char *folder, (const struct sieve_action_exec_env *aenv, const char *name,
struct mail_namespace **ns_r) struct mail_namespace **ns_r)
{ {
struct mail_storage **storage = &(aenv->exec_status->last_storage); struct mail_storage **storage = &(aenv->exec_status->last_storage);
...@@ -195,6 +195,7 @@ static struct mailbox *act_store_mailbox_open ...@@ -195,6 +195,7 @@ static struct mailbox *act_store_mailbox_open
MAILBOX_FLAG_POST_SESSION; MAILBOX_FLAG_POST_SESSION;
struct mailbox *box; struct mailbox *box;
enum mail_error error; enum mail_error error;
const char *folder = name;
if (strcasecmp(folder, "INBOX") == 0) { if (strcasecmp(folder, "INBOX") == 0) {
/* Deliveries to INBOX must always succeed, regardless of ACLs */ /* Deliveries to INBOX must always succeed, regardless of ACLs */
...@@ -212,6 +213,13 @@ static struct mailbox *act_store_mailbox_open ...@@ -212,6 +213,13 @@ static struct mailbox *act_store_mailbox_open
* deliver to the INBOX instead * deliver to the INBOX instead
*/ */
folder = "INBOX"; folder = "INBOX";
flags |= MAILBOX_FLAG_IGNORE_ACLS;
*ns_r = mail_namespace_find(aenv->scriptenv->namespaces, &folder);
if ( *ns_r == NULL) {
*storage = NULL;
return NULL;
}
} }
/* First attempt at opening the box */ /* First attempt at opening the box */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.