From fe121057f2b9bd0f7f71a6fd1bcb14e42a41954c Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 25 Apr 2019 17:53:42 +0200 Subject: [PATCH] mod_spam_filter: Don't create wrong dump file name Don't attempt creation of the dump file while checking the validity of the "spam_dump_file" option, as the @HOST@ keyword can't be expanded at this point. Thanks to Nico Wellpott for reporting this issue. --- mod_spam_filter/src/mod_spam_filter.erl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mod_spam_filter/src/mod_spam_filter.erl b/mod_spam_filter/src/mod_spam_filter.erl index 8bcda0f..98ebdff 100644 --- a/mod_spam_filter/src/mod_spam_filter.erl +++ b/mod_spam_filter/src/mod_spam_filter.erl @@ -108,10 +108,7 @@ depends(_Host, _Opts) -> -spec mod_opt_type(atom()) -> fun((term()) -> term()) | [atom()]. mod_opt_type(spam_dump_file) -> fun(none) -> none; - (File) -> - {ok, Fd} = file:open(File, [append, raw]), - ok = file:close(Fd), - iolist_to_binary(File) + (File) -> iolist_to_binary(File) end; mod_opt_type(spam_jids_file) -> fun(none) -> none;