Feature/deploy postfix, dovecot, and both together
I wanted to setup a simple dovecot/postfix based mail server with LetsEncypt certs and liked the idea of using acme.sh. As the deploy script for dovecot was a stub, and there was nothing for postfix, I made some using the vsftpd deploy hook as a template.
this also seems to help #285 and #798
one docker build still shows as queued, but cirrus ci says it finished in 8 minutes? https://cirrus-ci.com/task/4846212919328768
why both together ? I don't like it.
basically, for when both services use the same hostname (i.e., on a single-server setup using something like mail.example.com instead of imap. and smtp.). discussions on best practice aside, one deploy script with one cert is convenient in this case.
you can set multiple deploy hooks for a single cert:
acme.sh --deploy -d example.com --deploy-hook postfix --deploy-hook dovecot
you don't need to make them together.
awesome, thanks for the info! somehow i missed that.
I think it would be better to use doveconf, doveadm, postconf etc
For exampe:
# returns dovecot.conf path
doveconf -n | head -n 1 | awk '{print $NF}'
# if dovecot running reload after certs are updated
if [ "$(doveadm instance list | awk 'FNR == 2 {print $1F}')" = "yes" ]; then
doveadm reload
fi
etc