In commit 3f9d0c0762, we added a new possible private file. If the file exists but there's an error reading it (common for permission issues), currently we just move on to the next file, and if it doesn't exist we may give up with that error. That can "hide" the access problems making them harder to debug. To help with those kinds of errors, this patch updates the logic to return an error if a private key exists but is inaccessible. It also adds an unit test for this function to cover the different scenarios, and updates the docs to match.
2.4 KiB
NAME
chasquid - SMTP (email) server
SYNOPSIS
chasquid [options...]
DESCRIPTION
chasquid is an SMTP (email) server with a focus on simplicity, security, and ease of operation.
It's written in Go, and distributed under the Apache license 2.0.
OPTIONS
-
-config_dir dir
configuration directory (default
/etc/chasquid) -
-config_overrides config
configuration values (in text protobuf format) to override the on-disk configuration with. This should only be needed in very specific cases for deployments where editing the configuration file is not feasible.
-
-alsologtostderr
also log to stderr, in addition to the file
-
-logfile file
file to log to (enables logtime)
-
-logtime
include the time when writing the log to stderr
-
-logtosyslog tag
log to syslog, with the given tag
-
-v level
verbosity level (1 = debug)
-
-version
show version and exit
FILES
The daemon's configuration is by default in /etc/chasquid/, and can be
changed with the -config_dir flag.
Inside that directory, the daemon expects the following structure:
-
chasquid.confMain config file, see chasquid.conf(5).
-
domains/Per-domain configuration.
-
domains/example.com/Domain-specific configuration. Can be empty.
-
domains/example.com/usersUser and password database for this domain.
-
domains/example.com/aliasesAliases for the domain.
-
certs/Certificates to use, one directory per pair.
-
certs/mx.example.com/Certificates for this domain.
-
certs/mx.example.com/fullchain.pemCertificate (full chain).
-
certs/mx.example.com/privkey.pemPrivate key (can also be named
key.pem).
Note the certs/ directory layout matches the one from certbot (client for
Let's Encrypt CA), so you can just symlink certs/ to
/etc/letsencrypt/live.
The layout from the NixOS ACME module (/var/lib/acme) is also supported.
Make sure the user you use to run chasquid under ("mail" in the example config) can access the certificates and private keys.
CONTACT
If you have any questions, comments or patches please send them to the mailing
list, chasquid@googlegroups.com. To subscribe, send an email to
chasquid+subscribe@googlegroups.com.