/ # nc postsrsd 10001 get fabianpeter@test.local 500 No secrets in SRS configuration.
@@ -19,4 +19,8 @@ EXPOSE 10001/tcp
EXPOSE 10002/tcp
# > Cannot open file with secret: /etc/postsrsd/secrets/list
-CMD touch "$SRS_SECRET" && postsrsd -l0.0.0.0 -e
+CMD set -x; \
+ if [ ! -f "$SRS_SECRET" ]; \
+ then tr -dc '1-9a-zA-Z' < /dev/random | head -c 32 > "$SRS_SECRET"; \
+ fi \
+ && postsrsd -l0.0.0.0 -e