version: '3'
services:
  maddymail:
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - 1panel-network
    ports:
      - "${SMTP_IN_PORT}:25"
      - "${IMAP4_PORT}:143"
      - "${SMTP_S_PORT}:465"
      - "${SMTP_S_PORT2}:587"
      - "${IMAP4_PORT2}:993"
    volumes:
      - maddydata:/data
    environment:
      - MADDY_HOSTNAME=${MAIL_HOSTNAME}
      - MADDY_DOMAIN=${MAIL_DOMAIN}
    image: foxcpp/maddy:0.7.1
    labels:  
      createdBy: "Apps"

volumes:
  maddydata:
    external: true

networks:  
  1panel-network:  
    external: true
