mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-26 09:52:38 +08:00
refactor: modularize IMAP server with fixes and E2E tests - Modularize IMAP server into imap_server, imap_mailbox, imap_message, imap_http_client, parse_email, config, models - Support dual login: JWT token and address+password via backend - Add STARTTLS support with configurable TLS cert/key - Fix FETCH/STORE returning UID instead of sequence number (RFC 3501) - Implement IMessageFile.open() for correct BODY[] raw MIME delivery - Add UIDNEXT to SELECT response via _cbSelectWork override - Use per-restart UIDVALIDITY to force client resync - Pass raw MIME to SimpleMessage for accurate RFC822.SIZE - Fix SENT mailbox returning empty source - Handle CREATE command gracefully for Thunderbird compatibility - Add IMAP E2E tests: auth, LIST, SELECT, STATUS, FETCH, SEARCH, STORE, UID FETCH, BODY[] integrity, size, seq numbers, SENT mailbox - Add SMTP E2E tests using nodemailer: send plain/HTML, auth failure, sendbox verification - Add sendTestMail helper using admin/send_mail Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
services:
|
|
mailpit:
|
|
image: axllent/mailpit:v1.29
|
|
ports:
|
|
- "1025:1025"
|
|
- "8025:8025"
|
|
|
|
worker:
|
|
build:
|
|
context: ..
|
|
dockerfile: e2e/Dockerfile.worker
|
|
ports:
|
|
- "8787:8787"
|
|
depends_on:
|
|
- mailpit
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-sf", "http://localhost:8787/health_check"]
|
|
interval: 3s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 20
|
|
|
|
frontend:
|
|
build:
|
|
context: ..
|
|
dockerfile: e2e/Dockerfile.frontend
|
|
ports:
|
|
- "5173:5173"
|
|
depends_on:
|
|
worker:
|
|
condition: service_healthy
|
|
|
|
smtp-proxy:
|
|
build:
|
|
context: ../smtp_proxy_server
|
|
dockerfile: dockerfile
|
|
ports:
|
|
- "11025:8025"
|
|
- "11143:11143"
|
|
environment:
|
|
PROXY_URL: http://worker:8787
|
|
PORT: "8025"
|
|
IMAP_PORT: "11143"
|
|
depends_on:
|
|
worker:
|
|
condition: service_healthy
|
|
|
|
e2e-runner:
|
|
build:
|
|
context: ..
|
|
dockerfile: e2e/Dockerfile.e2e
|
|
environment:
|
|
WORKER_URL: http://worker:8787
|
|
FRONTEND_URL: http://frontend:5173
|
|
MAILPIT_API: http://mailpit:8025/api
|
|
SMTP_PROXY_HOST: smtp-proxy
|
|
SMTP_PROXY_IMAP_PORT: "11143"
|
|
CI: "true"
|
|
depends_on:
|
|
worker:
|
|
condition: service_healthy
|
|
frontend:
|
|
condition: service_started
|
|
smtp-proxy:
|
|
condition: service_started
|
|
volumes:
|
|
- ./test-results:/app/e2e/test-results
|
|
- ./playwright-report:/app/e2e/playwright-report
|