dovecot-2.0-pigeonhole: lib-sieve: added X-Sieve-Redirected-From...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Tue Aug 2 17:26:42 EEST 2011


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/81b37c0055c3
changeset: 1515:81b37c0055c3
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Aug 02 16:25:04 2011 +0200
description:
lib-sieve: added X-Sieve-Redirected-From header for people using SPF/SRS.

diffstat:

 src/lib-sieve/cmd-redirect.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 08bbe5872576 -r 81b37c0055c3 src/lib-sieve/cmd-redirect.c
--- a/src/lib-sieve/cmd-redirect.c	Tue Jul 05 20:32:28 2011 +0200
+++ b/src/lib-sieve/cmd-redirect.c	Tue Aug 02 16:25:04 2011 +0200
@@ -295,11 +295,13 @@
 static bool act_redirect_send	
 (const struct sieve_action_exec_env *aenv, struct act_redirect_context *ctx)
 {
-	static const char *hide_headers[] = { "Return-Path", "X-Sieve" };
+	static const char *hide_headers[] = 
+		{ "Return-Path", "X-Sieve", "X-Sieve-Redirected-From" };
 
 	const struct sieve_message_data *msgdata = aenv->msgdata;
 	const struct sieve_script_env *senv = aenv->scriptenv;
 	const char *sender = sieve_message_get_sender(aenv->msgctx);
+	const char *recipient = sieve_message_get_final_recipient(aenv->msgctx);
 	struct istream *input, *crlf_input;
 	void *smtp_handle;
 	FILE *f;
@@ -328,8 +330,9 @@
 	/* Make sure the message contains CRLF consistently */
 	crlf_input = i_stream_create_crlf(input);
 
-	/* Prepend sieve version header (should not affect signatures) */
+	/* Prepend sieve headers (should not affect signatures) */
 	rfc2822_header_field_write(f, "X-Sieve", SIEVE_IMPLEMENTATION);
+	rfc2822_header_field_write(f, "X-Sieve-Redirected-From", recipient);
 
 	/* Pipe the message to the outgoing SMTP transport */
 	while ((ret = i_stream_read_data(crlf_input, &data, &size, 0)) > 0) {	


More information about the dovecot-cvs mailing list