diff --git a/mail/inc/class.mail_sieve.inc.php b/mail/inc/class.mail_sieve.inc.php
index bb2db674b4..e37f5932a2 100644
--- a/mail/inc/class.mail_sieve.inc.php
+++ b/mail/inc/class.mail_sieve.inc.php
@@ -690,7 +690,7 @@ class mail_sieve
$this->errorStack['days'] = lang('Please select the number of days to wait between responses').'!';
}
- if(is_array($_vacation['addresses']))
+ if(is_array($_vacation['addresses']) && !empty($_vacation['addresses']))
{
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
foreach ($_vacation['addresses'] as $addr)
diff --git a/mail/templates/default/sieve.vacation.xet b/mail/templates/default/sieve.vacation.xet
index bc0f6dfd77..c93ee61465 100644
--- a/mail/templates/default/sieve.vacation.xet
+++ b/mail/templates/default/sieve.vacation.xet
@@ -25,7 +25,7 @@
-
+
@@ -40,7 +40,7 @@
-
+
@@ -54,7 +54,7 @@
-
+