-local hint="run before: ./vm_remote runit_configure postfix"
-assert "sudo test -f /etc/postfix/$vm_domainname/smtpd/x509/key.pem" hint
-#warn "lors de l'installation Debian, ne sélectionner aucune configuration pour postfix"
+hint="run before: remote/runit-configure $sv"
+assert 'sudo test -f /etc/postfix/$local_domainname/smtpd/x509/key.pem' hint
+
sudo debconf-set-selections <<-EOF
postfix postfix/main_mailer_type select No configuration
EOF
-"$tool"/local/apt-get-install postfix procmail postfix-pcre
+"$tool"/local/apt-get-install postfix procmail postfix-pcre postfix-policyd-spf-perl
"$tool"/local/insserv-remove postfix
+
sudo install -m 640 -o root -g root /dev/stdin /etc/postfix/.gitignore <<-EOF
*.db
EOF
sudo install -d -m 771 -o root -g root \
/etc/postfix/ \
- /etc/postfix/$vm_domainname/ \
- /etc/postfix/$vm_domainname/smtp \
- /etc/postfix/$vm_domainname/smtp/x509 \
- /etc/postfix/$vm_domainname/smtp/x509/ca \
- /etc/postfix/$vm_domainname/smtpd \
- /etc/postfix/$vm_domainname/smtpd/x509 \
- /etc/postfix/$vm_domainname/smtpd/x509/ca
+ /etc/postfix/$local_domainname/ \
+ /etc/postfix/$local_domainname/smtp \
+ /etc/postfix/$local_domainname/smtp/x509 \
+ /etc/postfix/$local_domainname/smtp/x509/ca \
+ /etc/postfix/$local_domainname/smtpd \
+ /etc/postfix/$local_domainname/smtpd/x509 \
+ /etc/postfix/$local_domainname/smtpd/x509/ca
sudo ln -fns \
../crt+crl.self-signed.pem \
- /etc/postfix/$vm_domainname/smtpd/x509/ca/crt.pem
+ /etc/postfix/$local_domainname/smtpd/x509/ca/crt.pem
sudo install -m 400 -o root -g root \
- "$tool"/var/pub/x509/smtpd.$vm_domainname/crt+crl.self-signed.pem \
- /etc/postfix/$vm_domainname/smtpd/x509/crt+crl.self-signed.pem
+ "$tool"/var/pub/x509/smtpd.$local_domainname/crt+crl.self-signed.pem \
+ /etc/postfix/$local_domainname/smtpd/x509/crt+crl.self-signed.pem
sudo install -m 400 -o root -g root \
- "$tool"/var/pub/x509/smtpd.$vm_domainname/crt.pem \
- /etc/postfix/$vm_domainname/smtpd/x509/crt.pem
+ "$tool"/var/pub/x509/smtpd.$local_domainname/crt.pem \
+ /etc/postfix/$local_domainname/smtpd/x509/crt.pem
sudo install -m 400 -o root -g root \
- "$tool"/var/pub/x509/smtpd.$vm_domainname/crt+ca.pem \
- /etc/postfix/$vm_domainname/smtpd/x509/crt+ca.pem
+ "$tool"/var/pub/x509/smtpd.$local_domainname/crt+ca.pem \
+ /etc/postfix/$local_domainname/smtpd/x509/crt+ca.pem
sudo install -m 400 -o root -g root \
- "$tool"/var/pub/x509/smtpd.$vm_domainname/crt+crl.self-signed.pem \
- /etc/postfix/$vm_domainname/smtpd/x509/crt+crl.self-signed.pem
+ "$tool"/var/pub/x509/smtpd.$local_domainname/crt+crl.self-signed.pem \
+ /etc/postfix/$local_domainname/smtpd/x509/crt+crl.self-signed.pem
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/header_checks \
- /etc/postfix/$vm_domainname/header_checks
+ "$tool"/etc/postfix/$local_domainname/header_checks \
+ /etc/postfix/$local_domainname/header_checks
m4 \
- --define=VM_DOMAINNAME="$vm_domainname" \
+ --define=LOCAL_DOMAINNAME="$local_domainname" \
<"$tool"/etc/postfix/aliases.m4 |
sudo install -m 644 -o root -g root /dev/stdin \
/etc/postfix/aliases
/etc/postfix/aliases \
/etc/aliases
cat /dev/stdin "$tool"/etc/postfix/main.cf <<-EOF |
- mydomain = $vm_domainname
+ mydomain = $local_domainname
myorigin = \$mydomain
- myhostname = $vm_hostname.\$mydomain
+ myhostname = $local_hostname.\$mydomain
mail_name = \$myhostname
- mydestination = $vm_hostname \$myhostname \$myorigin
+ mydestination = $local_hostname \$myhostname \$myorigin
EOF
sudo install -m 644 -o root -g root /dev/stdin \
/etc/postfix/main.cf
"$tool"/etc/postfix/master.cf \
/etc/postfix/master.cf
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/smtp/x509/policy \
- /etc/postfix/$vm_domainname/smtp/x509/policy
-sudo postmap hash:/etc/postfix/$vm_domainname/smtp/x509/policy
+ "$tool"/etc/postfix/$local_domainname/smtp/x509/policy \
+ /etc/postfix/$local_domainname/smtp/x509/policy
+sudo postmap hash:/etc/postfix/$local_domainname/smtp/x509/policy
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/smtp/header_checks \
- /etc/postfix/$vm_domainname/smtp/header_checks
+ "$tool"/etc/postfix/$local_domainname/smtp/header_checks \
+ /etc/postfix/$local_domainname/smtp/header_checks
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/smtpd/sender_access \
- /etc/postfix/$vm_domainname/smtpd/sender_access
-sudo postmap hash:/etc/postfix/$vm_domainname/smtpd/sender_access
+ "$tool"/etc/postfix/$local_domainname/smtpd/sender_access \
+ /etc/postfix/$local_domainname/smtpd/sender_access
+sudo postmap hash:/etc/postfix/$local_domainname/smtpd/sender_access
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/smtpd/client_blacklist \
- /etc/postfix/$vm_domainname/smtpd/client_blacklist
-sudo postmap hash:/etc/postfix/$vm_domainname/smtpd/client_blacklist
+ "$tool"/etc/postfix/$local_domainname/smtpd/client_blacklist \
+ /etc/postfix/$local_domainname/smtpd/client_blacklist
+sudo postmap hash:/etc/postfix/$local_domainname/smtpd/client_blacklist
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/smtpd/relay_clientcerts \
- /etc/postfix/$vm_domainname/smtpd/relay_clientcerts
-sudo postmap hash:/etc/postfix/$vm_domainname/smtpd/relay_clientcerts
+ "$tool"/etc/postfix/$local_domainname/smtpd/relay_clientcerts \
+ /etc/postfix/$local_domainname/smtpd/relay_clientcerts
+sudo postmap hash:/etc/postfix/$local_domainname/smtpd/relay_clientcerts
sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/transport \
- /etc/postfix/$vm_domainname/transport
-sudo postmap hash:/etc/postfix/$vm_domainname/transport
-sudo install -m 640 -o root -g root \
- "$tool"/etc/postfix/$vm_domainname/virtual_alias \
- /etc/postfix/$vm_domainname/virtual_alias
-sudo postmap hash:/etc/postfix/$vm_domainname/virtual_alias
+ "$tool"/etc/postfix/$local_domainname/transport \
+ /etc/postfix/$local_domainname/transport
+sudo postmap hash:/etc/postfix/$local_domainname/transport
+sudo postmap hash:/etc/postfix/$local_domainname/virtual_alias
+sudo postmap hash:/etc/postfix/cyclocoop.org/virtual_alias
sudo install -d -m 770 -o root -g root \
/etc/skel/etc/mail \
/etc/skel/var/cache/mail \