Coder Social home page Coder Social logo

Comments (10)

Wonderfall avatar Wonderfall commented on May 19, 2024

May you provide us with your docker-compose file?

from mailserver.

Toobian avatar Toobian commented on May 19, 2024

Sorry, i missed ><

version: "2"

services:
  mailserver:
    image: hardware/mailserver
    container_name: mailserver
    domainname: ***.net
    hostname: mail
    links:
      - mariadb:mariadb
    ports:
      - "25:25"
      - "143:143"
      - "465:465"
      - "587:587"
      - "993:993"
      - "4190:4190"
    environment:
      - OPENDKIM_KEY_LENGTH=4096
      - ADD_DOMAINS=***.net,***.fr
      - DBHOST=mariadb
      - DBUSER=postfix
      - DBNAME=postfix
      - DBPASS=***
    volumes:
      - /docker/mail:/var/mail
      - /docker/dovecot:/var/lib/dovecot
      - /docker/opendkim:/etc/opendkim/keys
      - /etc/localtime:/etc/localtime:ro
      - /docker/proxy/certs/mail.***.net:/etc/letsencrypt/live/mail.***.net
    networks:
      - mail-db

  postfixadmin:
    image: hardware/postfixadmin
    container_name: postfixadmin
    domainname: ***.net
    hostname: mail
    links:
      - mariadb:mariadb
    environment:
      - VIRTUAL_HOST=***.***.net
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=***.***.net
      - LETSENCRYPT_EMAIL=toobian@***.net
      - DBHOST=mariadb
      - DBUSER=postfix
      - DBNAME=postfix
      - DBPASS=***
    volumes:
      - /etc/localtime:/etc/localtime:ro
    networks:
      - proxy-tier
      - mail-db
  rainloop:
    image: wonderfall/rainloop
    container_name: rainloop
    links:
      - mailserver:mailserver
      - mariadb:mariadb
    environment:
      - VIRTUAL_HOST=webmail.***.net
      - LETSENCRYPT_HOST=webmail.***.net
      - LETSENCRYPT_EMAIL=toobian@***.net
      - VIRTUAL_NETWORK=nginx-proxy
      - VIRTUAL_PORT=80
      - GID=991
      - UID=991
    volumes:
      - /docker/rainloop:/rainloop/data
      - /etc/localtime:/etc/localtime:ro
    networks:
      - proxy-tier
      - mail-db

  mariadb:
    image: mariadb:10.1
    container_name: mariadb
    volumes:
      - /docker/mysql/db:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=***
      - MYSQL_DATABASE=postfix
      - MYSQL_USER=postfix
      - MYSQL_PASSWORD=***
    networks:
      - mail-db

networks:
  proxy-tier:
    external:
      name: nginx-proxy
  mail-db:
    external:
      name: mail-db

from mailserver.

Wonderfall avatar Wonderfall commented on May 19, 2024

Okay, this is interesting because I had similar troubles using docker-compose files second version.
Can't help you, I surrendered!

from mailserver.

hardware avatar hardware commented on May 19, 2024

Postfix is isolated with unix chroot mecanism, so check that the mariadb hostname exist in this file /var/spool/postfix/etc/hosts so that DNS resolution works properly.

from mailserver.

Toobian avatar Toobian commented on May 19, 2024

Ok it's working when i add mariadb hostname and its ip address manually.

from mailserver.

hardware avatar hardware commented on May 19, 2024

It is already the case here : https://github.com/hardware/mailserver/blob/master/rootfs/usr/local/bin/postfix#L7

from mailserver.

Toobian avatar Toobian commented on May 19, 2024

when i check /etc/hosts file, mariadb hostname is missing. For now i just add hostname in /var/spool/postfix/etc/hosts
If i restart container /etc/hosts will be reset, so i loose my modification.

from mailserver.

hardware avatar hardware commented on May 19, 2024

check your docker-compose.yml file syntax, try with version 1.

from mailserver.

hardware avatar hardware commented on May 19, 2024

Fix in c2c8a22

Can you confirm ? docker pull hardware/mailserver

from mailserver.

chmanie avatar chmanie commented on May 19, 2024

Hi, I found this issue while struggling with this in my own setup. Thank you for building this, it's been a great help so far!

I have a question regarding this:

Would it be a problem to run the postfix rewrite service in a non-chroot environment?

I changed the line in postfix' master.cf to

# service type  private unpriv  chroot  wakeup  maxproc command + args
rewrite   unix  -       -       n       -       -       trivial-rewrite

and it did work. Will there be any shortcomings or disadvantages due to this change?

Reading this it seems we might not even need chroot at all when running in an isolated docker environment (in my setup postfix is running in an own container).

from mailserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.