mirror of
https://github.com/docker-mailserver/docker-mailserver
synced 2026-11-02 20:40:08 +01:00
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Co-authored-by: Brainkiller <brainkiller@boven.xyz> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
26 lines
987 B
Bash
26 lines
987 B
Bash
#! /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, even if not enabled.
|
|
# Parallel mode is disabled to not regenerate (and thereby stop) running supervisord services.
|
|
ENABLE_GETMAIL=1 GETMAIL_PARALLEL=0 GETMAIL_IDLE='' _setup_getmail
|
|
|
|
# Directory, where "oldmail" files are stored.
|
|
# Getmail stores its state - its "memory" of what it has seen in your POP/IMAP account - in the oldmail files.
|
|
GETMAIL_DIR=/var/lib/getmail
|
|
|
|
# If no matching filenames are found, and the shell option nullglob is disabled, the word is left unchanged.
|
|
# If the nullglob option is set, and no matches are found, the word is removed.
|
|
shopt -s nullglob
|
|
|
|
# Dump configuration from each RC file.
|
|
for RC_FILE in /etc/getmailrc.d/*; do
|
|
echo "${RC_FILE##*/}:"
|
|
echo
|
|
getmail --getmaildir "${GETMAIL_DIR}" --rcfile "${RC_FILE}" --dump | tail -n +6
|
|
done
|