SMTP, IMAP, & DNS Infrastructure
Getting infrastructure deployed and configured correctly has been one of the most time consuming things when demonstrating the cybersecurity attack chain.
Option 1 - Build a Docker Container
The primary goal was to deploy this in a Docker container. Reason being it is infrstructure that is not needed all the time, and may need to move from a laptop, to Google Cloud Platform, to Azure, etc.
Get it here, https://github.com/freshdemo/mailanddns.
Option 2 - Build Your Own
You can easily interpret the Dockerfile to deploy all of the software and configurations manually on a host.
Option 3 - Run the Built Container
From a security perspective it is not a great idea to use an already built container as you have no idea how it was built or if any backdoor or data exfiltration configurations are pre-built. This container is automatically being built on Docker Hub any time a commit is made to GitHub, so what you see is what you get.
docker pull freshdemo/mailanddns
docker run -h example.com -p 2225:25 -p 993:993 -p 53:53/udp --dns 127.0.0.1 -d