<VirtualHost *:80>
ServerName mail.domain.tld
RedirectPermanent http://mail.domain.tld https://mail.domain.tld/rspamd/
</VirtualHost>
<VirtualHost *:443>
ServerName mail.domain.tld
RedirectPermanent https://mail.domain.tld https://mail.domain.tld/rspamd/
###
### Rspamd
###
RewriteEngine on
RewriteRule ^/rspamd$ /rspamd/ [R]
ProxyPreserveHost On
ProxyPass /rspamd http://localhost:11334/
ProxyPassReverse /rspamd http://localhost:11334/
SSLEngine on
SSLHonorCipherOrder on
SSLCertificateFile /etc/letsencrypt/live/domain.tld-0002/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld-0002/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>