docker-simple-mail-forwarder icon indicating copy to clipboard operation
docker-simple-mail-forwarder copied to clipboard

config file instead of config environment variable

Open jaydouble opened this issue 2 years ago • 2 comments

Hi,

I want to use this, but I need a couple of forwards. When I create a couple of forwards the config environment variable will become a long string, so it will become a potential failure.

Is it possible to create a config file, that will be the same a the config, but then newline separated? So the script to load to config will be like:

if [ -z "$SMF_CONFIG" ]; then
  SMF_CONFIG=$(cat /smf_config.txt | tr '\n' ';')
fi

that script is not tested, just a thinking around..

jaydouble avatar Feb 03 '23 16:02 jaydouble

Thanks for sharing!

It looks like it's a convenient way to load the config to the environment variable; if it works as expected, I'd like to accept a PR to add it to README as a recommended way to load the config from the file.

huan avatar Feb 03 '23 22:02 huan

Hi, a added a PR: #119

jaydouble avatar Feb 08 '23 16:02 jaydouble