mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-31 16:15:04 +02:00
breaking: Refactor getmail
support (#4156)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
fb57905aa3
commit
b2978fd760
20 changed files with 198 additions and 59 deletions
|
@ -5,9 +5,20 @@ source /usr/local/bin/helpers/log.sh
|
|||
# shellcheck source=../scripts/startup/setup-stack.sh
|
||||
source /usr/local/bin/setup.d/getmail.sh
|
||||
|
||||
_setup_getmail
|
||||
# Setup getmail, even if not enabled.
|
||||
ENABLE_GETMAIL=1 _setup_getmail
|
||||
|
||||
GETMAILDIR=/tmp/docker-mailserver/getmail
|
||||
for FILE in /etc/getmailrc.d/getmailrc*; do
|
||||
getmail --getmaildir "${GETMAILDIR}" --rcfile "${FILE}" --dump | tail -n +6
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue