'Dovecot SSL path for email server behind nginx reverse proxy

it's my first post here although I've been lurking since my IT career started. My issue is as follows:

I have got a separate VM running an email server and separate VM for nginx reverse proxy that also handles SSL.

On the email server dovecot.conf wants the path to the ssl cert and key but that's on another server. See below:

Dovecot config
Note that in the dovecot conf, you can use:
%u for username
%n for the name in [email protected]
%d for the domain
%h the user's home directory

If you're not a brainlet, SSL must be set to required.

ssl = required
ssl_cert = </etc/letsencrypt/live/my.domain/fullchain.pem <-- I need to point this to the nginx proxy
ssl_key = </etc/letsencrypt/live/my.domain/privkey.pem <-- I need to point this to the nginx proxy
ssl_min_protocol = TLSv1.2

What's the solution to this? I couldn't find anything concrete. I know nginx has a mail plugin but the dovecot config wants a path and won't start without one. Is making a share on the nxing, making a symbolic link and then mounting that share on email server even a good solution?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source