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

Enotify: previous change did not distinguish Cc recipients.

parent 877ba290
No related branches found
No related tags found
No related merge requests found
......@@ -214,8 +214,6 @@ static bool _uri_add_valid_recipient
(const struct sieve_enotify_log *nlog, ARRAY_TYPE(recipients) *recipients,
string_t *recipient, bool cc)
{
const struct ntfy_mailto_recipient *rcpts;
unsigned int count, i;
const char *error;
const char *normalized;
......@@ -228,13 +226,18 @@ static bool _uri_add_valid_recipient
/* Add recipient to the list */
if ( recipients != NULL ) {
pool_t pool;
struct ntfy_mailto_recipient *new_recipient;
struct ntfy_mailto_recipient *rcpts;
unsigned int count, i;
pool_t pool;
/* Check for duplicate first */
rcpts = array_get(recipients, &count);
rcpts = array_get_modifiable(recipients, &count);
for ( i = 0; i < count; i++ ) {
if ( strcmp(rcpts[i].normalized, normalized) == 0 ) {
/* Upgrade existing Cc: recipient to a To: recipient if possible */
rcpts[i].carbon_copy = ( rcpts[i].carbon_copy && cc );
sieve_enotify_warning(nlog,
"mailto URI: ignored duplicate recipient '%s'",
str_sanitize(str_c(recipient), 80));
......
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.