Skip to content

feat: configurable hosts for listen and reinject#84

Open
DarkCat09 wants to merge 6 commits intochatmail:mainfrom
DarkCat09:dc09/config-host
Open

feat: configurable hosts for listen and reinject#84
DarkCat09 wants to merge 6 commits intochatmail:mainfrom
DarkCat09:dc09/config-host

Conversation

@DarkCat09
Copy link
Contributor

Currently, filtermail always listens on localhost and assumes that postfix is always on localhost. This can be different in some setups, e.g. when filtermail and postfix are in separate docker containers (sharing the same docker network).

This PR adds configurable listen IP and postfix host via LISTEN_IP and POSTFIX_HOST env vars.
Postfix host is resolved with ToSocketAddrs so we can use an internal docker container host (e.g. service name when run in a docker compose) instead of finding out its IP address.

I'm absolutely okay with maintaining a soft-fork for my "chatmail in docker" project (work in progress), but i thought it could be useful for the upstream as well. Feel free to provide any suggestions regarding the code.

@DarkCat09 DarkCat09 requested a review from j-g00da March 5, 2026 17:47
Copy link
Collaborator

@j-g00da j-g00da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but we are yet to decide if we want to support this. Approved, but not merging yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants