2023-05-23 15:25:08 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
# shellcheck source=../scripts/helpers/log.sh
|
|
|
|
source /usr/local/bin/helpers/log.sh
|
|
|
|
# shellcheck source=../scripts/startup/setup-stack.sh
|
|
|
|
source /usr/local/bin/setup.d/getmail.sh
|
|
|
|
|
|
|
|
_setup_getmail
|
|
|
|
|
2023-05-24 07:06:59 +00:00
|
|
|
if [[ -d /var/lib/getmail ]]; then
|
2023-05-23 15:25:08 +00:00
|
|
|
GETMAILDIR=/var/lib/getmail
|
|
|
|
else
|
|
|
|
mkdir -p /tmp/docker-mailserver/getmail
|
|
|
|
GETMAILDIR=/tmp/docker-mailserver/getmail
|
|
|
|
fi
|
|
|
|
|
2023-05-26 12:00:40 +00:00
|
|
|
for FILE in /etc/getmailrc.d/getmailrc*; do
|
2023-12-04 00:11:52 +00:00
|
|
|
getmail --getmaildir "${GETMAILDIR}" --rcfile "${FILE}" --dump | tail -n +6
|
2023-05-23 15:25:08 +00:00
|
|
|
done
|