Skip to content

PERMIT_DOCKER=network does not extent to custom network #1079

@fbartels

Description

@fbartels

Reading through the description of PERMIT_DOCKER it sounds like network has the furthest reach, but setting the option to it does not allow sending from other containers in the same network (mail connections are subject to greylisting).

Context

I am working on a docker-compose file that uses this image for the mta part. The wip is located at https://github.com/fbartels/kopano-docker/tree/compose. As part of the compose file a customer docker network is created that both docker-mailserver and the mail sending part of my application share the same network. when now trying to send a mail from my application this mail ends up in greylisting, while I would have expected (by setting permit_docker=network) that my application is part of mynetworks.

Expected Behavior

the container kspooler should have been part of mynetworks

Actual Behavior

its not part of mynetworks

Possible Fix

do not set a fixed ip in https://github.com/tomav/docker-mailserver/blob/cc56b4f89ef854273fe0c33b87f94812f3b5cb71/target/start-mailserver.sh#L980-L984, but also use container_network

btw. instead of permit_docker=network, this actually works with permit_docker=host

Steps to Reproduce

  1. checkout project from above
  2. run setup.sh (accept all defaults)
  3. docker-compose up
  4. go to webapp.kopano.com, login with user1/user1, try to send a mail to [email protected]

Your Environment

i don't think this is relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions