Sign inSign up

dpcox/python-ses-relay

By dpcox

Updated about 1 month ago

Simple Python script to relay internal SMTP to AWS SES with sender address rewriting.

Image
Networking
0

1.2K

dpcox/python-ses-relay repository overview

Small Docker image with a simple Python script to relay internal SMTP to AWS SES with sender address rewriting.

This is an OPEN RELAY meant to run on a LAN. This will accept any port 25 SMTP mail unauthenticated. It is meant to be placed in a DMZ or behind a firewall.

services:
  python-ses-relay:
    image: dpcox/python-ses-relay:latest
    container_name: python-ses-relay
    restart: unless-stopped
    ports:
      - "25:25"
    cap_add:
      - NET_BIND_SERVICE
    user: "1000:1000"     # optional, run as non-root
    environment:
      SES_HOST: email-smtp.us-east-2.amazonaws.com
      SES_PORT: 587
      SES_USER: "SES_USERNAME"
      SES_PASS: "SES_PASSWORD"
      STATIC_SENDER: "[email protected]"
      VALIDATED_DOMAIN: "example.com"
  • SES_HOST - Amazon SES SMTP host
  • SES_PORT - Port to use to communicate with SES (587=STARTTLS)
  • SES_USER - The username to authenticate to SES with
  • SES_PASS - The password to authenticate to SES with
  • STATIC_SENDER - Sender address to use if original sender isn't in VALIDATED_DOMAIN
  • VALIDATED_DOMAIN - Sender addresses coming from this domain aren't replaced

Tag summary

Content type

Image

Digest

sha256:06d7f5a17

Size

45.5 MB

Last updated

about 1 month ago

docker pull dpcox/python-ses-relay