# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "debian/stretch64" config.vm.synced_folder "./", "/vagrant", type: "rsync" config.vm.provision "shell", inline: <<-SHELL # Basic preparations apt-get update # Install postfix DEBIAN_FRONTEND=noninteractive apt-get install -y postfix # Enable and launch postfix systemctl enable postfix.service systemctl start postfix.service # Block port 25 for IPv4 iptables -A INPUT -p tcp --dport 25 -j DROP iptables -A FORWARD -p tcp --dport 25 -j DROP iptables -A OUTPUT -p tcp --dport 25 -j DROP # Block port 25 for IPv6 ip6tables -A INPUT -p tcp --dport 25 -j DROP ip6tables -A FORWARD -p tcp --dport 25 -j DROP ip6tables -A OUTPUT -p tcp --dport 25 -j DROP # Install mailutils (tools to send mail) apt-get install -y mailutils # Invoke script that sends test mails, so we have test data /vagrant/vagrant-util/send-test-mails.sh --LETS-REALLY-DO-THIS-AND-SEND-MAIL # That's it echo "That's it. We're set up. Enjoy your test environment." SHELL end