SSL cert. for mail.domain.com not working from Let`s encrypt

indexs

Verified User
Joined
Jun 11, 2010
Messages
77
Greeting community!

I have followed this instructions: https://www.directadmin.com/features.php?id=2019

At first Lets encrypt is working for main domain, but i have difficulties with https://mail.domain.com
The problem is that Let`s encrypt dose not replace servers issued SSL and still using servers issued SSL.

Can`t find the configuration template to edit for changes to take place.

I even see that cert is set to use for https://mail.mydomain.com

File:
/etc/dovecot/conf/sni/mydomain.com.conf

Code:
local_name mail.mydomain.com {
  ssl_cert = </usr/local/directadmin/data/users/myuser/domains/mydomain.com.cert.combined
  ssl_key = </usr/local/directadmin/data/users/myuser/domains/mydomain.com.key
}

Any body has any ideas?
 
Hello,

So you have mail.mydomain.com added as a separate domain or sub-domain?

Do you have a paid cert for mydomain.com? And want to use a cert from Let's Encrypt for mail.mydomain.com?

Correct?

In a similar case we customized dovecot to the following view:

Code:
local_name mail.mydomain.com {
  ssl_cert = </usr/local/directadmin/data/users/myuser/domains/mail.mydomain.com.cert.combined
  ssl_key = </usr/local/directadmin/data/users/myuser/domains/mail.mydomain.com.key
}

in a custom.conf file.
 
Hello, zEitEr!

No, all my certificates are generated with Let's Encrypt.
I have decoded my cert (to be shore that i have certs for domains www.domain.com, domain.com, mail.domain.com).

I have checked also "/var/www/html/roundcube/config/config.inc.php" and changed:

from:
$config['smtp_server'] = 'localhost';
to:
$config['smtp_server'] = 'tls://%n';

Also tried to change the TLS port to 465, but nothing...

The problem must be somewhere in exim config...
 
How did you add mail.domain.com into web-server?

- did you add it as a subdomain in directadmin interface?
- did you add it as a domain in directadmin interface?
- did you add it as an alias/pointer?

other? what exactly?
 
SSL fixed for mail.anydomain.com

Well, I have used this tutorial: https://help.directadmin.com/item.php?id=92

While I was writing replay to your post - it hit me!

In year 2016, when I was configuring custom mail.domain.com (for all users), I forgot to add custom configuration for https/ssl.

Just made changes to custom/virtual_host2_secure.conf, added part from /CODE/:
Code:
<VirtualHost |IP|:|PORT_443| |MULTI_IP|>
  	SSLEngine on
	SSLCertificateFile |CERT|
	SSLCertificateKeyFile |KEY|
	|CAROOT|
  ServerName   mail.|DOMAIN|
  ServerAdmin |ADMIN|
  DocumentRoot /var/www/html/roundcube
  CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
  CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
  ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log
</VirtualHost>

Now it`s working!
Thanks for - correct questions asked to me. :)
 
Back
Top