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.
This commit is contained in:
Holger Weiss 2019-04-25 17:53:42 +02:00
parent cb0a14c89a
commit fe121057f2
1 changed files with 1 additions and 4 deletions

View File

@ -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;