Skip to content

Instantly share code, notes, and snippets.

@flash1293
Created September 22, 2015 07:35
Show Gist options
  • Save flash1293/f3e156bcafde241f9efd to your computer and use it in GitHub Desktop.
Save flash1293/f3e156bcafde241f9efd to your computer and use it in GitHub Desktop.
Temporary forwarding mail-server
docker run -p 25:25 --name postfix -d catatnight/postfix
docker exec -it postfix bash
apt-get install postfix-pcre
in /etc/postfix/main.cf
correct myhostname
smtpd_relay_restrictions = check_relay_domains
relay_domains = *list of accepting hosts*
virtual_alias_maps = pcre:/etc/postfix/virtual-regexp
in /etc/postfix/virtual-regexp
/.*@.*/ forwarding@mail.de
To get the relay_domain to accept, in /etc/postfix/master.cf
smtp inet n - n - - smtpd -v <-- the -v is new
and tail -f /var/log/mail.log (there you can see the host when it is trying to send)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment