X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Fdovecot%2Fconfigure.sh;fp=etc%2Fsv%2Fdovecot%2Fconfigure.sh;h=b1aa08db05348c56e15990e87ad97450691e175c;hb=b27661cf8e40872543f86a00922d18573ef83612;hp=0000000000000000000000000000000000000000;hpb=7c02698fa11a13fd332c2e95986339241aaa79a6;p=lhc%2Fateliers.git diff --git a/etc/sv/dovecot/configure.sh b/etc/sv/dovecot/configure.sh new file mode 100644 index 0000000..b1aa08d --- /dev/null +++ b/etc/sv/dovecot/configure.sh @@ -0,0 +1,26 @@ +rule apt_get_install dovecot-imapd dovecot-managesieved dovecot-sieve +rule insserv_remove dovecot +local hint="run vm_remote dovecot_key_send before" +assert "sudo test -f /etc/dovecot/\"$vm_domainname\"/imap/x509/key.pem" hint +sudo install -m 400 -o root -g root \ + "$tool"/var/pub/x509/imap."$vm_domainname"/crt+crl.self-signed.pem \ + /etc/dovecot/"$vm_domainname"/imap/x509/crt+crl.self-signed.pem +sudo install -d -m 770 -o root -g root \ + /etc/skel/etc/mail \ + /etc/skel/etc/sieve +sudo install -d -m 1777 -o root -g root \ + /var/lib/dovecot-control \ + /var/lib/dovecot-index +m4 \ + --define=VM_DOMAINNAME=$vm_domainname \ + <"$tool"/etc/dovecot/local.conf.m4 | +sudo install -m 644 -o root -g root /dev/stdin \ + /etc/dovecot/local.conf +sudo install -m 755 -o root -g root /dev/stdin /usr/local/bin/dovecot-passwd <<-EOF + #!/bin/sh -efux + # DESCRIPTION: permet à un-e utilisateurice d'initialiser ellui-même son mot-de-passe dovecot. + install -d -m 770 ~/etc/dovecot + install -m 640 /dev/stdin ~/etc/dovecot/passwd <<_EOF + \$USER:\$(/usr/bin/doveadm pw -s SHA512-CRYPT)::::::: + _EOF + EOF