Make the recovery mode listen address configurable

Hi,

Right now the recovery mode listener is hard-coded to [::]. The port can be changed with STALWART_RECOVERY_MODE_PORT.

I have a small change that adds a STALWART_RECOVERY_MODE_ADDRESS variable:

  • When it’s not set, nothing changes and the listener still binds to [::].
  • When it’s set to an IP such as 127.0.0.1 or ::1, the listener binds to that address.
  • If the value isn’t a valid IP, it prints a warning and falls back to 127.0.0.1 rather than listening on all interfaces.

I also added a commented example to the env file that install.sh writes.

It’s on the recovery-mode-address branch of my fork, as one commit on top of v1.1.0:

Thanks!