diff --git a/src/lib-sieve/cmp-i-ascii-casemap.c b/src/lib-sieve/cmp-i-ascii-casemap.c
index 6daddf50b48f9b948daca74f5548f1c321ff1b0f..ad25e0f22fa9e9573535255656b81a902a831dff 100644
--- a/src/lib-sieve/cmp-i-ascii-casemap.c
+++ b/src/lib-sieve/cmp-i-ascii-casemap.c
@@ -30,13 +30,16 @@ static bool cmp_i_ascii_casemap_char_match
  */
 
 const struct sieve_comparator_def i_ascii_casemap_comparator = {
-	SIEVE_OBJECT
-		("i;ascii-casemap", &comparator_operand, SIEVE_COMPARATOR_I_ASCII_CASEMAP),
-	SIEVE_COMPARATOR_FLAG_ORDERING | SIEVE_COMPARATOR_FLAG_EQUALITY |
-		SIEVE_COMPARATOR_FLAG_SUBSTRING_MATCH | SIEVE_COMPARATOR_FLAG_PREFIX_MATCH,
-	cmp_i_ascii_casemap_compare,
-	cmp_i_ascii_casemap_char_match,
-	sieve_comparator_octet_skip
+	SIEVE_OBJECT("i;ascii-casemap",
+		&comparator_operand, SIEVE_COMPARATOR_I_ASCII_CASEMAP),
+	.flags =
+		SIEVE_COMPARATOR_FLAG_ORDERING |
+		SIEVE_COMPARATOR_FLAG_EQUALITY |
+		SIEVE_COMPARATOR_FLAG_SUBSTRING_MATCH |
+		SIEVE_COMPARATOR_FLAG_PREFIX_MATCH,
+	.compare = cmp_i_ascii_casemap_compare,
+	.char_match = cmp_i_ascii_casemap_char_match,
+	.char_skip = sieve_comparator_octet_skip
 };
 
 /*
diff --git a/src/lib-sieve/cmp-i-octet.c b/src/lib-sieve/cmp-i-octet.c
index bbddcc1ec80801f7c1a9e18e660454ae6d710a7c..6c267e2d4edd317f7df51a443eb3f37e93b7a749 100644
--- a/src/lib-sieve/cmp-i-octet.c
+++ b/src/lib-sieve/cmp-i-octet.c
@@ -29,12 +29,16 @@ static bool cmp_i_octet_char_match
  */
 
 const struct sieve_comparator_def i_octet_comparator = {
-	SIEVE_OBJECT("i;octet",	&comparator_operand, SIEVE_COMPARATOR_I_OCTET),
-	SIEVE_COMPARATOR_FLAG_ORDERING | SIEVE_COMPARATOR_FLAG_EQUALITY |
-		SIEVE_COMPARATOR_FLAG_SUBSTRING_MATCH | SIEVE_COMPARATOR_FLAG_PREFIX_MATCH,
-	cmp_i_octet_compare,
-	cmp_i_octet_char_match,
-	sieve_comparator_octet_skip
+	SIEVE_OBJECT("i;octet",
+		&comparator_operand, SIEVE_COMPARATOR_I_OCTET),
+	.flags =
+		SIEVE_COMPARATOR_FLAG_ORDERING |
+		SIEVE_COMPARATOR_FLAG_EQUALITY |
+		SIEVE_COMPARATOR_FLAG_SUBSTRING_MATCH |
+		SIEVE_COMPARATOR_FLAG_PREFIX_MATCH,
+	.compare = cmp_i_octet_compare,
+	.char_match = cmp_i_octet_char_match,
+	.char_skip = sieve_comparator_octet_skip
 };
 
 /*
diff --git a/src/lib-sieve/mcht-contains.c b/src/lib-sieve/mcht-contains.c
index f07bba180dca0237c656cb4abb8ccd68a5e17084..d68e4409756bb5c56ea31176cb9efa2bb72c52ac 100644
--- a/src/lib-sieve/mcht-contains.c
+++ b/src/lib-sieve/mcht-contains.c
@@ -26,12 +26,10 @@ static int mcht_contains_match_key
  */
 
 const struct sieve_match_type_def contains_match_type = {
-	SIEVE_OBJECT("contains", &match_type_operand,	SIEVE_MATCH_TYPE_CONTAINS),
-	NULL,
-	sieve_match_substring_validate_context,
-	NULL, NULL, NULL,
-	mcht_contains_match_key,
-	NULL
+	SIEVE_OBJECT("contains",
+		&match_type_operand, SIEVE_MATCH_TYPE_CONTAINS),
+	.validate_context = sieve_match_substring_validate_context,
+	.match_key = mcht_contains_match_key
 };
 
 /*
diff --git a/src/lib-sieve/mcht-is.c b/src/lib-sieve/mcht-is.c
index 0ead3a66ef67be9ae668e602c3d08b36d8febfaf..a637790b86c60ff593df2140ddb808ec5970a4a4 100644
--- a/src/lib-sieve/mcht-is.c
+++ b/src/lib-sieve/mcht-is.c
@@ -26,10 +26,9 @@ static int mcht_is_match_key
  */
 
 const struct sieve_match_type_def is_match_type = {
-	SIEVE_OBJECT("is", &match_type_operand, SIEVE_MATCH_TYPE_IS),
-	NULL, NULL, NULL, NULL, NULL,
-	mcht_is_match_key,
-	NULL
+	SIEVE_OBJECT("is",
+		&match_type_operand, SIEVE_MATCH_TYPE_IS),
+	.match_key = mcht_is_match_key
 };
 
 /*
diff --git a/src/lib-sieve/mcht-matches.c b/src/lib-sieve/mcht-matches.c
index b1d6ec041495ac1022afb9e06492b563ec47efa9..02ce2a83328a7de9b28c7aadee8d03144f2ddac4 100644
--- a/src/lib-sieve/mcht-matches.c
+++ b/src/lib-sieve/mcht-matches.c
@@ -27,12 +27,10 @@ static int mcht_matches_match_key
  */
 
 const struct sieve_match_type_def matches_match_type = {
-	SIEVE_OBJECT("matches", &match_type_operand, SIEVE_MATCH_TYPE_MATCHES),
-	NULL,
-	sieve_match_substring_validate_context,
-	NULL, NULL, NULL,
-	mcht_matches_match_key,
-	NULL
+	SIEVE_OBJECT("matches",
+		&match_type_operand, SIEVE_MATCH_TYPE_MATCHES),
+	.validate_context = sieve_match_substring_validate_context,
+	.match_key = mcht_matches_match_key
 };
 
 /*
diff --git a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
index 0eb91bf39236cad3dc3bd5c6ff4bdc1455654795..2393f750e92b4bc590d94144b213010dd62316e2 100644
--- a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
+++ b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
@@ -77,11 +77,12 @@ static int cmp_i_ascii_numeric_compare
 /* Comparator object */
 
 const struct sieve_comparator_def i_ascii_numeric_comparator = {
-	SIEVE_OBJECT("i;ascii-numeric", &my_comparator_operand, 0),
-	SIEVE_COMPARATOR_FLAG_ORDERING | SIEVE_COMPARATOR_FLAG_EQUALITY,
-	cmp_i_ascii_numeric_compare,
-	NULL,
-	NULL
+	SIEVE_OBJECT("i;ascii-numeric",
+		&my_comparator_operand, 0),
+	.flags =
+		SIEVE_COMPARATOR_FLAG_ORDERING |
+		SIEVE_COMPARATOR_FLAG_EQUALITY,
+	.compare = cmp_i_ascii_numeric_compare
 };
 
 /* Comparator implementation */
diff --git a/src/lib-sieve/plugins/copy/ext-copy.c b/src/lib-sieve/plugins/copy/ext-copy.c
index 3ab85b0e22c3756bc2fa1df0400dee02d5377567..49a5186c78251b4c5cef289767ebb7078feff801 100644
--- a/src/lib-sieve/plugins/copy/ext-copy.c
+++ b/src/lib-sieve/plugins/copy/ext-copy.c
@@ -72,12 +72,9 @@ static void seff_copy_post_commit
 
 const struct sieve_side_effect_def copy_side_effect = {
 	SIEVE_OBJECT("copy", &copy_side_effect_operand, 0),
-	&act_store,
-	NULL, NULL, NULL,
-	seff_copy_print,
-	NULL, NULL,
-	seff_copy_post_commit,
-	NULL
+	.to_action = &act_store,
+	.print = seff_copy_print,
+	.post_commit = seff_copy_post_commit
 };
 
 /*
diff --git a/src/lib-sieve/plugins/include/ext-include-variables.c b/src/lib-sieve/plugins/include/ext-include-variables.c
index 00b10dae788aac47bddb27ec37ce9a01ee0e32c3..cadd378dc9375cc18e6b492c36ef42b9d9bb6ed2 100644
--- a/src/lib-sieve/plugins/include/ext-include-variables.c
+++ b/src/lib-sieve/plugins/include/ext-include-variables.c
@@ -160,14 +160,13 @@ bool vnspc_global_variables_generate
 		const struct sieve_variables_namespace *nspc,
 		struct sieve_ast_argument *arg, struct sieve_command *cmd, void *var_data);
 
-static const struct sieve_variables_namespace_def global_variables_namespace = {
+static const struct sieve_variables_namespace_def
+global_variables_namespace = {
 	SIEVE_OBJECT("global", NULL, 0),
-	vnspc_global_variables_validate,
-	vnspc_global_variables_generate,
-	NULL, NULL
+	.validate = vnspc_global_variables_validate,
+	.generate = vnspc_global_variables_generate
 };
 
-
 bool vnspc_global_variables_validate
 (struct sieve_validator *valdtr,
 	const struct sieve_variables_namespace *nspc, struct sieve_ast_argument *arg,
diff --git a/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c b/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
index bb0406dfacc7aa6498ddc5ac784aa0ed2e25be51..cea99cdd16da65958d1b2eb5c676ca3f8b6ac71b 100644
--- a/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
+++ b/src/lib-sieve/plugins/mailbox/tag-mailbox-create.c
@@ -46,11 +46,9 @@ static int seff_mailbox_create_pre_execute
 
 const struct sieve_side_effect_def mailbox_create_side_effect = {
 	SIEVE_OBJECT("create", &mailbox_create_operand, 0),
-	&act_store,
-	NULL, NULL, NULL,
-	seff_mailbox_create_print,
-	seff_mailbox_create_pre_execute,
-	NULL, NULL, NULL
+	.to_action = &act_store,
+	.print = seff_mailbox_create_print,
+	.pre_execute = seff_mailbox_create_pre_execute
 };
 
 /*
diff --git a/src/lib-sieve/plugins/regex/mcht-regex.c b/src/lib-sieve/plugins/regex/mcht-regex.c
index afca7a303dd81a2b10b8af1d343e23e089a598be..82a3011b0d6adbb9b7223f872ca321a6c3301d96 100644
--- a/src/lib-sieve/plugins/regex/mcht-regex.c
+++ b/src/lib-sieve/plugins/regex/mcht-regex.c
@@ -50,13 +50,10 @@ static void mcht_regex_match_deinit(struct sieve_match_context *mctx);
 
 const struct sieve_match_type_def regex_match_type = {
 	SIEVE_OBJECT("regex", &regex_match_type_operand, 0),
-	NULL,
-	mcht_regex_validate_context,
-	NULL,
-	mcht_regex_match_init,
-	mcht_regex_match_keys,
-	NULL,
-	mcht_regex_match_deinit
+	.validate_context = mcht_regex_validate_context,
+	.match_init = mcht_regex_match_init,
+	.match_keys = mcht_regex_match_keys,
+	.match_deinit = mcht_regex_match_deinit
 };
 
 /*
diff --git a/src/lib-sieve/plugins/relational/mcht-count.c b/src/lib-sieve/plugins/relational/mcht-count.c
index 3554aefe91dee11076e7abdd8643fbc7bf24796a..b35f3fd847b3308a45396d815703ad44e0db6d95 100644
--- a/src/lib-sieve/plugins/relational/mcht-count.c
+++ b/src/lib-sieve/plugins/relational/mcht-count.c
@@ -37,19 +37,17 @@ static int mcht_count_match
  */
 
 const struct sieve_match_type_def count_match_type = {
-	SIEVE_OBJECT("count", &rel_match_type_operand, RELATIONAL_COUNT),
-	mcht_relational_validate,
-	NULL, NULL, NULL, NULL, NULL, NULL
+	SIEVE_OBJECT("count",
+		&rel_match_type_operand, RELATIONAL_COUNT),
+	.validate = mcht_relational_validate
 };
 
 #define COUNT_MATCH_TYPE(name, rel_match)                      \
 const struct sieve_match_type_def rel_match_count_ ## name = { \
-	SIEVE_OBJECT(                                                \
-		"count-" #name, &rel_match_type_operand,                   \
+	SIEVE_OBJECT("count-" #name,                                 \
+    &rel_match_type_operand,                                   \
 		REL_MATCH_INDEX(RELATIONAL_COUNT, rel_match)),             \
-	NULL, NULL,                                                  \
-	mcht_count_match,                                            \
-	NULL, NULL, NULL, NULL                                       \
+	.match = mcht_count_match,                                   \
 }
 
 COUNT_MATCH_TYPE(gt, REL_MATCH_GREATER);
diff --git a/src/lib-sieve/plugins/relational/mcht-value.c b/src/lib-sieve/plugins/relational/mcht-value.c
index 5ecf79eca9c1bdfe02b003651c453f67899c2594..e89e6d3fee74c0dafbc68be4e4513e22237d1c42 100644
--- a/src/lib-sieve/plugins/relational/mcht-value.c
+++ b/src/lib-sieve/plugins/relational/mcht-value.c
@@ -24,19 +24,17 @@
  */
 
 const struct sieve_match_type_def value_match_type = {
-	SIEVE_OBJECT("value", &rel_match_type_operand, RELATIONAL_VALUE),
-	mcht_relational_validate,
-	NULL, NULL, NULL, NULL, NULL, NULL
+	SIEVE_OBJECT("value",
+		&rel_match_type_operand, RELATIONAL_VALUE),
+	.validate = mcht_relational_validate
 };
 
 #define VALUE_MATCH_TYPE(name, rel_match)                       \
 const struct sieve_match_type_def rel_match_value_ ## name = {  \
-	SIEVE_OBJECT(                                                 \
-		"value-" #name, &rel_match_type_operand,                    \
+	SIEVE_OBJECT("value-" #name,                                  \
+		&rel_match_type_operand,                                    \
 		REL_MATCH_INDEX(RELATIONAL_VALUE, rel_match)),              \
-	NULL, NULL, NULL, NULL, NULL,                                 \
-	mcht_value_match_key,                                         \
-	NULL                                                          \
+	.match_key = mcht_value_match_key,                            \
 }
 
 VALUE_MATCH_TYPE(gt, REL_MATCH_GREATER);
diff --git a/src/lib-sieve/plugins/subaddress/ext-subaddress.c b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
index 2b73e4d10477f5a8981b5f5f9f401487412b04ed..c0e4a1ad53f085217f60d58c42f9469a0c434925 100644
--- a/src/lib-sieve/plugins/subaddress/ext-subaddress.c
+++ b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
@@ -124,13 +124,15 @@ static const char *subaddress_detail_extract_from
 /* Address part objects */
 
 const struct sieve_address_part_def user_address_part = {
-	SIEVE_OBJECT("user", &subaddress_operand, SUBADDRESS_USER),
+	SIEVE_OBJECT("user",
+		&subaddress_operand, SUBADDRESS_USER),
 	subaddress_user_extract_from
 };
 
 const struct sieve_address_part_def detail_address_part = {
-	SIEVE_OBJECT("detail", &subaddress_operand, SUBADDRESS_DETAIL),
-	subaddress_detail_extract_from
+	SIEVE_OBJECT("detail",
+		&subaddress_operand, SUBADDRESS_DETAIL),
+	.extract_from = subaddress_detail_extract_from
 };
 
 /* Address part implementation */
diff --git a/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c b/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
index 5a32ae12896d07ae685ed51a89e162689160a50b..3ebba7cda3a79f7dba7e2240160455e554f80aa2 100644
--- a/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
+++ b/src/lib-sieve/plugins/vnd.dovecot/environment/ext-vnd-environment-variables.c
@@ -42,10 +42,10 @@ static int vnspc_vnd_environment_read_variable
 static const struct sieve_variables_namespace_def
 environment_namespace = {
 	SIEVE_OBJECT("env", &environment_namespace_operand, 0),
-	vnspc_vnd_environment_validate,
-	vnspc_vnd_environment_generate,
-	vnspc_vnd_environment_dump_variable,
-	vnspc_vnd_environment_read_variable
+	.validate = vnspc_vnd_environment_validate,
+	.generate = vnspc_vnd_environment_generate,
+	.dump_variable = vnspc_vnd_environment_dump_variable,
+	.read_variable = vnspc_vnd_environment_read_variable
 };
 
 static bool vnspc_vnd_environment_validate
diff --git a/src/lib-sieve/sieve-address-parts.c b/src/lib-sieve/sieve-address-parts.c
index 357d5e79a19eb05f8055a06c679b2e7108f7dea1..ef904ae9f6b988a5e33479d1559bb82cf42bd5b6 100644
--- a/src/lib-sieve/sieve-address-parts.c
+++ b/src/lib-sieve/sieve-address-parts.c
@@ -485,17 +485,20 @@ static const char *addrp_localpart_extract_from
 }
 
 const struct sieve_address_part_def all_address_part = {
-	SIEVE_OBJECT("all", &address_part_operand, SIEVE_ADDRESS_PART_ALL),
-	addrp_all_extract_from
+	SIEVE_OBJECT("all",
+		&address_part_operand, SIEVE_ADDRESS_PART_ALL),
+	.extract_from = addrp_all_extract_from
 };
 
 const struct sieve_address_part_def local_address_part = {
-	SIEVE_OBJECT("localpart", &address_part_operand, SIEVE_ADDRESS_PART_LOCAL),
-	addrp_localpart_extract_from
+	SIEVE_OBJECT("localpart",
+		&address_part_operand, SIEVE_ADDRESS_PART_LOCAL),
+	.extract_from = addrp_localpart_extract_from
 };
 
 const struct sieve_address_part_def domain_address_part = {
-	SIEVE_OBJECT("domain", &address_part_operand,	SIEVE_ADDRESS_PART_DOMAIN),
-	addrp_domain_extract_from
+	SIEVE_OBJECT("domain",
+		&address_part_operand,	SIEVE_ADDRESS_PART_DOMAIN),
+	.extract_from = addrp_domain_extract_from
 };
 
diff --git a/src/lib-sieve/sieve-objects.h b/src/lib-sieve/sieve-objects.h
index 863232d3f8b72989b7a97b60f1c16d6071a4f081..597d11caff3a74a241e083aa1e43e7442c152e50 100644
--- a/src/lib-sieve/sieve-objects.h
+++ b/src/lib-sieve/sieve-objects.h
@@ -14,8 +14,12 @@ struct sieve_object_def {
 	unsigned int code;
 };
 
-#define SIEVE_OBJECT(identifier, operand, code) \
-	{ identifier, operand, code }
+#define SIEVE_OBJECT(_identifier, _operand, _code) \
+	.obj_def = { \
+		.identifier = (_identifier), \
+		.operand = (_operand), \
+		.code = (_code) \
+	}
 
 /*
  * Object instance
diff --git a/src/testsuite/testsuite-objects.c b/src/testsuite/testsuite-objects.c
index 5f403418b516ddc6f444a430fa72a0983abfeb56..c30bfa6324c3c409429978aba68297869b74d586 100644
--- a/src/testsuite/testsuite-objects.c
+++ b/src/testsuite/testsuite-objects.c
@@ -287,18 +287,17 @@ static bool tsto_envelope_set_member
 	(const struct sieve_runtime_env *renv, int id, string_t *value);
 
 const struct testsuite_object_def message_testsuite_object = {
-	SIEVE_OBJECT("message",	&testsuite_object_operand, TESTSUITE_OBJECT_MESSAGE),
-	NULL, NULL,
-	tsto_message_set_member,
-	NULL
+	SIEVE_OBJECT("message",
+		&testsuite_object_operand, TESTSUITE_OBJECT_MESSAGE),
+	.set_member = tsto_message_set_member
 };
 
 const struct testsuite_object_def envelope_testsuite_object = {
-	SIEVE_OBJECT("envelope", &testsuite_object_operand, TESTSUITE_OBJECT_ENVELOPE),
-	tsto_envelope_get_member_id,
-	tsto_envelope_get_member_name,
-	tsto_envelope_set_member,
-	NULL
+	SIEVE_OBJECT("envelope",
+		&testsuite_object_operand, TESTSUITE_OBJECT_ENVELOPE),
+	.get_member_id = tsto_envelope_get_member_id,
+	.get_member_name = tsto_envelope_get_member_name,
+	.set_member = tsto_envelope_set_member
 };
 
 enum testsuite_object_envelope_field {
diff --git a/src/testsuite/testsuite-substitutions.c b/src/testsuite/testsuite-substitutions.c
index e3c768aeba044e5a1ab3032865796fa59c0d5eef..d5f49ddda196752f42d8b12241cab59c03941198 100644
--- a/src/testsuite/testsuite-substitutions.c
+++ b/src/testsuite/testsuite-substitutions.c
@@ -234,17 +234,16 @@ static int opr_substitution_read_value
 static bool testsuite_file_substitution_get_value
 	(const char *param, string_t **result);
 
-static const struct testsuite_substitution_def testsuite_file_substitution = {
-	SIEVE_OBJECT(
-		"file",
+static const struct testsuite_substitution_def
+testsuite_file_substitution = {
+	SIEVE_OBJECT("file",
 		&testsuite_substitution_operand,
-		TESTSUITE_SUBSTITUTION_FILE
-	),
-	testsuite_file_substitution_get_value
+		TESTSUITE_SUBSTITUTION_FILE),
+	.get_value = testsuite_file_substitution_get_value
 };
 
 static bool testsuite_file_substitution_get_value
-	(const char *param, string_t **result)
+(const char *param, string_t **result)
 {
 	*result = t_str_new(256);