<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><div>This will work a lot better: <br>ssl_cert = </etc/dovecot/private/dovecot.pem<br>ssl_key = </etc/dovecot/private/dovecot.pem<br><br></div><div>The private/ directory path was missing<br>
</div></div></div></div>
</blockquote></div><br><div>Sorry for the noise on the list. It seems that none of the
solutions I proposed was good. The CA cert for dovecot is not the right
one.<br></div>Is this a known error ? It seems there is no script for dovecot certificates yet.<br><br></div><div class="gmail_extra">I made a quick fix with<br>ssl_cert = </etc/dovecot/private/dovecot.crt<br>ssl_key = </etc/dovecot/private/dovecot.key<br>
<br></div><div class="gmail_extra">and the following script based on the ./scripts/MAIL_SERVER/30-certs<br><br></div><div class="gmail_extra"><br>./scripts/MAIL_SERVER/31-certs<br><br>#!/bin/bash<br>#<br># Create a self-signed certificate for dovecot and switch on TLS.<br>
#<br>## Create certificate:<br><br>DIR=/etc/dovecot/private<br>CERT=$DIR/dovecot.crt<br>KEY=$DIR/dovecot.key<br><br># valid for ten years:<br>DAYS=3650<br><br>if [ -f $target/$CERT ] && [ -f $target/$KEY ]; then<br>
echo "$CERT and $KEY exists, exiting!"<br> exit 0<br>fi<br><br>SSLEAY="$(tempfile -m600 -pexi)"<br><br>cat > $target/$SSLEAY <<EOF<br>RANDOM=/dev/random<br>[ req ]<br>default_bits = 1024<br>
default_keyfile = dovecot.key<br>distinguished_name = req_distinguished_name<br>x509_extensions = v3_req<br>prompt = no<br>[ req_distinguished_name ]<br>O = Debian-LAN IMAP server<br>OU = Automatically-generated IMAP SSL key<br>
CN = mainserver.intern<br>emailAddress = postmaster@mail.intern<br>[ v3_req ]<br>nsCertType = server<br>subjectAltName=DNS:mainserver.intern,DNS:mainserver,DNS:mail.intern,DNS:mail,DNS:localhost<br>EOF<br><br>$ROOTCMD openssl req -config $SSLEAY -x509 -newkey rsa:1024 -keyout $KEY -out $CERT -days $DAYS -nodes<br>
rm -f $SSLEAY<br><br>$ROOTCMD chown root:dovecot $KEY $CERT<br>$ROOTCMD chmod 640 $KEY $CERT<br><br></div></div>