So: I really like the new letsencrypt feature but I'm having trouble setting it up correctly.
I have a server with hostname "vps.hostname.nl"
I have a domain "(www.)hostname.nl"
I have dns entries like "mail.hostname.nl", "smtp.hostname.nl"
I've generated a SSL cert through DA for "(www.)hostname.nl" and this works great, however I'm having trouble getting the correct certificate for my email server.
So far I did:
Editting the hostname.nl.san_config file
But this resulted in:
I've also tried:
But this creates certificates for "mail.vps.hostname.nl" and I dont use it with "vps" in the hostname
What am I missing here? I can of course create a certificate manually with the script from letsencrypt but it would be great if the autorenew works!
edit:
directadmin.conf has set:
servername=vps.hostname.nl
letsencrypt=2 (did also try with 1)
force_hostname=hostname.nl
edit2:
Updated my 'old' certificate (also free startssl) so i have a year to figure this out.
I understand that for example the mail server uses the "server certificate", what I don't understand is how to request that. My website is happy running letsencrypt but I cannot try anything right now guess I did to many requests to letsencrypt for now
I have a server with hostname "vps.hostname.nl"
I have a domain "(www.)hostname.nl"
I have dns entries like "mail.hostname.nl", "smtp.hostname.nl"
I've generated a SSL cert through DA for "(www.)hostname.nl" and this works great, however I'm having trouble getting the correct certificate for my email server.
So far I did:
Code:
root@vps:/usr/local/directadmin/scripts# ./letsencrypt.sh request mail.hostname.nl 4096 "" /var/www/html
Domain does not exist on the system. Unable to find mail.hostname.nl in /etc/virtual/domainowners. Exiting...
Editting the hostname.nl.san_config file
Code:
[ SAN ]
subjectAltName=DNS:hostname.nl, DNS:www.hostname.nl, DNS:mail.hostname.nl, DNS:vps.hostname.nl, DNS:ftp.hostname.nl
But this resulted in:
Code:
root@vps:/usr/local/directadmin/scripts# ./letsencrypt.sh renew hostname.nl 4096
Getting challenge for hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for www.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for mail.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is invalid. Details: Invalid response from http://mail.hostname.nl/.well-known/acme-challenge/G1ehsT-6M9[..]T5Q [ip.ip.ip.ip]: 404. Exiting...
I've also tried:
Code:
root@vps:/usr/local/directadmin/scripts# ./letsencrypt.sh request vps.hostname.nl 4096
Setting up certificate for a hostname: vps.hostname.nl
Generating 4096 bit RSA key for let's encrypt account...
openssl genrsa 4096 > "/usr/local/directadmin/conf/letsencrypt.key"
Generating RSA private key, 4096 bit long modulus
...
Account has been registered.
Getting challenge for vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for www.vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for mail.vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for ftp.vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for pop.vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Getting challenge for smtp.vps.hostname.nl from acme-server...
Waiting for domain verification...
Challenge is valid.
Generating 4096 bit RSA key for vps.hostname.nl...
openssl genrsa 4096 > "/usr/local/directadmin/conf/cakey.pem.new"
Generating RSA private key, 4096 bit long modulus
..
DirectAdmin certificate has been setup.
Setting up cert for Exim...
Setting up cert for WWW server...
Setting up cert for FTP server...
The services will be retarted in about 1 minute via the dataskq.
Certificate for vps.hostname.nl has been created successfully!
But this creates certificates for "mail.vps.hostname.nl" and I dont use it with "vps" in the hostname
What am I missing here? I can of course create a certificate manually with the script from letsencrypt but it would be great if the autorenew works!
edit:
directadmin.conf has set:
servername=vps.hostname.nl
letsencrypt=2 (did also try with 1)
force_hostname=hostname.nl
edit2:
Updated my 'old' certificate (also free startssl) so i have a year to figure this out.
I understand that for example the mail server uses the "server certificate", what I don't understand is how to request that. My website is happy running letsencrypt but I cannot try anything right now guess I did to many requests to letsencrypt for now

Last edited: