No description
  • Python 98.4%
  • Mako 1.6%
Find a file
2025-12-11 16:54:45 +01:00
app Alembic Baseline 2025-12-11 16:54:45 +01:00
migrations Alembic Baseline 2025-12-11 16:54:45 +01:00
.gitignore Python repository created 2025-12-11 12:06:33 +01:00
alembic.ini Alembic Baseline 2025-12-11 16:54:45 +01:00
docker-compose.yml Initial Source code version 2025-12-11 12:07:17 +01:00
poetry.lock Alembic Baseline 2025-12-11 16:54:45 +01:00
pyproject.toml Alembic Baseline 2025-12-11 16:54:45 +01:00
README.md Initial Source code version 2025-12-11 12:07:17 +01:00

Task Queue System v0.3.0

FastAPI + PostgreSQL + RabbitMQ mit produktionsreifen Mail-Prüfungen:

  • MXValidation, SPFValidation, TLSCheck, CertValidity, MTASTSCheck, TLSRPTCheck
  • Task-Abhängigkeiten: z.B. TLS & CertValidity warten auf MXValidation
  • TLS-Checks mit STARTTLS (Port 25), TLS-Version/Cipher, Zertifikatsdaten & Gültigkeit
  • MTA-STS (Policy-Datei + TXT-Id) und TLS-RPT (rua)

Quickstart

docker-compose up -d

export DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/tasks"
export RABBITMQ_URL="amqp://guest:guest@localhost/"
export RABBITMQ_EXCHANGE="tasks"
export MAX_RETRIES=3
export DNS_TIMEOUT=3.0; export DNS_LIFETIME=5.0; export SMTP_TIMEOUT=10.0

# API
uvicorn app.api:app --host 0.0.0.0 --port 8000 --reload

# Worker
python -m app.workers.mail_mx_worker
python -m app.workers.mail_spf_worker
python -m app.workers.mail_tls_worker
python -m app.workers.mail_cert_worker
python -m app.workers.mail_mtasts_worker
python -m app.workers.mail_tlsrpt_worker

# CLI
python -m app.cli create-job MailCheck --domain example.com

Tasks & Dependencies

MailCheck
├─ MXValidation (no deps)
├─ SPFValidation (no deps)
├─ TLSCheck (depends on: MXValidation)
├─ CertValidity (depends on: MXValidation)
├─ MTASTSCheck (no deps)
└─ TLSRPTCheck (no deps)

API

  • POST /jobs{ job_type: "MailCheck", domain: "example.com" }
  • GET /jobs/{job_id}

Hinweise

  • Für Produktion: Migrationen mit Alembic.
  • MTA-STS-Datei: https://mta-sts.<domain>/.well-known/mta-sts.txt
  • TLS nur Port 25 (STARTTLS). 465/587 nicht erforderlich laut Anforderung.