diff --git a/doc/vacation.txt b/doc/vacation.txt
index e1435711411a115310d271483787c43baacf2c5f..50ba37bc4d4b848cf64eb1ff8d1f35566b1850f9 100644
--- a/doc/vacation.txt
+++ b/doc/vacation.txt
@@ -8,15 +8,20 @@ The following settings can be configured for using the vacation extension:
 sieve_vacation_min_period = 1d
   This specifies the minimum period that can be specified for the :days tag
   of the vacation command. Values are specified in s(econds), unless followed
-  by a d(ay), h(our), m(inute) specifier character. 
+  by a d(ay), h(our) or m(inute) specifier character. 
 
 sieve_vacation_max_period = 0
   This specifies the minimum period that can be specified for the :days tag
   of the vacation command. Values are specified in s(econds), unless followed
-  by a d(ay), h(our), m(inute) specifier character. The configured value
+  by a d(ay), h(our) or m(inute) specifier character. The configured value
   must be larger than the sieve_vacation_min_period setting. A value of 0
   has a special meaning: it indicates that there is no upper limit. 
 
+sieve_vacation_default_period = 7d
+	This specifies the default period that can be specified for the :days tag
+  of the vacation command. Values are specified in s(econds), unless followed
+  by a d(ay), h(our) or m(inute) specifier character.
+
 Example
 =======
 
@@ -26,6 +31,9 @@ plugin {
   # One minute at minimum
   sieve_vacation_min_period = 1m
 
+  # Ten days default
+  sieve_vacation_min_period = 10d
+
   # Thirty days at maximum
   sieve_vacation_max_period = 30d
 }
diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c
index 195ebf6e2a6c434595707796614eedc10ae74f80..00beee4b026caba75340743ea0e30d0807867838 100644
--- a/src/lib-sieve/plugins/vacation/cmd-vacation.c
+++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c
@@ -554,11 +554,13 @@ static int ext_vacation_operation_execute
 (const struct sieve_runtime_env *renv, sieve_size_t *address)
 {	
 	const struct sieve_extension *this_ext = renv->oprtn->ext;
+	const struct ext_vacation_config *config =
+		(const struct ext_vacation_config *) this_ext->context;
 	struct sieve_side_effects_list *slist = NULL;
 	struct act_vacation_context *act;
 	pool_t pool;
 	int opt_code = 0;
-	sieve_number_t seconds = EXT_VACATION_DEFAULT_PERIOD;
+	sieve_number_t seconds = config->default_period;
 	bool mime = FALSE;
 	struct sieve_stringlist *addresses = NULL;
 	string_t *reason, *subject = NULL, *from = NULL, *handle = NULL; 
@@ -1132,8 +1134,10 @@ static bool act_vacation_commit
 
 		/* Check period limits once more */
 		seconds = ctx->seconds;
-		if ( seconds < config->min_period ) seconds = config->min_period;
-		if ( seconds > config->max_period ) seconds = config->max_period;
+		if ( seconds < config->min_period ) 
+			seconds = config->min_period;
+		else if ( config->max_period > 0 && seconds > config->max_period )
+			seconds = config->max_period;
 
 		/* Mark as replied */
 		sieve_action_duplicate_mark
diff --git a/src/lib-sieve/plugins/vacation/ext-vacation-common.c b/src/lib-sieve/plugins/vacation/ext-vacation-common.c
index ab2ae71f38d79fa7f613c85b55e8dc65117be510..52e8377261705c5b319d641fb50976fc9c735cd1 100644
--- a/src/lib-sieve/plugins/vacation/ext-vacation-common.c
+++ b/src/lib-sieve/plugins/vacation/ext-vacation-common.c
@@ -10,7 +10,7 @@ bool ext_vacation_load
 {
 	struct sieve_instance *svinst = ext->svinst;
 	struct ext_vacation_config *config;
-	sieve_number_t min_period, max_period;
+	sieve_number_t min_period, max_period, default_period;
 
 	if ( *context != NULL ) {
 		ext_vacation_unload(ext);
@@ -26,18 +26,28 @@ bool ext_vacation_load
 		max_period = EXT_VACATION_DEFAULT_MAX_PERIOD;
 	}
 
-	if ( max_period > 0 && max_period < min_period ) {
+	if ( !sieve_setting_get_duration_value
+		(svinst, "sieve_vacation_default_period", &default_period) ) {
+		default_period = EXT_VACATION_DEFAULT_PERIOD;
+	}
+
+	if ( max_period > 0 
+		&& (min_period > max_period || default_period < min_period
+			|| default_period > max_period) ) {
 		min_period = EXT_VACATION_DEFAULT_MIN_PERIOD;
 		max_period = EXT_VACATION_DEFAULT_MAX_PERIOD;
+		default_period = EXT_VACATION_DEFAULT_PERIOD;
 
 		sieve_sys_warning(svinst,
-			"vacation extension: invalid settings: "
-			"sieve_vacation_min_period > sieve_vacation_max_period");
+			"vacation extension: invalid settings: violated "
+			"sieve_vacation_min_period < sieve_vacation_default_period < "
+			"sieve_vacation_max_period");
 	}
 	
 	config = i_new(struct ext_vacation_config, 1);
 	config->min_period = min_period;
 	config->max_period = max_period;
+	config->default_period = default_period;
 
 	*context = (void *) config;
 
diff --git a/src/lib-sieve/plugins/vacation/ext-vacation-common.h b/src/lib-sieve/plugins/vacation/ext-vacation-common.h
index ad232a215d08fcc403e4ed9d1c5255edab5e877f..512858d31b250c499a7cdcfb0397fce617b4dfab 100644
--- a/src/lib-sieve/plugins/vacation/ext-vacation-common.h
+++ b/src/lib-sieve/plugins/vacation/ext-vacation-common.h
@@ -17,6 +17,7 @@
 struct ext_vacation_config {
 	unsigned int min_period;
 	unsigned int max_period;
+	unsigned int default_period;
 };
 
 /* 
@@ -31,7 +32,9 @@ extern const struct sieve_command_def vacation_command;
 
 extern const struct sieve_operation_def vacation_operation;
 
-/* Extension */
+/* 
+ * Extension 
+ */
 
 extern const struct sieve_extension_def vacation_extension;