acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Feature/deploy postfix, dovecot, and both together

Open jordanwiseman opened this issue 6 years ago • 6 comments

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

jordanwiseman avatar Feb 25 '19 05:02 jordanwiseman

one docker build still shows as queued, but cirrus ci says it finished in 8 minutes? https://cirrus-ci.com/task/4846212919328768

jordanwiseman avatar Feb 26 '19 00:02 jordanwiseman

why both together ? I don't like it.

Neilpang avatar Mar 02 '19 12:03 Neilpang

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.

jordanwiseman avatar Mar 04 '19 04:03 jordanwiseman

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.

Neilpang avatar Mar 23 '19 03:03 Neilpang

awesome, thanks for the info! somehow i missed that.

jordanwiseman avatar Mar 23 '19 20:03 jordanwiseman

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

gassan avatar May 18 '20 13:05 gassan