Commit cbf6717f cbf6717f2b7fadc55b2787ca1fbb920404d3830d by Sergey Poznyakoff

Use X-Loop-Prevention header instead of X-Sender.

1 parent 1c319c45
...@@ -299,8 +299,8 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags) ...@@ -299,8 +299,8 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
299 299
300 /* rfc3028 says: 300 /* rfc3028 says:
301 "Implementations SHOULD take measures to implement loop control," 301 "Implementations SHOULD take measures to implement loop control,"
302 We do this by appending an "X-Sender" header to each message 302 We do this by appending an "X-Loop-Prevention" header to each message
303 being redirected. If one of the "X-Sender" headers of the message 303 being redirected. If one of the "X-Loop-Prevention" headers of the message
304 contains our email address, we assume it is a loop and bail out. */ 304 contains our email address, we assume it is a loop and bail out. */
305 305
306 static int 306 static int
...@@ -317,7 +317,7 @@ check_redirect_loop (message_t msg) ...@@ -317,7 +317,7 @@ check_redirect_loop (message_t msg)
317 for (i = 1; !loop && i <= num; i++) 317 for (i = 1; !loop && i <= num; i++)
318 { 318 {
319 header_get_field_name (hdr, i, buf, sizeof buf, NULL); 319 header_get_field_name (hdr, i, buf, sizeof buf, NULL);
320 if (strcasecmp (buf, "X-Sender") == 0) 320 if (strcasecmp (buf, "X-Loop-Prevention") == 0)
321 { 321 {
322 size_t j, cnt = 0; 322 size_t j, cnt = 0;
323 address_t addr; 323 address_t addr;
...@@ -414,7 +414,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags) ...@@ -414,7 +414,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
414 p = mu_get_user_email (NULL); 414 p = mu_get_user_email (NULL);
415 if (p) 415 if (p)
416 { 416 {
417 header_set_value (hdr, "X-Sender", p, 0); 417 header_set_value (hdr, "X-Loop-Prevention", p, 0);
418 free (p); 418 free (p);
419 } 419 }
420 else 420 else
......