diff --git a/src/lib-sieve/ext-encoded-character.c b/src/lib-sieve/ext-encoded-character.c
index 8d51e121f16114d726fc9c68f277623c9a0a0930..4981e242de552e95c8f7471e06b93cdfb00bcf58 100644
--- a/src/lib-sieve/ext-encoded-character.c
+++ b/src/lib-sieve/ext-encoded-character.c
@@ -28,12 +28,8 @@ static bool ext_encoded_character_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 struct sieve_extension_def encoded_character_extension = {
-	"encoded-character",
-	NULL, NULL,
-	ext_encoded_character_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "encoded-character",
+	.validator_load = ext_encoded_character_validator_load,
 };
 
 /*
diff --git a/src/lib-sieve/ext-envelope.c b/src/lib-sieve/ext-envelope.c
index 7a6f054afa4e7d9ae879d26d086b0ca2830c4f38..9a074510e56e9867c3d054163029fe1379a17508 100644
--- a/src/lib-sieve/ext-envelope.c
+++ b/src/lib-sieve/ext-envelope.c
@@ -48,12 +48,9 @@ static bool ext_envelope_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def envelope_extension = {
-	"envelope",
-	NULL, NULL,
-	ext_envelope_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(envelope_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "envelope",
+	.validator_load = ext_envelope_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(envelope_operation)
 };
 
 static bool ext_envelope_validator_load
diff --git a/src/lib-sieve/ext-fileinto.c b/src/lib-sieve/ext-fileinto.c
index 98e2a5684095a0d5d1df19f4026bd2f7fd77c95b..e5265e376ffbe229d512a1e73a83f7384f2ea8fe 100644
--- a/src/lib-sieve/ext-fileinto.c
+++ b/src/lib-sieve/ext-fileinto.c
@@ -44,12 +44,9 @@ static bool ext_fileinto_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def fileinto_extension = {
-	"fileinto",
-	NULL, NULL,
-	ext_fileinto_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(fileinto_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "fileinto",
+	.validator_load = ext_fileinto_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(fileinto_operation)
 };
 
 static bool ext_fileinto_validator_load
diff --git a/src/lib-sieve/ext-reject.c b/src/lib-sieve/ext-reject.c
index c6332f2b73a0fdcd4b5544ca63347133fbce4837..432e6a3984a1b5342c8de70c7a59a103066fa80b 100644
--- a/src/lib-sieve/ext-reject.c
+++ b/src/lib-sieve/ext-reject.c
@@ -56,12 +56,9 @@ static bool ext_reject_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def reject_extension = {
-	"reject",
-	NULL, NULL,
-	ext_reject_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(reject_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "reject",
+	.validator_load =	ext_reject_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(reject_operation)
 };
 
 static bool ext_reject_validator_load
@@ -79,12 +76,9 @@ static bool ext_ereject_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def ereject_extension = {
-	"ereject",
-	NULL, NULL,
-	ext_ereject_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(ereject_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "ereject",
+	.validator_load = ext_ereject_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(ereject_operation)
 };
 
 static bool ext_ereject_validator_load
diff --git a/src/lib-sieve/plugins/body/ext-body.c b/src/lib-sieve/plugins/body/ext-body.c
index 61946c1b22103a601ebee6a7d259565cd125ac65..4ca6997fed982a18587723d698d791b79c0ea6fa 100644
--- a/src/lib-sieve/plugins/body/ext-body.c
+++ b/src/lib-sieve/plugins/body/ext-body.c
@@ -53,12 +53,9 @@ static bool ext_body_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def body_extension = {
-	"body",
-	NULL, NULL,
-	ext_body_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(body_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "body",
+	.validator_load =	ext_body_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(body_operation)
 };
 
 static bool ext_body_validator_load
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 d51170705f24ceb6f6337245a3df5a1701cfb1f8..be2c4b80b3d452639febc02d35ec8c2c3b0dc0b1 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
@@ -38,11 +38,8 @@ static bool ext_cmp_i_ascii_numeric_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def comparator_i_ascii_numeric_extension = {
-	"comparator-i;ascii-numeric",
-	NULL, NULL,
-	ext_cmp_i_ascii_numeric_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
+	.name = "comparator-i;ascii-numeric",
+	.validator_load = ext_cmp_i_ascii_numeric_validator_load,
 	SIEVE_EXT_DEFINE_OPERAND(my_comparator_operand)
 };
 
diff --git a/src/lib-sieve/plugins/copy/ext-copy.c b/src/lib-sieve/plugins/copy/ext-copy.c
index dc057238d14d33b4ee89c3883e130b2d4aa9572e..54d5813c1d8b0ba168333e044b202e24aec57d39 100644
--- a/src/lib-sieve/plugins/copy/ext-copy.c
+++ b/src/lib-sieve/plugins/copy/ext-copy.c
@@ -39,11 +39,8 @@ static bool ext_copy_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def copy_extension = {
-	"copy",
-	NULL, NULL,
-	ext_copy_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
+	.name = "copy",
+	.validator_load = ext_copy_validator_load,
 	SIEVE_EXT_DEFINE_OPERAND(copy_side_effect_operand)
 };
 
diff --git a/src/lib-sieve/plugins/date/ext-date.c b/src/lib-sieve/plugins/date/ext-date.c
index f69ca4e649b5bf0f079777f494be72d04788d3b4..13b68edf35b61d8bcd9a54094e00cdfef1081798 100644
--- a/src/lib-sieve/plugins/date/ext-date.c
+++ b/src/lib-sieve/plugins/date/ext-date.c
@@ -43,14 +43,10 @@ const struct sieve_operation_def *ext_date_operations[] = {
 };
 
 const struct sieve_extension_def date_extension = {
-	"date",
-	NULL, NULL,
-	ext_date_validator_load,
-	NULL,
-	ext_date_interpreter_load,
-	NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATIONS(ext_date_operations),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "date",
+	.validator_load = ext_date_validator_load,
+	.interpreter_load = ext_date_interpreter_load,
+	SIEVE_EXT_DEFINE_OPERATIONS(ext_date_operations)
 };
 
 static bool ext_date_validator_load
diff --git a/src/lib-sieve/plugins/editheader/ext-editheader.c b/src/lib-sieve/plugins/editheader/ext-editheader.c
index cb19d368bd74d447a53022d02c1006d2cd4528d9..daf6a4ee62e319add0315361225a070f5dfcd223 100644
--- a/src/lib-sieve/plugins/editheader/ext-editheader.c
+++ b/src/lib-sieve/plugins/editheader/ext-editheader.c
@@ -45,13 +45,11 @@ static bool ext_editheader_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def editheader_extension = {
-	"editheader",
-	ext_editheader_load,
-	ext_editheader_unload,
-	ext_editheader_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATIONS(editheader_operations),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "editheader",
+	.load = ext_editheader_load,
+	.unload = ext_editheader_unload,
+	.validator_load = ext_editheader_validator_load,
+	SIEVE_EXT_DEFINE_OPERATIONS(editheader_operations)
 };
 
 static bool ext_editheader_validator_load
diff --git a/src/lib-sieve/plugins/enotify/ext-enotify.c b/src/lib-sieve/plugins/enotify/ext-enotify.c
index 7d131dc141042f2198339339105628c89c5c7eab..480e9969724c06b6784c8b0d1246ffd20ad3e075 100644
--- a/src/lib-sieve/plugins/enotify/ext-enotify.c
+++ b/src/lib-sieve/plugins/enotify/ext-enotify.c
@@ -46,11 +46,10 @@ static bool ext_enotify_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def enotify_extension = {
-	"enotify",
-	ext_enotify_load,
-	ext_enotify_unload,
-	ext_enotify_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
+	.name = "enotify",
+	.load = ext_enotify_load,
+	.unload = ext_enotify_unload,
+	.validator_load = ext_enotify_validator_load,
 	SIEVE_EXT_DEFINE_OPERATIONS(ext_enotify_operations),
 	SIEVE_EXT_DEFINE_OPERAND(encodeurl_operand)
 };
diff --git a/src/lib-sieve/plugins/environment/ext-environment.c b/src/lib-sieve/plugins/environment/ext-environment.c
index 46f4b59c12ce4a2886ea3e2569104af8b847a52a..a0c9d98aa7b9a7da17ba8698a93edd86d88829c9 100644
--- a/src/lib-sieve/plugins/environment/ext-environment.c
+++ b/src/lib-sieve/plugins/environment/ext-environment.c
@@ -32,13 +32,11 @@ static bool ext_environment_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def environment_extension = {
-	"environment",
-	ext_environment_init,
-	ext_environment_deinit,
-	ext_environment_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "environment",
+	.load = ext_environment_init,
+	.unload = ext_environment_deinit,
+	.validator_load = ext_environment_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(tst_environment_operation)
 };
 
 static bool ext_environment_validator_load
diff --git a/src/lib-sieve/plugins/ihave/ext-ihave.c b/src/lib-sieve/plugins/ihave/ext-ihave.c
index 1d908a13719bfede5875bfca3de586eb046a7179..a621fee1b9fadbce40f67dec9c8f79331e15e22e 100644
--- a/src/lib-sieve/plugins/ihave/ext-ihave.c
+++ b/src/lib-sieve/plugins/ihave/ext-ihave.c
@@ -34,15 +34,11 @@ static bool ext_ihave_generator_load
 
 const struct sieve_extension_def ihave_extension = {
 	"ihave",
-	NULL, NULL,
-	ext_ihave_validator_load,
-	ext_ihave_generator_load,
-	NULL,
-	ext_ihave_binary_load,
-	ext_ihave_binary_dump,
-	NULL,
-	SIEVE_EXT_DEFINE_OPERATION(error_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.validator_load = ext_ihave_validator_load,
+	.generator_load = ext_ihave_generator_load,
+	.binary_load = ext_ihave_binary_load,
+	.binary_dump = ext_ihave_binary_dump,
+	SIEVE_EXT_DEFINE_OPERATION(error_operation)
 };
 
 static bool ext_ihave_validator_load
diff --git a/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c b/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c
index 0f88ea1bec1f6f6320bb82d433b33e3a03597d8f..bfb952e7cdd56e32e98c7e1f4e152dcbeaf162bb 100644
--- a/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c
+++ b/src/lib-sieve/plugins/imap4flags/ext-imap4flags.c
@@ -49,12 +49,9 @@ static bool ext_imap4flags_interpreter_load
 		sieve_size_t *address);
 
 const struct sieve_extension_def imap4flags_extension = {
-	"imap4flags",
-	NULL, NULL,
-	ext_imap4flags_validator_load,
-	NULL,
-	ext_imap4flags_interpreter_load,
-	NULL, NULL, NULL,
+	.name = "imap4flags",
+	.validator_load = ext_imap4flags_validator_load,
+	.interpreter_load = ext_imap4flags_interpreter_load,
 	SIEVE_EXT_DEFINE_OPERATIONS(imap4flags_operations),
 	SIEVE_EXT_DEFINE_OPERAND(flags_side_effect_operand)
 };
diff --git a/src/lib-sieve/plugins/imap4flags/ext-imapflags.c b/src/lib-sieve/plugins/imap4flags/ext-imapflags.c
index 7e0a1db5d2fc4afc49ba1069e899b07d4a86e686..be6c93259c26304837bfcbf03aab8ae65af51161 100644
--- a/src/lib-sieve/plugins/imap4flags/ext-imapflags.c
+++ b/src/lib-sieve/plugins/imap4flags/ext-imapflags.c
@@ -77,15 +77,10 @@ static bool ext_imapflags_interpreter_load
 		sieve_size_t *address);
 
 const struct sieve_extension_def imapflags_extension = {
-	"imapflags",
-	ext_imapflags_load,
-	NULL,
-	ext_imapflags_validator_load,
-	NULL,
-	ext_imapflags_interpreter_load,
-	NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "imapflags",
+	.load = ext_imapflags_load,
+	.validator_load = ext_imapflags_validator_load,
+	.interpreter_load = ext_imapflags_interpreter_load
 };
 
 static bool ext_imapflags_load
diff --git a/src/lib-sieve/plugins/include/ext-include.c b/src/lib-sieve/plugins/include/ext-include.c
index 11f24b99b8e2dd44a60f537fdeaf3ef8c99e04c2..6471edda3add2c9b4620cb3febfcdf94c07a91d1 100644
--- a/src/lib-sieve/plugins/include/ext-include.c
+++ b/src/lib-sieve/plugins/include/ext-include.c
@@ -63,17 +63,16 @@ static bool ext_include_binary_load
 /* Extension objects */
 
 const struct sieve_extension_def include_extension = {
-	"include",
-	ext_include_load,
-	ext_include_unload,
-	ext_include_validator_load,
-	ext_include_generator_load,
-	ext_include_interpreter_load,
-	ext_include_binary_load,
-	ext_include_binary_dump,
-	ext_include_code_dump,
-	SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "include",
+	.load = ext_include_load,
+	.unload = ext_include_unload,
+	.validator_load = ext_include_validator_load,
+	.generator_load = ext_include_generator_load,
+	.interpreter_load = ext_include_interpreter_load,
+	.binary_load = ext_include_binary_load,
+	.binary_dump = ext_include_binary_dump,
+	.code_dump = ext_include_code_dump,
+	SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations)
 };
 
 static bool ext_include_validator_load
diff --git a/src/lib-sieve/plugins/mailbox/ext-mailbox.c b/src/lib-sieve/plugins/mailbox/ext-mailbox.c
index e94c93b9e3f9ac4615f9c9f5d1d3ef47256ae642..2a0ab67f62a5802ffc3a2e53ea95305f6b65559b 100644
--- a/src/lib-sieve/plugins/mailbox/ext-mailbox.c
+++ b/src/lib-sieve/plugins/mailbox/ext-mailbox.c
@@ -32,10 +32,8 @@ static bool ext_mailbox_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def mailbox_extension = {
-	"mailbox",
-	NULL, NULL,
-	ext_mailbox_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
+	.name = "mailbox",
+	.validator_load = ext_mailbox_validator_load,
 	SIEVE_EXT_DEFINE_OPERATION(mailboxexists_operation),
 	SIEVE_EXT_DEFINE_OPERAND(mailbox_create_operand)
 };
diff --git a/src/lib-sieve/plugins/notify/ext-notify.c b/src/lib-sieve/plugins/notify/ext-notify.c
index 787252bdbd76afba99b27b82e2d0bdd218651142..371a10797e0a4272ff4d7488defeaef366d44bb2 100644
--- a/src/lib-sieve/plugins/notify/ext-notify.c
+++ b/src/lib-sieve/plugins/notify/ext-notify.c
@@ -41,13 +41,9 @@ static bool ext_notify_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def notify_extension = {
-	"notify",
-	NULL,
-	NULL,
-	ext_notify_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATIONS(ext_notify_operations),
-	SIEVE_EXT_DEFINE_NO_OPERANDS,
+	.name = "notify",
+	.validator_load = ext_notify_validator_load,
+	SIEVE_EXT_DEFINE_OPERATIONS(ext_notify_operations)
 };
 
 /*
diff --git a/src/lib-sieve/plugins/regex/ext-regex.c b/src/lib-sieve/plugins/regex/ext-regex.c
index d6c1777678b9609c19fa6ead2a77822f437d15d9..b7aa564aa6c917a2add4c6d0722fde70c432ee29 100644
--- a/src/lib-sieve/plugins/regex/ext-regex.c
+++ b/src/lib-sieve/plugins/regex/ext-regex.c
@@ -49,11 +49,8 @@ static bool ext_regex_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def regex_extension = {
-	"regex",
-	NULL, NULL,
-	ext_regex_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
+	.name = "regex",
+	.validator_load = ext_regex_validator_load,
 	SIEVE_EXT_DEFINE_OPERAND(regex_match_type_operand)
 };
 
diff --git a/src/lib-sieve/plugins/relational/ext-relational.c b/src/lib-sieve/plugins/relational/ext-relational.c
index c9115f1d9bcff119ffb0267c675d9bfc5490d471..db20dda856b3f3028ac72946b90cbaa50717723d 100644
--- a/src/lib-sieve/plugins/relational/ext-relational.c
+++ b/src/lib-sieve/plugins/relational/ext-relational.c
@@ -36,11 +36,8 @@ static bool ext_relational_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def relational_extension = {
-	"relational",
-	NULL, NULL,
-	ext_relational_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
+	.name = "relational",
+	.validator_load = ext_relational_validator_load,
 	SIEVE_EXT_DEFINE_OPERAND(rel_match_type_operand)
 };
 
diff --git a/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest.c b/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest.c
index a433def11ce33eb4bd3f9dea78f1411f7cbd69a3..e56741e9f3b5bb65d903641979bae02a1e0ad805 100644
--- a/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest.c
+++ b/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest.c
@@ -68,33 +68,27 @@ static bool ext_spamvirustest_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def spamtest_extension = {
-	"spamtest",
-	ext_spamvirustest_load,
-	ext_spamvirustest_unload,
-	ext_spamvirustest_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(spamtest_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "spamtest",
+	.load = ext_spamvirustest_load,
+	.unload = ext_spamvirustest_unload,
+	.validator_load = ext_spamvirustest_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(spamtest_operation)
 };
 
 const struct sieve_extension_def spamtestplus_extension = {
-	"spamtestplus",
-	ext_spamvirustest_load,
-	ext_spamvirustest_unload,
-	ext_spamvirustest_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(spamtest_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "spamtestplus",
+	.load = ext_spamvirustest_load,
+	.unload = ext_spamvirustest_unload,
+	.validator_load = ext_spamvirustest_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(spamtest_operation)
 };
 
 const struct sieve_extension_def virustest_extension = {
-	"virustest",
-	ext_spamvirustest_load,
-	ext_spamvirustest_unload,
-	ext_spamvirustest_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(virustest_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "virustest",
+	.load = ext_spamvirustest_load,
+	.unload = ext_spamvirustest_unload,
+	.validator_load = ext_spamvirustest_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(virustest_operation)
 };
 
 /*
diff --git a/src/lib-sieve/plugins/subaddress/ext-subaddress.c b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
index 061ec9a55b9052e1dc0a3cd24112f51068712f4e..bca19739876749edc580122c0baba31c7d8b5119 100644
--- a/src/lib-sieve/plugins/subaddress/ext-subaddress.c
+++ b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
@@ -57,12 +57,10 @@ static bool ext_subaddress_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def subaddress_extension = {
-	"subaddress",
-	ext_subaddress_load,
-	ext_subaddress_unload,
-	ext_subaddress_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
+	.name = "subaddress",
+	.load = ext_subaddress_load,
+	.unload = ext_subaddress_unload,
+	.validator_load = ext_subaddress_validator_load,
 	SIEVE_EXT_DEFINE_OPERAND(subaddress_operand)
 };
 
diff --git a/src/lib-sieve/plugins/vacation/ext-vacation-seconds.c b/src/lib-sieve/plugins/vacation/ext-vacation-seconds.c
index f21736f632f7bf6f3a1dbfa3775c407982fc03f1..c9c6c0f724a367a7f12ee47f4aa94fe3a0d70958 100644
--- a/src/lib-sieve/plugins/vacation/ext-vacation-seconds.c
+++ b/src/lib-sieve/plugins/vacation/ext-vacation-seconds.c
@@ -30,13 +30,9 @@ static bool ext_vacation_seconds_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def vacation_seconds_extension = {
-	"vacation-seconds",
-	ext_vacation_seconds_load,
-	NULL,
-	ext_vacation_seconds_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "vacation-seconds",
+	.load = ext_vacation_seconds_load,
+	.validator_load = ext_vacation_seconds_validator_load,
 };
 
 bool ext_vacation_seconds_load
diff --git a/src/lib-sieve/plugins/vacation/ext-vacation.c b/src/lib-sieve/plugins/vacation/ext-vacation.c
index 07f2676bacd30ed947dfc376da2aead5b76e6e0d..7c08267303d5d60ad1b798dbf6e234176ae50582 100644
--- a/src/lib-sieve/plugins/vacation/ext-vacation.c
+++ b/src/lib-sieve/plugins/vacation/ext-vacation.c
@@ -32,13 +32,11 @@ static bool ext_vacation_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def vacation_extension = {
-	"vacation",
-	ext_vacation_load,
-	ext_vacation_unload,
-	ext_vacation_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(vacation_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "vacation",
+	.load = ext_vacation_load,
+	.unload = ext_vacation_unload,
+	.validator_load = ext_vacation_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(vacation_operation)
 };
 
 static bool ext_vacation_validator_load
diff --git a/src/lib-sieve/plugins/variables/ext-variables.c b/src/lib-sieve/plugins/variables/ext-variables.c
index 1766f14f2320e7761ca4d709e2a88729824a3a68..e69707f2551f150033fa7d6384e29a55fd51ecda 100644
--- a/src/lib-sieve/plugins/variables/ext-variables.c
+++ b/src/lib-sieve/plugins/variables/ext-variables.c
@@ -57,13 +57,11 @@ static bool ext_variables_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *validator);
 
 const struct sieve_extension_def variables_extension = {
-	"variables",
-	NULL, NULL,
-	ext_variables_validator_load,
-	ext_variables_generator_load,
-	ext_variables_interpreter_load,
-	NULL, NULL,
-	ext_variables_code_dump,
+	.name = "variables",
+	.validator_load = ext_variables_validator_load,
+	.generator_load = ext_variables_generator_load,
+	.interpreter_load = ext_variables_interpreter_load,
+	.code_dump = ext_variables_code_dump,
 	SIEVE_EXT_DEFINE_OPERATIONS(ext_variables_operations),
 	SIEVE_EXT_DEFINE_OPERANDS(ext_variables_operands)
 };
diff --git a/src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c b/src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c
index d48b480306bbef7cde27847ca59e1c3cfa21508c..be383016c8044959835fc671132e8d854a057cf2 100644
--- a/src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c
+++ b/src/lib-sieve/plugins/vnd.dovecot/debug/ext-debug.c
@@ -40,14 +40,10 @@ static bool ext_debug_interpreter_load
 
 
 const struct sieve_extension_def debug_extension = {
-	"vnd.dovecot.debug",
-	NULL, NULL,
-	ext_debug_validator_load,
-	NULL,
-	ext_debug_interpreter_load,
-	NULL, NULL, NULL,
+	.name = "vnd.dovecot.debug",
+	.validator_load = ext_debug_validator_load,
+	.interpreter_load = ext_debug_interpreter_load,
 	SIEVE_EXT_DEFINE_OPERATION(debug_log_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
 
 static bool ext_debug_validator_load
diff --git a/src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c b/src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c
index a9b2c2320ae82d2745941652fe031bd656880429..8ab61d88b40cd896cb7ec2eacd25b932ec4ee7ea 100644
--- a/src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c
+++ b/src/lib-sieve/plugins/vnd.dovecot/duplicate/ext-duplicate.c
@@ -30,13 +30,11 @@ static bool ext_duplicate_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def duplicate_extension = {
-	"vnd.dovecot.duplicate",
-	ext_duplicate_load,
-	ext_duplicate_unload,
-	ext_duplicate_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_OPERATION(tst_duplicate_operation),
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "vnd.dovecot.duplicate",
+	.load = ext_duplicate_load,
+	.unload = ext_duplicate_unload,
+	.validator_load = ext_duplicate_validator_load,
+	SIEVE_EXT_DEFINE_OPERATION(tst_duplicate_operation)
 };
 
 /*
diff --git a/src/lib-sieve/sieve-address-parts.c b/src/lib-sieve/sieve-address-parts.c
index 0661681284e9b2c3ac840094b38e8ed67a34e8f6..a8aeaa71f7c518e41e86f4e9b0869847f1ea552f 100644
--- a/src/lib-sieve/sieve-address-parts.c
+++ b/src/lib-sieve/sieve-address-parts.c
@@ -44,12 +44,8 @@ static bool addrp_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def address_part_extension = {
-	"@address-parts",
-	NULL, NULL,
-	addrp_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS /* Defined as core operand */
+	.name = "@address-parts",
+	.validator_load = addrp_validator_load
 };
 
 /*
diff --git a/src/lib-sieve/sieve-comparators.c b/src/lib-sieve/sieve-comparators.c
index dce73d834a3e08fda9fafe37f12e5ce44027dbad..86491b2fd6dfc1193606bb03b516c7bd772c4baa 100644
--- a/src/lib-sieve/sieve-comparators.c
+++ b/src/lib-sieve/sieve-comparators.c
@@ -39,12 +39,8 @@ static bool cmp_validator_load
 	(const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def comparator_extension = {
-	"@comparators",
-	NULL, NULL,
-	cmp_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS    /* Defined as core operand */
+	.name = "@comparators",
+	.validator_load = cmp_validator_load
 };
 
 /*
diff --git a/src/lib-sieve/sieve-extensions.c b/src/lib-sieve/sieve-extensions.c
index 9864cc8457634464ec6db12158643e20610b64d3..fc5318400146a959ab5d1af112164541d610004e 100644
--- a/src/lib-sieve/sieve-extensions.c
+++ b/src/lib-sieve/sieve-extensions.c
@@ -59,17 +59,11 @@ extern const struct sieve_extension_def address_part_extension;
 /* FIXME: This is stupid. Define a comparator-* extension and be done with it */
 
 static const struct sieve_extension_def comparator_i_octet_extension = {
-	"comparator-i;octet",
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "comparator-i;octet",
 };
 
 static const struct sieve_extension_def comparator_i_ascii_casemap_extension = {
-	"comparator-i;ascii-casemap",
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "comparator-i;ascii-casemap",
 };
 
 /*
diff --git a/src/lib-sieve/sieve-extensions.h b/src/lib-sieve/sieve-extensions.h
index 6e976bebdf8f2aa316a029367da94bd571dc8daf..2fa6a1604faae2ed17b7da9bcea78497dd845a6c 100644
--- a/src/lib-sieve/sieve-extensions.h
+++ b/src/lib-sieve/sieve-extensions.h
@@ -50,6 +50,8 @@ struct sieve_extension_def {
 	struct sieve_extension_objects operands;
 };
 
+/* Defining opcodes and operands */
+
 #define SIEVE_EXT_DEFINE_NO_OBJECTS \
 	{ NULL, 0 }
 #define SIEVE_EXT_DEFINE_OBJECT(OBJ) \
@@ -60,6 +62,20 @@ struct sieve_extension_def {
 #define SIEVE_EXT_GET_OBJECTS_COUNT(ext, field) \
 	ext->field->count;
 
+#define SIEVE_EXT_DEFINE_NO_OPERATIONS \
+	.operations = SIEVE_EXT_DEFINE_NO_OBJECTS
+#define SIEVE_EXT_DEFINE_OPERATION(OP) \
+	.operations = SIEVE_EXT_DEFINE_OBJECT(OP)
+#define SIEVE_EXT_DEFINE_OPERATIONS(OPS) \
+	.operations = SIEVE_EXT_DEFINE_OBJECTS(OPS)
+
+#define SIEVE_EXT_DEFINE_NO_OPERANDS \
+	.operands = SIEVE_EXT_DEFINE_NO_OBJECTS
+#define SIEVE_EXT_DEFINE_OPERAND(OP) \
+	.operands = SIEVE_EXT_DEFINE_OBJECT(OP)
+#define SIEVE_EXT_DEFINE_OPERANDS(OPS) \
+	.operands = SIEVE_EXT_DEFINE_OBJECTS(OPS)
+
 /*
  * Extension instance
  */
@@ -85,18 +101,6 @@ struct sieve_extension {
 #define sieve_extension_name_is(ext, _name) \
 	( strcmp((ext)->def->name, (_name)) == 0 )
 
-/*
- * Defining opcodes and operands
- */
-
-#define SIEVE_EXT_DEFINE_NO_OPERATIONS SIEVE_EXT_DEFINE_NO_OBJECTS
-#define SIEVE_EXT_DEFINE_OPERATION(OP) SIEVE_EXT_DEFINE_OBJECT(OP)
-#define SIEVE_EXT_DEFINE_OPERATIONS(OPS) SIEVE_EXT_DEFINE_OBJECTS(OPS)
-
-#define SIEVE_EXT_DEFINE_NO_OPERANDS SIEVE_EXT_DEFINE_NO_OBJECTS
-#define SIEVE_EXT_DEFINE_OPERAND(OP) SIEVE_EXT_DEFINE_OBJECT(OP)
-#define SIEVE_EXT_DEFINE_OPERANDS(OPS) SIEVE_EXT_DEFINE_OBJECTS(OPS)
-
 /*
  * Extensions init/deinit
  */
diff --git a/src/lib-sieve/sieve-match-types.c b/src/lib-sieve/sieve-match-types.c
index a0f04bfcab8361fcac895d43d382d565a281c3e9..e8025da0f888cb98e7d61f1e7ac45433bdea2fb4 100644
--- a/src/lib-sieve/sieve-match-types.c
+++ b/src/lib-sieve/sieve-match-types.c
@@ -52,12 +52,8 @@ static bool mtch_validator_load
 (const struct sieve_extension *ext, struct sieve_validator *valdtr);
 
 const struct sieve_extension_def match_type_extension = {
-	"@match-types",
-	NULL, NULL,
-	mtch_validator_load,
-	NULL, NULL, NULL, NULL, NULL,
-	SIEVE_EXT_DEFINE_NO_OPERATIONS,
-	SIEVE_EXT_DEFINE_NO_OPERANDS
+	.name = "@match-types",
+	.validator_load = mtch_validator_load
 };
 
 /*
diff --git a/src/testsuite/ext-testsuite.c b/src/testsuite/ext-testsuite.c
index bcf3250e08c5d1a56143e5e1638f3054155b183a..bd5ecef5a8ddfd95319bc41f59e8b8ceb4b85de1 100644
--- a/src/testsuite/ext-testsuite.c
+++ b/src/testsuite/ext-testsuite.c
@@ -106,13 +106,11 @@ static bool ext_testsuite_binary_load
 /* Extension object */
 
 const struct sieve_extension_def testsuite_extension = {
-	"vnd.dovecot.testsuite",
-	NULL, NULL,
-	ext_testsuite_validator_load,
-	ext_testsuite_generator_load,
-	ext_testsuite_interpreter_load,
-	ext_testsuite_binary_load,
-	NULL, NULL,
+	.name = "vnd.dovecot.testsuite",
+	.validator_load = ext_testsuite_validator_load,
+	.generator_load = ext_testsuite_generator_load,
+	.interpreter_load = ext_testsuite_interpreter_load,
+	.binary_load = ext_testsuite_binary_load,
 	SIEVE_EXT_DEFINE_OPERATIONS(testsuite_operations),
 	SIEVE_EXT_DEFINE_OPERANDS(testsuite_operands)
 };