##### ##### This file is part of Mail-in-a-Box-LDAP which is released under the ##### terms of the GNU Affero General Public License as published by the ##### Free Software Foundation, either version 3 of the License, or (at ##### your option) any later version. See file LICENSE or go to ##### https://github.com/downtownallday/mailinabox-ldap for full license ##### details. ##### load '../funcs.rb' Vagrant.configure("2") do |config| config.vm.synced_folder "../../..", "/mailinabox", id: "mailinabox", automount: false config.vm.network "public_network", bridge: "#$default_network_interface" use_preloaded_box config, "ubuntu/jammy64", ".." if ENV['tests']=='ciab' # vanilla connected to ciab (ciab does not need to be up) config.vm.define "vanilla" do |m1| m1.vm.provision :shell, :inline => <<-SH cat >/tmp/provision.sh </dev/null; then # firewall rules aren't added when ciab is down echo "For testing, allow ldaps from anywhere" ufw allow ldaps fi echo "Add smart host alias - so \\$NC_HOST can send mail to/via this host" ( source tests/lib/all.sh rest_urlencoded POST /admin/mail/aliases/add qa@abc.com Test_1234 "address=@\\$NC_HOST" "description=smart-host" "permitted_senders=qa@abc.com" 2>/dev/null echo "\\$REST_HTTP_CODE: \\$REST_OUTPUT" ) EOF chmod +x /tmp/provision.sh /tmp/provision.sh SH end # vanilla connected to ciab else # vanilla (default) install config.vm.define "vanilla" do |m1| m1.vm.provision :shell, :inline => <<-SH cat >/tmp/provision.sh <