Thanks for the feedback and I am happy to hear you got it working.
The script assumes that .acme.sh folder is outside the /opt/letsencrypt directory if I understood what maybe failed with the cp. I had observed that acme.sh when run or updated over time tends to chmod the domain directory and sometimes the ~/.acme.sh directory back to 700. I run the acme.sh script as a different user than zimbra. As a result, I isolated that acme.sh directory and have my script copy it under /opt/letsencrypt before zmcertmgr see the certs. Should zimbra not have all the permissions, it is possible to trip this Bug 107454
with /opt/zimbra/bin/zmcertmgr and leave the installation broken until you fix the permissions and rerun the script. My less than ideal solution was to cp -r the .acme.sh directory and hopefully avoid the problem.
If you do it all from the zimbra user (retrieve your certs as zimbra and install them), it makes more sense to run acme.sh script from inside the directory (/opt/letsencrypt) as I believe you have. In that case, you could comment out that cp since it isn't necessary because you should never have permission problems.
Note: why do I run acme.sh outside of zimbra and as a different user? Probably because I am too paranoid that acme.sh might have some bug and/or security issue ... or maybe that is how I tested it first and now can't change. Pick one. LOL