Skip to content

Instantly share code, notes, and snippets.

@alexgalkin
Created February 2, 2018 20:04
Show Gist options
  • Save alexgalkin/ca721a348746285967a82e70f9bf5de4 to your computer and use it in GitHub Desktop.
Save alexgalkin/ca721a348746285967a82e70f9bf5de4 to your computer and use it in GitHub Desktop.

Docker for mail

mkdir -p config touch config/postfix-accounts.cf docker run --rm
-e MAIL_USER=[email protected]
-e MAIL_PASS=password1
-ti tvial/docker-mailserver:latest
/bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf

docker run -p 25:25 -e maildomain=mail.example.com -e smtp_user=alex:password,hello:hello --name postfix-local -d catatnight/postfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment