Simple postfix smtp to use as relayhost to gmail, mailgun and more.
docker run --rm -d --name postfix \
-e RELAY_USER=postmaster@domain \
-e RELAY_PASS=xxxxxxxxx \
-e RELAY_HOST=smtp.mailgun.org \
-e RELAY_PORT=587 \
eftechcombr/postfix:latest
version: '3.2'
services:
relay:
image: eftechcombr/postfix:latest
restart: unless-stopped
volumes:
- postfix-volume:/var/spool/postfix
ports:
- "30025:25"
env_file: ./.env
volumes:
postfix-volume:
echo "Email Test" | mail -s "This is a simple test" [email protected]
or
sendmail -f [email protected] [email protected]
From: Sender Name <[email protected]>
Subject: Amazon SES Test
This message was sent using Amazon SES.
.
Use https://www.mail-tester.com tool for debug
Enjoy!