From d4cee677ce655a67b08791f9fa891f0ed6e12141 Mon Sep 17 00:00:00 2001 From: Thomas VIAL Date: Mon, 9 Jan 2017 17:11:10 +0100 Subject: [PATCH] ONE_DIR documentation (#460) * Fixes #457 adding information regarding `ONE_DIR` env variable --- README.md | 5 +++++ target/start-mailserver.sh | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9ec0eb3..b37c8da7 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,11 @@ Note: this spamassassin setting needs `ENABLE_SPAMASSASSIN=1` Note: this spamassassin setting needs `ENABLE_SPAMASSASSIN=1` +##### ONE_DIR + + - **0** => state in default directories + - 1 => consolidate all states into a single directory (`/var/mail-state`) to allow persistence using docker volumes + ##### ENABLE_POP3 - **empty** => POP3 service disabled diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index bbe739a1..43556b5b 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -864,8 +864,7 @@ function misc() { } function _misc_save_states() { - # Consolidate all state that should be persisted across container restarts into one mounted - # directory + # consolidate all states into a single directory (`/var/mail-state`) to allow persistence using docker volumes statedir=/var/mail-state if [ "$ONE_DIR" = 1 -a -d $statedir ]; then notify 'inf' "Consolidating all state onto $statedir"