Page MenuHomeDevCentral

Share /var/certificates/<domain> for all mail services
Needs ReviewPublic

Authored by dereckson on Tue, Sep 23, 17:14.
Tags
None
Referenced Files
F11803876: D3712.id.diff
Tue, Sep 23, 22:15
F11803846: D3712.id.diff
Tue, Sep 23, 22:11
F11803816: D3712.id9606.diff
Tue, Sep 23, 22:06
F11803498: D3712.id9606.diff
Tue, Sep 23, 21:41
F11803490: D3712.diff
Tue, Sep 23, 21:37
F11803333: D3712.diff
Tue, Sep 23, 21:15
Subscribers
None

Details

Summary

On the mail server, 4 applications interact with mail.nasqueron.org
certificates, including private key:

  • acme.sh to generate and renew
  • nginx for HTTPS
  • dovecot for IMAPS and POPS
  • postfix for SMTP with STARTTLS

While Postfix and nginx seems happy to read, Dovecot seems to read it
after the privilege drop. In such scenario, it makes sense to share
/var/certificates/mail.nasqueron.org among the mail group.

The permissions and ownership of any /var/certificates subfolder can so:

  • regular case: acme:0 700
  • shared group: acme:<group> 750

Finally, only postfix is added to the mail group during installation,
so we explicitly need to set the list of users to include acme and dovecot.

This change doesn't alter any nginx behavior: nginx will still read
the private key as root before dropping privileges.

Ref T2132 to allow Dovecot to read certificate
Ref T2403 for /var/certificates management

Test Plan

Deploy to hervil, should match current configuration

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
acme-var-certificates
Build Status
Buildable 5949
Build 6231: arc lint + arc unit