setup a check to warn users about certain config
If I am not mistaken, the configuration I am checking for is the one we should emit a warning about: in case junk mail is moved to the inbox and no rewriting happens, we should check whether this is actually what the user wants.
This commit is contained in:
parent
bc6786ec87
commit
7372fae786
|
@ -36,6 +36,7 @@ function _register_functions() {
|
|||
_register_check_function '_check_improper_restart'
|
||||
_register_check_function '_check_hostname'
|
||||
_register_check_function '_check_log_level'
|
||||
_register_check_function '_check_spam_prefix'
|
||||
|
||||
# ? >> Setup
|
||||
|
||||
|
|
|
@ -52,3 +52,12 @@ function _check_log_level() {
|
|||
LOG_LEVEL="${DEFAULT_LOG_LEVEL}"
|
||||
fi
|
||||
}
|
||||
|
||||
function _check_spam_prefix() {
|
||||
# This check should be independent of ENABLE_POP3 and ENABLE_IMAP
|
||||
if _env_var_expect_zero_or_one MOVE_SPAM_TO_JUNK \
|
||||
&& [[ ${MOVE_SPAM_TO_JUNK} -eq 0 ]] \
|
||||
&& [[ -z ${SPAM_SUBJECT} ]]; then
|
||||
_log 'warn' "'MOVE_SPAM_TO_JUNK=0' and 'SPAM_SUBJECT' is empty - make sure this is intended: spam e-mails might not be immediately recognizable in this configuration"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue