diff --git a/_assets/scripts/gen_config.sh b/_assets/scripts/gen_config.sh index 11afa9b43..272d6b364 100755 --- a/_assets/scripts/gen_config.sh +++ b/_assets/scripts/gen_config.sh @@ -9,6 +9,7 @@ RPC_PORT="${RPC_PORT:-8545}" LISTEN_PORT="${LSTEN_PORT:-30303}" API_MODULES="${API_MODULES:-eth,web3,admin}" MAX_PEERS="${MAX_PEERS:-50}" +DAYS_KEPT="${DAYS_KEPT-30}" FLEET_NAME="${FLEET_NAME:-eth.prod}" REGISTER_TOPIC="${REGISTER_TOPIC:-whispermail}" MAIL_PASSWORD="${MAIL_PASSWORD:-status-offline-inbox}" @@ -40,6 +41,7 @@ JQ_FILTER_ARRAY=( ".WakuConfig.EnableMailServer = true" ".WakuConfig.DataDir = \"${DATA_PATH}/waku\"" ".WakuConfig.MailServerPassword = \"${MAIL_PASSWORD}\"" + ".WakuConfig.MailServerDataRetention = ${DAYS_KEPT}" ) JQ_FILTER=$(printf " | %s" "${JQ_FILTER_ARRAY[@]}") diff --git a/config/README.md b/config/README.md index aa7d7cb3f..004a52eba 100644 --- a/config/README.md +++ b/config/README.md @@ -60,11 +60,13 @@ If you want your node to relay Waku(modified Whisper) protocol messages you'll w "Enabled": true, "EnableMailServer": true, "DataDir": "/tmp/status-go-data/waku", - "MailServerPassword": "status-offline-inbox" + "MailServerPassword": "status-offline-inbox", + "MailServerDataRetention": 30 } } ``` The `MailServerPassword` is used for symmetric encryption of history requests. +The `MailServerDataRetention` defines number of days for which to keep messages. By default it will use `leveldb` embedded database. To use postgres instead you need to add this to your config: