I’m using certbot on my proxy server to generate certificates. I currently have a shell script which rsyncs these to locations where i need them. the mailcow sni configuration indicates to use the cert files and should not be a symb link. This makes things a little complicated as the full chain and the key pem files need to be renamed from the generated cert from certbot. from what i can tell the postfix container is looking for cert.pem for the fullchain.pem from certbot and key.pem for the privkey.pem file from certbot. So in my script to update certs i’m having to rename the files when putting them in their destination. Is there an easier way to do this in mailcow to specify the filename of the cert so i dont have to have the script rename them?
English
customize cert names
Just rename them during copy process. I have automated this with ansible.
Have something to say?
Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!
- Edited
Afaik. with rsync you can just provide the correct name in the destination part:
Example:
rsync /path/to/original_name.txt /path/new/my_new_file_name.txt
On the other hand, if you already have a script in place that does everything automatically, why change it? The computer doesn’t really care how many commands the script contains, it won’t break a sweat over a few extra lines.
thank you, yeah i considered this but i was pushing them over to the other server in a specific folder with specific rights, and then that server was grabbing them with another script. i may just go that route.