Stalwart: Difference between revisions
→Tips and tricks: Auto update TLSA |
→Auto update TLSA records: Update script |
||
| Line 271: | Line 271: | ||
User = "stalwart-mail"; | User = "stalwart-mail"; | ||
Group = "stalwart-mail"; | Group = "stalwart-mail"; | ||
EnvironmentFile = config.age.secrets. | EnvironmentFile = config.age.secrets.gotlsaflare-cloudflare-token.path; | ||
RuntimeDirectory = "stalwart-tlsa"; | RuntimeDirectory = "stalwart-tlsa"; | ||
Environment = [ | |||
DOMAIN="example.org" | |||
SUBDOMAIN="mail" | |||
PORT="25" | |||
ACME_PROVIDER_ID="cloudflare" | |||
]; | |||
}; | }; | ||
| Line 288: | Line 294: | ||
set -eu | set -eu | ||
TLSA_RECORD="_$PORT._tcp.$SUBDOMAIN.$DOMAIN" | TLSA_RECORD="_$PORT._tcp.$SUBDOMAIN.$DOMAIN" | ||
DB_PATH="/var/lib/stalwart-mail/db" | DB_PATH="/var/lib/stalwart-mail/db" | ||
| Line 341: | Line 343: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Adapt the variables <code>DOMAIN</code>, <code>SUBDOMAIN</code>, and <code>PORT</code> according to your needs. The variable <code>ACME_PROVIDER_ID</code> corresponds to the ACME profile name you've setup in the Stalwart webadmin interface. <code>EnvironmentFile</code> points to a file containing the secret Cloudflare api token in the format: TOKEN=12345678[...]. | |||
=== Test mail server === | === Test mail server === | ||