diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c index 257841cf2a8200fa75a761f5879ff58719c31137..91d2e71b1696d7a2f0ff4d7eec114d7ad3209dee 100644 --- a/src/lib-sieve/plugins/vacation/cmd-vacation.c +++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c @@ -891,7 +891,7 @@ _msg_address_equals(const struct message_address *addr1, i_assert(addr1->mailbox != NULL); return (smtp_address_init_from_msg(&saddr, addr1) >= 0 && - smtp_address_equals(addr2, &saddr)); + smtp_address_equals_icase(addr2, &saddr)); } static inline bool @@ -1276,7 +1276,7 @@ act_vacation_commit(const struct sieve_action_exec_env *aenv, /* Are we perhaps trying to respond to ourselves ? */ - if (smtp_address_equals(sender, recipient)) { + if (smtp_address_equals_icase(sender, recipient)) { sieve_result_global_log( aenv, "discarded vacation reply to own address <%s>", smtp_address_encode(sender)); @@ -1290,7 +1290,7 @@ act_vacation_commit(const struct sieve_action_exec_env *aenv, alt_address = ctx->addresses; while (*alt_address != NULL) { - if (smtp_address_equals(sender, *alt_address)) { + if (smtp_address_equals_icase(sender, *alt_address)) { sieve_result_global_log( aenv, "discarded vacation reply to own address <%s> " diff --git a/tests/extensions/vacation/reply.svtest b/tests/extensions/vacation/reply.svtest index 49061beb78590ef78121a781ff4a531f1fe5cf43..55cc58d4fe2838d74e7905e3551791afbff51e48 100644 --- a/tests/extensions/vacation/reply.svtest +++ b/tests/extensions/vacation/reply.svtest @@ -396,6 +396,36 @@ test "Reply for :addresses" { } } +/* + * Reply for :addresses (case sensitivity) + */ + +test_result_reset; + +test_set "message" text: +From: timo@example.com +To: Stephan.Bosch@example.com +Subject: Frop! + +Frop! +. +; + +test_set "envelope.from" "timo@example.com"; +test_set "envelope.to" "stephan@example.com"; + +test "Reply for :addresses (case sensitivity)" { + vacation :addresses "stephan.bosch@example.com" "I am gone"; + + if not test_result_execute { + test_fail "failed to execute vacation"; + } + + if not test_message :smtp 0 { + test_fail "vacation did not reply"; + } +} + /* * Reply for original recipient */