Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to bind IPv4 and IPv6 together? #1978

Closed
pyy opened this issue Nov 2, 2018 · 4 comments
Closed

How to bind IPv4 and IPv6 together? #1978

pyy opened this issue Nov 2, 2018 · 4 comments

Comments

@pyy
Copy link

pyy commented Nov 2, 2018

Hello everyone,

in file mailcow.conf, we can set mailcow to bind exact IP address, for example

# ------------------------------
# Other bindings
# ------------------------------
SMTP_PORT=11.22.33.44:25
SMTPS_PORT=11.22.33.44:465
SUBMISSION_PORT=11.22.33.44:587
...

It looks like I can only bind to one IP. But if I have multiple IPv6, how can I also bind with IPv6 at the same time? In other word, how can I bind to more than two IPs at same time, except binding to 0.0.0.0:25 ...

thank you.

@stale
Copy link

stale bot commented Jan 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the dunno label Jan 1, 2019
@stale stale bot closed this as completed Jan 9, 2019
@ngdio
Copy link

ngdio commented Feb 23, 2019

Can this be reopened? I'd also like to bind to both ipv4 and ipv6 addresses.

@imxari
Copy link

imxari commented Mar 20, 2019

Yes, I'd like to bind on both v6 and v4

@andryyy
Copy link
Contributor

andryyy commented Mar 20, 2019

We need doc updates...

Something like this will work, but does also need IPv4 bindings for all services! If not, it fails:

# nano docker-compose.override.yml
version: '2.1'
services:

    dovecot-mailcow:
      ports:
        - '2000:1:1:1:1:1:dead:beaf:143:143'
        - '2000:1:1:1:1:1:dead:beaf:993:993'
        - '2000:1:1:1:1:1:dead:beaf:110:110'
        - '2000:1:1:1:1:1:dead:beaf:995:995'
        - '2000:1:1:1:1:1:dead:beaf:4190:4190'

    postfix-mailcow:
      ports:
        - '2000:1:1:1:1:1:dead:beaf:25:25'
        - '2000:1:1:1:1:1:dead:beaf:465:465'
        - '2000:1:1:1:1:1:dead:beaf:587:587'

    nginx-mailcow:
      ports:
        - '2000:1:1:1:1:1:dead:beaf:80:80'
        - '2000:1:1:1:1:1:dead:beaf:443:443'

Edit: IPv4 bindings should look like this:

HTTP_PORT=80
HTTP_BIND=1.2.3.4

HTTPS_PORT=443
HTTPS_BIND=1.2.3.4

SMTP_PORT=1.2.3.4:25
SMTPS_PORT=1.2.3.4:465
SUBMISSION_PORT=1.2.3.4:587
IMAP_PORT=1.2.3.4:143
IMAPS_PORT=1.2.3.4:993
POP_PORT=1.2.3.4:110
POPS_PORT=1.2.3.4:995
SIEVE_PORT=1.2.3.4:4190
DOVEADM_PORT=127.0.0.1:19991

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

No branches or pull requests

4 participants