I’m updating the outdated certificate manually with “certonly” for mail server. I have two mail domains. So, I run it two times, one for each domain. One of them works fine, everything looks ok in the log and updated certificate works.
But not the second one. Certbot creates a new subdirectory with ‘-0001’ suffix and saves new files there, instead of updating the existing subdirectory. It’s not so good, because I need to edit the .sh script, which updates the .db file in Postfix. But I’ve edited it and tried to update the DB file, but it doesn’t work. At least I see an error when I try to get emails, saying that mail server certificate is outdated.
OK. Then I’ve tried to delete all ‘-0001’ subdirectories from appropriate locations within /etc/letsencrypt/ directory, as well as the “original” subdirectories (i.e. without suffix) for that mail domain. Then I run the certbot again. Now it has created the subdirectory without any suffix, and my mail server is working again.
So, my question is: what could be the reason of such ‘-0001’ suffix creation? Why it has occured for one domain only? How to avoid such problem in future?
My certbot version is 0.31.0-1 on Debian 10.