diff --git a/src/managesieve/managesieve-settings.c b/src/managesieve/managesieve-settings.c
index 1d9c8f0860b519211b2ba32c49427f58638785fb..6b2aef59adf99c23b56b0b0489c06cd3e5d15541 100644
--- a/src/managesieve/managesieve-settings.c
+++ b/src/managesieve/managesieve-settings.c
@@ -68,7 +68,7 @@ static struct setting_define managesieve_setting_defines[] = {
 	DEF(SET_BOOL, verbose_proctitle),
 	DEF(SET_STR_VARS, rawlog_dir),
 
-	DEF(SET_UINT, managesieve_max_line_length),
+	DEF(SET_SIZE, managesieve_max_line_length),
 	DEF(SET_STR, managesieve_implementation_string),
 	DEF(SET_STR, managesieve_client_workarounds),
 	DEF(SET_STR, managesieve_logout_format),
diff --git a/src/managesieve/managesieve-settings.h b/src/managesieve/managesieve-settings.h
index 194984557b1880ce371051f091d899bb024ce6b8..a72338b90e6ea1e405a4e02de46f7c19d02c7dd2 100644
--- a/src/managesieve/managesieve-settings.h
+++ b/src/managesieve/managesieve-settings.h
@@ -15,7 +15,7 @@ struct managesieve_settings {
 	const char *rawlog_dir;
 
 	/* managesieve: */
-	unsigned int managesieve_max_line_length;
+	uoff_t managesieve_max_line_length;
 	const char *managesieve_implementation_string;
 	const char *managesieve_client_workarounds;
 	const char *managesieve_logout_format;