mirror of
https://github.com/iredmail/iRedMail
synced 2026-06-08 14:51:59 +00:00
Enable long queue id support in logwatch.
This commit is contained in:
@@ -2,6 +2,9 @@ iRedMail-1.4:
|
||||
* DROPPED distribution release:
|
||||
- Debian 9 (stretch). Please use Debian 10 instead.
|
||||
|
||||
* Improvements:
|
||||
- Enable long queue id support in logwatch.
|
||||
|
||||
* Fixed issues:
|
||||
- Fail2ban can not store banned IP address when its country name
|
||||
contains quotes.
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Author: Zhang Huangbin (zhb _at_ iredmail.org)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# This file is part of iRedMail, which is an open source mail server
|
||||
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
|
||||
#
|
||||
# iRedMail is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# iRedMail is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with iRedMail. If not, see <http://www.gnu.org/licenses/>.
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
if [ X"${KERNEL_NAME}" == X'LINUX' ]; then
|
||||
export LOGWATCH_SERVICES_DIR='/etc/logwatch/conf/services'
|
||||
elif [ X"${KERNEL_NAME}" == X'FREEBSD' ]; then
|
||||
export LOGWATCH_SERVICES_DIR='/usr/local/etc/logwatch/services'
|
||||
fi
|
||||
+18
-1
@@ -375,12 +375,29 @@ postfix_config_postscreen()
|
||||
echo 'export status_postfix_config_postscreen="DONE"' >> ${STATUS_FILE}
|
||||
}
|
||||
|
||||
postfix_config_logwatch()
|
||||
{
|
||||
# Enable long queue ID.
|
||||
if [ -n ${LOGWATCH_SERVICES_DIR} ] && [ -d ${LOGWATCH_SERVICES_DIR} ]; then
|
||||
f="${LOGWATCH_SERVICES_DIR}/postfix.conf"
|
||||
|
||||
if ! grep '\$postfix_Enable_Long_Queue_Ids' ${f} &>/dev/null; then
|
||||
cat >> ${f} <<EOF
|
||||
\$postfix_Enable_Long_Queue_Ids = Yes
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'export status_postfix_config_logwatch="DONE"' >> ${STATUS_FILE}
|
||||
}
|
||||
|
||||
postfix_setup()
|
||||
{
|
||||
# Include all sub-steps
|
||||
check_status_before_run postfix_config_basic && \
|
||||
check_status_before_run postfix_config_vhost && \
|
||||
check_status_before_run postfix_config_postscreen
|
||||
check_status_before_run postfix_config_postscreen && \
|
||||
check_status_before_run postfix_config_logwatch
|
||||
|
||||
cat >> ${TIP_FILE} <<EOF
|
||||
Postfix:
|
||||
|
||||
@@ -100,6 +100,7 @@ export DOMAIN_ADMIN_EMAIL="${DOMAIN_ADMIN_NAME}@${FIRST_DOMAIN}"
|
||||
. ${CONF_DIR}/netdata
|
||||
. ${CONF_DIR}/fail2ban
|
||||
. ${CONF_DIR}/iredadmin
|
||||
. ${CONF_DIR}/logwatch
|
||||
|
||||
# Import functions in specified order.
|
||||
if [ X"${DISTRO}" == X'FREEBSD' ]; then
|
||||
|
||||
Reference in New Issue
Block a user