sudo debconf-set-selections <<-EOF
postfix postfix/main_mailer_type select No configuration
EOF
-rule apt_get_install postfix procmail
+#rule apt_get_install postfix procmail
rule insserv_remove postfix
sudo install -m 640 -o root -g root /dev/stdin /etc/postfix/.gitignore <<-EOF
*.db
sudo install -m 640 -o root -g root \
"$tool"/etc/postfix/$vm_domainname/header_checks \
/etc/postfix/$vm_domainname/header_checks
+m4 <"$tool"/etc/postfix/aliases.m4 |
sudo install -m 644 -o root -g root /dev/stdin \
- /etc/postfix/aliases <<-EOF
- # See man 5 aliases for format
- abuse: root
- admin: root
- contact: root
- mailer-daemon: root
- postmaster: root
- root: $(getent group sudo | cut -f 4 -d : | tr , ' ')
- EOF
+ /etc/postfix/aliases
sudo newaliases -oA/etc/postfix/aliases
+sudo ln -fns \
+ /etc/postfix/aliases \
+ /etc/aliases
cat /dev/stdin "$tool"/etc/postfix/main.cf <<-EOF |
mydomain = $vm_domainname
myorigin = \$mydomain
mail_name = \$myhostname
mydestination = $vm_hostname \$myhostname \$myorigin
EOF
-sudo install -m 640 -o root -g root /dev/stdin \
+sudo install -m 644 -o root -g root /dev/stdin \
/etc/postfix/main.cf
sudo install -m 640 -o root -g root \
"$tool"/etc/postfix/master.cf \