46 lines
1.9 KiB
Bash
46 lines
1.9 KiB
Bash
print_config_title 'CHECK POSTFIX BASIC CONFIG'
|
|
|
|
# Check /etc/postfix/main.cf config file mail_owner/inet_protocols parameters
|
|
|
|
# mail_owner
|
|
check_value_in_conf_file "POSTFIX" "/etc/postfix/main.cf" "mail_owner" "postfix"
|
|
|
|
case ${?} in
|
|
0) # OK, nothing to do
|
|
;;
|
|
1) # Error (wrong number of param or other)
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" Error during mail_owner check with function check_value_in_conf_file, maybe incorrect number of parameter;"
|
|
;;
|
|
2) # Unexpected value is set
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" mail_owner is not well configured or has other value, set 'mail_owner = postfix';"
|
|
;;
|
|
3) # All expected values are NOT configured
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" mail_owner is not well configured, set 'mail_owner = postfix';"
|
|
;;
|
|
*) # Unknown return code...
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" Error, unknown return code when calling check_value_in_conf_file to check mail_owner;"
|
|
;;
|
|
esac
|
|
|
|
|
|
# inet_protocols
|
|
check_value_in_conf_file "POSTFIX" "/etc/postfix/main.cf" "inet_protocols" "all"
|
|
|
|
case ${?} in
|
|
0) # OK, nothing to do
|
|
;;
|
|
1) # Error (wrong number of param or other)
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" Error during inet_protocols check with function check_value_in_conf_file, maybe incorrect number of parameter;"
|
|
;;
|
|
2) # Unexpected value is set
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" inet_protocols are not well configured or has other value, set 'inet_protocols = all';"
|
|
;;
|
|
3) # All expected values are NOT configured
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" inet_protocols are not well configured, set 'inet_protocols = all';"
|
|
;;
|
|
*) # Unknown return code...
|
|
POSTFIX_CONFIG_CHECK_FAILED=${POSTFIX_CONFIG_CHECK_FAILED}" Error, unknown return code when calling check_value_in_conf_file to check inet_protocols;"
|
|
;;
|
|
esac
|
|
|