Hostname is invalid even though it is correct in webmin?

Please fill out the fields below so we can help you better.

My domain is:

I ran this command: /

It produced this output: /

My operating system is (include version): raspbian 7 wheezy

My web server is (include version): dovecot (mail) 2.1.7

My hosting provider, if applicable, is: myself

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): sometimes webmin 1.810

I am trying to send mails but the iMac default mail programm says that it’s an invalid cert (valid till nov 2016) because the hostname is wrong. I am using the mail and created the cert using Webmin for the domain How can I fix it? It’s important because gmail says that they couldnt check if its spam or not (probs because of the cert) and most of the email providers (like just ignore the mail and dont even put it in the spam.

My first guess is that you haven't got the correct cert in your config.

Typically in /etc/dovecot/conf.d/10-ssl.conf you would need

ssl_cert = </etc/letsencrypt/live/
ssl_key = </etc/letsencrypt/live/

If that doesn't fix it - what do you have in your config ?

Dovecot is an IMAP/POP3 daemon. You also use it to send mail?

Anyway, your iMac default mail program checks the value you’ve entered into the hostname field for your outgoing mail server against the hostname(s) in the certificate. This can be different than the domain name your email address contains. I.e.: you can have a email address like which is send through

@Osiris Oops I forgot to mention postfix
@serverco Sry forgot to edit posfix config
kay looks like it’s using the correct cert now. I just requested one for mail. www. and @ but now Thunderbird says it couldn’t verify whether letsencrypt is a trusted authority. Issuer unknown :confused:

Thunderbird can send (SMTP/Postfix) and receive (IMAP/Dovecot) e-mail… What part of the Thunderbird usage is not working?

Have you used the correct PEM file in the corresponding configurations? (i.e.: fullchain.pem)

Like I said, Thunderbird says the Issuer of the cert is unknown. Both ways, receive and send.

I'll repeat myself, because I'm very sure this is your problem (just checked with openssl s_client):

I’ll look, sorry. Not really sure what you mean with that

Clients will need the complete chain leading up to a root certificate. So serving only cert.pem will get you in trouble, because the client won’t accept the intermediate certificate as an “end point” (because it isn’t a root certificate and therefore the client doesn’t know and accept it). When you’re using (in your case) fullchain.pem (which is just cert.pem and chain.pem in one file), the server will send both those certificates to the client… And now the client can “build” a chain completely up to the root certificate, which it knows and accepts.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.