dovecot-2.2-pigeonhole: Changed behavior of redirect in case of ...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sun Mar 3 17:55:11 EET 2013
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/ab15c5eabc09
changeset: 1714:ab15c5eabc09
user: Stephan Bosch <stephan at rename-it.nl>
date: Sat Jan 26 08:52:27 2013 +0100
description:
Changed behavior of redirect in case of a duplicate message delivery or a mail loop.
If a duplicate is detected the implicit keep is canceled, as though the redirect was successful. This prevents getting local deliveries.
The original SMTP recipient is used when it is available to augment the entry in the LDA duplicate database. This way, duplicates are only detected when (initially) addressed to the same recipient.
The main goal of the duplicate detection is mail loop prevention, but this also has the effect that mere duplicate deliveries are handled specially whithout a good reason. We should fix this in a future version.
diffstat:
src/lib-sieve/cmd-redirect.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r fe5f2738d538 -r ab15c5eabc09 src/lib-sieve/cmd-redirect.c
--- a/src/lib-sieve/cmd-redirect.c Wed Dec 26 11:52:03 2012 +0100
+++ b/src/lib-sieve/cmd-redirect.c Sat Jan 26 08:52:27 2013 +0100
@@ -385,16 +385,18 @@
action->mail : sieve_message_get_mail(aenv->msgctx) );
const struct sieve_message_data *msgdata = aenv->msgdata;
const struct sieve_script_env *senv = aenv->scriptenv;
+ const char *orig_recipient = sieve_message_get_orig_recipient(aenv->msgctx);
const char *dupeid;
/* Prevent mail loops if possible */
- dupeid = msgdata->id == NULL ?
- NULL : t_strdup_printf("%s-%s", msgdata->id, ctx->to_address);
+ dupeid = msgdata->id == NULL ? NULL : t_strdup_printf
+ ("%s-%s-%s", msgdata->id, orig_recipient, ctx->to_address);
if (dupeid != NULL) {
/* Check whether we've seen this message before */
if (sieve_action_duplicate_check(senv, dupeid, strlen(dupeid))) {
sieve_result_global_log(aenv, "discarded duplicate forward to <%s>",
str_sanitize(ctx->to_address, 128));
+ *keep = FALSE;
return TRUE;
}
}
More information about the dovecot-cvs
mailing list