docker-compose.yml

 1services:
 2  greenmail:
 3    image: greenmail/standalone:2.1.3
 4    environment:
 5      GREENMAIL_OPTS: >-
 6        -Dgreenmail.setup.test.all
 7        -Dgreenmail.hostname=0.0.0.0
 8        -Dgreenmail.auth.disabled
 9        -Dgreenmail.verbose
10    ports:
11      - "3025:3025"   # SMTP
12      - "3110:3110"   # POP3
13      - "3143:3143"   # IMAP
14      - "3465:3465"   # SMTPS (implicit TLS)
15      - "3993:3993"   # IMAPS (implicit TLS)
16      - "3995:3995"   # POP3S
17      - "8080:8080"   # REST API
18    # greenmail/standalone image lacks wget/curl, so we can't run an
19    # in-container healthcheck. Wait externally:
20    #   until curl -sf http://127.0.0.1:8080/api/service/readiness; do sleep 1; done