fix: Drop `/var/lib/getmail/` location
This commit is contained in:
parent
df1939abc3
commit
b7ff8b2e7a
|
@ -7,13 +7,7 @@ source /usr/local/bin/setup.d/getmail.sh
|
|||
|
||||
_setup_getmail
|
||||
|
||||
if [[ -d /var/lib/getmail ]]; then
|
||||
GETMAILDIR=/var/lib/getmail
|
||||
else
|
||||
mkdir -p /tmp/docker-mailserver/getmail
|
||||
GETMAILDIR=/tmp/docker-mailserver/getmail
|
||||
fi
|
||||
|
||||
GETMAILDIR=/tmp/docker-mailserver/getmail
|
||||
for FILE in /etc/getmailrc.d/getmailrc*; do
|
||||
getmail --getmaildir "${GETMAILDIR}" --rcfile "${FILE}" --dump | tail -n +6
|
||||
done
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#! /bin/bash
|
||||
|
||||
GETMAILDIR=/tmp/docker-mailserver/getmail
|
||||
for FILE in /etc/getmailrc.d/getmailrc*; do
|
||||
if ! pgrep -f "${FILE}$" &>/dev/null; then
|
||||
getmail --getmaildir /var/lib/getmail --rcfile "${FILE}"
|
||||
getmail --getmaildir "${GETMAILDIR}" --rcfile "${FILE}"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -33,8 +33,9 @@ EOF
|
|||
fi
|
||||
|
||||
# Both the debug command and cron job (that runs getmail) for getmail
|
||||
# expect this location to exist. As does the `/var/mail-state` startup script.
|
||||
mkdir -p /var/lib/getmail
|
||||
# expect this location to exist.
|
||||
GETMAILDIR=/tmp/docker-mailserver/getmail
|
||||
mkdir -p "${GETMAILDIR}"
|
||||
else
|
||||
_log 'debug' 'Getmail is disabled'
|
||||
fi
|
||||
|
|
|
@ -23,7 +23,6 @@ function _setup_save_states() {
|
|||
[[ ${ENABLE_CLAMAV} -eq 1 ]] && SERVICEDIRS+=('lib/clamav')
|
||||
[[ ${ENABLE_FAIL2BAN} -eq 1 ]] && SERVICEDIRS+=('lib/fail2ban')
|
||||
[[ ${ENABLE_FETCHMAIL} -eq 1 ]] && SERVICEDIRS+=('lib/fetchmail')
|
||||
[[ ${ENABLE_GETMAIL} -eq 1 ]] && SERVICEDIRS+=('lib/getmail')
|
||||
[[ ${ENABLE_MTA_STS} -eq 1 ]] && SERVICEDIRS+=('lib/mta-sts')
|
||||
[[ ${ENABLE_POSTGREY} -eq 1 ]] && SERVICEDIRS+=('lib/postgrey')
|
||||
[[ ${ENABLE_RSPAMD} -eq 1 ]] && SERVICEDIRS+=('lib/rspamd')
|
||||
|
|
Loading…
Reference in New Issue