Cert install is failing letsencrypt. MIAB up to date


#1

Mail-in-a-Box uses Let’s Encrypt to provision free certificates
to enable HTTPS connections to your box. You’ll now be asked to agree
to Let’s Encrypt’s terms of service.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Registering without email!


Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory


(A)gree/©ancel: (A)gree/©ancel: An unexpected error occurred:
Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.26.1’, ‘console_scripts’, ‘certbot’)()
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 1364, in main
return config.func(config, plugins)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 721, in register
_determine_account(config)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 520, in _determine_account
config, account_storage, tos_cb=_tos_cb)
File “/usr/lib/python3/dist-packages/certbot/client.py”, line 182, in register
regr = perform_registration(acme, config, tos_cb)
File “/usr/lib/python3/dist-packages/certbot/client.py”, line 207, in perform_registration
tos_cb)
File “/usr/lib/python3/dist-packages/acme/client.py”, line 777, in new_account_and_tos
_assess_tos(self.client.directory.meta.terms_of_service)
File “/usr/lib/python3/dist-packages/acme/client.py”, line 768, in _assess_tos
check_tos_cb(tos)
File “/usr/lib/python3/dist-packages/certbot/main.py”, line 498, in _tos_cb
cli_flag="–agree-tos", force_interactive=True)
File “/usr/lib/python3/dist-packages/certbot/display/util.py”, line 223, in yesno
no=_parens_around_char(no_label)))
File “/usr/lib/python3/dist-packages/certbot/display/util.py”, line 90, in input_with_timeout
raise EOFError
EOFError
Please see the logfiles in /var/log/letsencrypt for more details.

TLS Certificate Installation
There is a problem with the certificate file: Unsupported PEM object type: CERTIFICATE REQUEST

certbot.errors.MissingCommandlineFlag: You should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.

Can’t create account at letsencrypt because can’t use email. Please advise.


#2

I’ve started receiving these errors too.
Possibly due to @JoshData changing from his custom script to Certbot in the latest MIAB?


#3

With all due respect OP, it is not really necessary to have three threads with the same issue.


#4

Looking thru my bash history the following is a close to what I have attempted to fix the issue. No change.

sudo su -

curl -s https://mailinabox.email/setup.sh | sudo bash
cd mailinabox/management/
./ssl_certificates.py
exit
sudo ./ssl_certificates.py
cd
sudo reboot
sudo su -
sudo apt-get update && sudo apt-get upgrade -y
cd mailinabox/management/
sudo ./ssl_certificates.py


#5

i do not see

sudo mailinabox


#6

Hi, I’m having the same issue. Had the problem initially in v0.28, have now upgraded to v0.29 and that didn’t resolve it.
running sudo mailinabox gets me the following:

Primary Hostname: aaaa.aaaa.aa
Public IP Address: xx.xxx.xxx.xxx
Public IPv6 Address: xxxx:xxxx:xxx:xxxx::xxxx
Mail-in-a-Box Version: v0.29

Updating system packages…
Installing system packages…
Initializing system random number generator…
Firewall is active and enabled on system startup
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
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)…

Your Mail-in-a-Box is running.

And running management/ssl_certificates.py gets

Provisioning TLS certificates for subdomain1, subdomain2, subdomain3
error: subdomain1, subdomain2, subdomain3:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
You should register before running non-interactively, or provide --agree-tos and --email <email_address> flags.

Anyone have any ideas?


#7

Remove the contents of the /home/user-data/ssl/ directory – CONTENTS ONLY, not the directory itself. Then do sudo mailinabox


#8

Yup, that fixed it. Thanks a lot:)