linux: error when trying to create a self-signed certificate for my mail server

I'm setting up my mail server and when I try to create a self-signed SSL certificate, something happens.
Error given by the dovecot mkcert.sh script

When I ran the script for the first time, an error occurred which was not created / etc / dovecot / ssl and I just created the directory using mkdir. Then, when I ran the script again, the given error appeared.

Any help is really appreciated.