cabanga/coiote-correio

By cabanga

Updated 4 months ago

Coiote Correio is a secure and highly configurable email delivery service

Image
Integration & delivery
Message queues
0

6.7K

cabanga/coiote-correio repository overview

Coiote Correio is a secure and highly configurable email delivery service designed for production environments. It provides rate limiting, anti-bot protection, HTML sanitization, dynamic routes, API keys, and multi-provider SMTP support.

Features

Security
  • Rate limiting per IP/client with Redis, file, or in-memory backends
  • Anti-bot protection using honeypot fields and request-time validation
  • HTML sanitization using HTMLPurifier (XSS prevention)
  • RFC-compliant email validation with DNS record checks
  • Configurable CORS allow-lists
  • API key authentication (optional)
Email Capabilities
  • Dynamic email templates supporting variables ({{name}})
  • Attachments via local path or base64
  • Multiple SMTP providers with TLS/SSL/None
  • Automatic retry with exponential backoff
  • Optional queue system for high-load environments
  • HTML & text with auto text conversion
Flexible Configuration
  • Dynamic API routes
  • Configuration priority: Docker Env, YAML, .env
  • Advanced logging with rotation
  • Health checks and metrics
  • Multi-environment support (dev, staging, production)

Quick Installation (Docker)

Create a file named docker-compose.yml and paste the following content. Make sure to use the latest image version (or download it from the repository): https://github.com/delcioPHP/coiote-correio

version: '3.8'

services:
  coiote-correio:
    image: cabanga/coiote-correio:1.1
    container_name: coiote-correio
    restart: unless-stopped
    ports:
      - "8080:80"
    environment:
      # APP
      - APP_ENV=production
      - APP_DEBUG=false
      - APP_NAME=CoioteCorreio
      - APP_TIMEZONE=Africa/Luanda

      # SMTP
      - SMTP_HOST=smtp.yoursmtp.ao
      - SMTP_PORT=587
      - SMTP_ENCRYPTION=tls
      - SMTP_USERNAME=
      - SMTP_PASSWORD=
      - SMTP_TIMEOUT=30

      # SECURITY
      - API_KEY_ENABLED=false
      - API_KEYS=
      - RATE_LIMIT_ENABLED=true
      - RATE_LIMIT_MAX_REQUESTS=100
      - RATE_LIMIT_PERIOD=3600
      - RATE_LIMIT_STORAGE=memory
      - ANTI_BOT_ENABLED=true

      # CORS
      - CORS_ENABLED=true
      - CORS_ALLOWED_ORIGINS=*
      - CORS_ALLOWED_METHODS=POST,OPTIONS
      - CORS_ALLOWED_HEADERS=Content-Type,Authorization,X-API-Key

      # ROUTES
      - API_ROUTE_ENABLED=true
      - API_BASE_PATH=/api
      - API_ROUTE_PREFIX=/v1
      - API_SEND_ROUTE=/send
      - API_HEALTH_ROUTE=/health

      # LOGGING
      - LOGGING_ENABLED=true
      - LOGGING_LEVEL=info
      - LOGGING_FILE_PATH=/var/log/coiote-logs

      # REDIS (OPTIONAL)
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_PASSWORD=
      - REDIS_DATABASE=0

      # QUEUE CONFIGURATION (OPTIONAL)
      - MAIL_QUEUE_ENABLED=false
      - MAIL_QUEUE_NAME=default
      - MAIL_QUEUE_MAX_ATTEMPTS=3
      - MAIL_QUEUE_RETRY_DELAY=60
      - MAIL_QUEUE_TIMEOUT=30
      - MAIL_QUEUE_WORKERS=2
      - MAIL_QUEUE_PREFIX="coiote_email_queue:"

Start the service:

docker-compose up -d

Basic Usage

Send a Simple Email

curl -X POST http://localhost:8080/api/v1/send   -H "Content-Type: application/json"   -d '{
    "from": {"email": "[email protected]", "name": "Sender"},
    "to": {"email": "[email protected]", "name": "Recipient"},
    "subject": "Email Test",
    "html": "<p>Hello {{name}}, this is a test.</p>",
    "variables": {"name": "Kubanza Nzagi"}
  }'

Tag summary

Content type

Image

Digest

sha256:32910edb6

Size

224.3 MB

Last updated

4 months ago

docker pull cabanga/coiote-correio:1.1