# Ssl\_certificates fails to install cert for box because letsencrypt is picking up the internal address

**URL:** <https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899>\
**Category:** Help with Setup/Upgrade\
**Created:** [May 19, 2025, 6:38pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899 "2025-05-19T18:38:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfrohling](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/tfrohling/32/2705_2.png) [@tfrohling](https://discourse.mailinabox.email/u/tfrohling)\
**Post date:** [May 19, 2025, 6:38pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899/1 "2025-05-19T18:38:27Z")

</div>

The external address is 69.9.15.39 for [box.summertrail.org](http://box.summertrail.org) and the internal address is 10.9.26.107.

Both the custom and external DNS do not have any records for 10.9.26.107. checking external DNS using dig  
produces:

root@box:~/mailinabox/management# dig [box.summertrail.org](http://box.summertrail.org) +trace  
[box.summertrail.org](http://box.summertrail.org). 1799 IN A 69.9.15.39  
[summertrail.org](http://summertrail.org). 1800 IN NS [dns1.registrar-servers.com](http://dns1.registrar-servers.com).  
[summertrail.org](http://summertrail.org). 1800 IN NS [dns2.registrar-servers.com](http://dns2.registrar-servers.com).  
;; Received 123 bytes from 156.154.133.200#53([dns2.registrar-servers.com](http://dns2.registrar-servers.com)) in 44 ms

I don’t get it. Any help here would be appreciated, since I can no longer get any email in.

root@box:~/mailinabox/management# ./ssl\_certificates.py  
skipped: [box.summertrail.org](http://box.summertrail.org):  
The domain name does not resolve to this machine: 10.9.26.107 (A).

skipped: [mta-sts.box.summertrail.org](http://mta-sts.box.summertrail.org):  
The domain has a valid certificate already. (The certificate expires in 73 days on 2025-08-01. Certificate: /home/user-data/ssl/mta-sts.box.summertrail.org-20250801-aa2929af.pem, private key /home/user-data/ssl/ssl\_private\_key.pem)

skipped: [summertrail.org](http://summertrail.org):  
The domain has a valid certificate already. (The certificate expires in 89 days on 2025-08-17. Certificate: /home/user-data/ssl/summertrail.org-20250817-6c195f7f.pem, private key /home/user-data/ssl/ssl\_private\_key.pem)

skipped: [autoconfig.summertrail.org](http://autoconfig.summertrail.org):  
The domain has a valid certificate already. (The certificate expires in 71 days on 2025-07-30. Certificate: /home/user-data/ssl/autoconfig.summertrail.org-20250730-e12600f6.pem, private key /home/user-data/ssl/ssl\_private\_key.pem)

skipped: [autodiscover.summertrail.org](http://autodiscover.summertrail.org):  
The domain has a valid certificate already. (The certificate expires in 89 days on 2025-08-17. Certificate: /home/user-data/ssl/summertrail.org-20250817-6c195f7f.pem, private key /home/user-data/ssl/ssl\_private\_key.pem)

skipped: [mta-sts.summertrail.org](http://mta-sts.summertrail.org):  
The domain has a valid certificate already. (The certificate expires in 72 days on 2025-07-31. Certificate: /home/user-data/ssl/mta-sts.summertrail.org-20250731-b23068af.pem, private key /home/user-data/ssl/ssl\_private\_key.pem)

skipped: [mta-sts.mta-sts.summertrail.org](http://mta-sts.mta-sts.summertrail.org):  
The domain name does not resolve to this machine: [Not Set] (A).

skipped: [www.summertrail.org](http://www.summertrail.org):  
The domain name does not resolve to this machine: 10.9.26.107 (A).

Thanks,  
ted

---

<div class="post-metadata">

**Author:** ![vele](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/v/e5b9ba/32.png) [@vele](https://discourse.mailinabox.email/u/vele)\
**Post date:** [May 19, 2025, 7:03pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899/2 "2025-05-19T19:03:47Z")

</div>

Please rerun the setup. I can ping your public IP and all the ports, so it is not ports.

`curl -s https://mailinabox.email/setup.sh | sudo -E bash`

---

<div class="post-metadata">

**Author:** ![tfrohling](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/tfrohling/32/2705_2.png) [@tfrohling](https://discourse.mailinabox.email/u/tfrohling)\
**Post date:** [May 19, 2025, 7:27pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899/3 "2025-05-19T19:27:31Z")

</div>

Still have a problem. Here is the results of running setup.sh  
root@box:~# chmod 755 ./setup.sh  
root@box:~# ./setup.sh

┌────────────────────────Mail-in-a-Box Installation──────────────────────────┐  
│ Hello and thanks for deploying a Mail-in-a-Box! │  
│ │  
│ I’m going to ask you a few questions. │  
│ │  
│ To change your answers later, just run ‘sudo mailinabox’ from the command │  
│ line. │  
│ │  
│ NOTE: You should only install this on a brand new Ubuntu installation 100% │  
│ dedicated to Mail-in-a-Box. Mail-in-a-Box will, for example, remove │  
│ apache2. │  
│ │  
├────────────────────────────────────────────────────────────────────────────┤  
│ \< OK \> │  
└────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────Hostname───────────────────────────────────┐  
│ This box needs a name, called a ‘hostname’. The name will form a part of │  
│ the box’s web address. │  
│ │  
│ We recommend that the name be a subdomain of the domain in your email │  
│ address, so we’re suggesting [box.summertrail.org](http://box.summertrail.org). │  
│ │  
│ You can change it, but we recommend you don’t. │  
│ │  
│ Hostname: │  
│ ┌────────────────────────────────────────────────────────────────────────┐ │  
│ [│box.summertrail.org](http://xn--box-es4a.summertrail.org) │ │  
│ └────────────────────────────────────────────────────────────────────────┘ │  
├────────────────────────────────────────────────────────────────────────────┤  
│ \< OK \> │  
└────────────────────────────────────────────────────────────────────────────┘

Primary Hostname: [box.summertrail.org](http://box.summertrail.org)  
Public IP Address: 69.9.15.39  
Private IP Address: 10.9.26.107  
Mail-in-a-Box Version: v71a

Updating system packages…  
Installing system packages…  
Initializing system random number generator…  
Opening alternate SSH port 2222.  
Firewall is active and enabled on system startup  
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.  
Executing: /lib/systemd/systemd-sysv-install enable fail2ban  
Installing nsd (DNS server)…  
Installing Postfix (SMTP server)…  
Installing Dovecot (IMAP server)…  
Installing OpenDKIM/OpenDMARC…  
Installing SpamAssassin…  
bayes: synced databases from journal in 0 seconds: 1057 unique entries (1384 total entries)  
Installing Nginx (web server)…  
Installing Roundcube (webmail)…  
Installing Nextcloud (contacts/calendar)…  
Nextcloud is already latest version  
Installing Z-Push (Exchange/ActiveSync server)…  
Installing Mail-in-a-Box system management daemon…  
Installing Munin (system monitoring)…  
updated DNS: OpenDKIM configuration

* * *

Your Mail-in-a-Box is running.

Please log in to the control panel for further instructions at:

[https://69.9.15.39/admin](https://69.9.15.39/admin)

You will be alerted that the website has an invalid certificate. Check that  
the certificate fingerprint matches:

C4:71:54:7F:B9:42:4E:2C:DC:8E:03:D6:74:22:40:1E:29:B3:F1:92:1E:17:62:6A:61:ED:0F:BF:CD:49:64:0C

Then you can confirm the security exception and continue.

But then on the SSL page

[box.summertrail.org](https://box.summertrail.org) Certificate has a problem: The certificate has expired or is not yet valid. It is valid from 2025-02-17 07:20:52 to 2025-05-18 07:20:51.

But then I reran ssl\_certificates.py and lo and behold…

installed: [box.summertrail.org](http://box.summertrail.org), [www.summertrail.org](http://www.summertrail.org):  
Saving debug log to /var/log/letsencrypt/letsencrypt.log  
Requesting a certificate for [box.summertrail.org](http://box.summertrail.org) and [www.summertrail.org](http://www.summertrail.org)

Successfully received certificate.  
Certificate is saved at: /tmp/tmp8mzdvhm3/cert  
Intermediate CA chain is saved at: /tmp/tmp8mzdvhm3/chain  
Full certificate chain is saved at: /tmp/tmp8mzdvhm3/cert\_and\_chain.pem  
This certificate expires on 2025-08-17.  
NEXT STEPS:

- Certificates created using --csr will not be renewed automatically by Certbot. You will need to renew the certificate before it expires, by running the same Certbot command again.

* * *

If you like Certbot, please consider supporting our work by:

- Donating to ISRG / Let’s Encrypt: [Support Encryption for Everyone - Let's Encrypt](https://letsencrypt.org/donate)
- Donating to EFF: [Support EFF's Work on Let's Encrypt | Electronic Frontier Foundation](https://eff.org/donate-le)

* * *

updating primary certificate  
mail services restarted  
web updated

So this looks to be fixed now. Thanks so much for the quick reply and the right fix. Now receiving email from the last two days.

Ted

---

<div class="post-metadata">

**Author:** ![vele](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/v/e5b9ba/32.png) [@vele](https://discourse.mailinabox.email/u/vele)\
**Post date:** [May 19, 2025, 7:47pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899/4 "2025-05-19T19:47:32Z")

</div>

Please don’t run as root next time.

Just use `sudo`.  
You are changing permissions. Why? Anyway.

Good luck!

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [May 26, 2025, 7:47pm UTC](https://discourse.mailinabox.email/t/ssl-certificates-fails-to-install-cert-for-box-because-letsencrypt-is-picking-up-the-internal-address/12899/5 "2025-05-26T19:47:52Z")

</div>

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