Is there a good reason that several services in mailcow have their ports exposed on the host, even though they are limited to localhost (127.0.0.1)? Is this just for convenience, or is it not possible to resolve the addresses for the relevant services at runtime?
Specifically, I’m talking about these ports as configured in mailcow.conf
:
DOVEADM_PORT=127.0.0.1:19991
SQL_PORT=127.0.0.1:13306
SOLR_PORT=127.0.0.1:18983
REDIS_PORT=127.0.0.1:7654
Limiting these ports to localhost should minimise the chance of access from outside the host, but it does extend the attack surface area somewhat and also means traffic is being routed via the mailcow network gateway out to the host and then back into the mailcow network, which seems inefficient.
So why does mailcow do this, instead of e.g. connecting directly to redis-mailcow:6379?
Also, is the Sieve port necessary to expose to the internet if you don’t use SoGo? Or is it used via the Admin console when configuring filters?