diff --git a/src/lib-sieve-tool/sieve-tool.c b/src/lib-sieve-tool/sieve-tool.c
index 8a8a06f0dda9ed86aaef8d258ea4521dcd170091..3ebc04f8020731d3881ebae0211e5286efaedf5f 100644
--- a/src/lib-sieve-tool/sieve-tool.c
+++ b/src/lib-sieve-tool/sieve-tool.c
@@ -75,10 +75,10 @@ static const char *sieve_tool_sieve_get_setting
 	if ( tool->setting_callback != NULL )
 		return tool->setting_callback(tool->setting_callback_context, identifier);
 
-	if ( tool->mail_user == NULL )
+	if ( tool->mail_user_dovecot == NULL )
 		return NULL;
 
-	return mail_user_plugin_getenv(tool->mail_user, identifier);
+	return mail_user_plugin_getenv(tool->mail_user_dovecot, identifier);
 }
 
 static const char *sieve_tool_sieve_get_homedir