If you're using Debian or Ubuntu, chasquid can be installed by running
sudo apt install chasquid.
To get, build and install the source, you will need a working Go environment.
# Get the code and build the binaries. go get blitiri.com.ar/go/chasquid cd "$GOPATH/src/blitiri.com.ar/go/chasquid" make # Install the binaries to /usr/local/bin. sudo make install-binaries # Copy the example configuration to /etc/chasquid and /etc/systemd, and create # the /var/lib/chasquid directory. sudo make install-config-skeleton
The configuration is in
/etc/chasquid/ by default, and has the following
- chasquid.conf Main config file. - domains/ Domains' data. - example.com/ - users User and password database for the domain. - aliases Aliases for the domain. ... - certs/ Certificates to use, one dir per pair. - mx.example.com/ - fullchain.pem Certificate (full chain). - privkey.pem Private key. ...
Note the certs/ directory layout matches the one from certbot,
default client, so you can just symlink
Make sure the user you use to run chasquid under ("mail" in the example config) can access the certificates and private keys.
You can add users with:
chasquid-util user-add user@domain
This will also create the corresponding domain directory if it doesn't exist.
chasquid-util print-config to parse your configuration and display the
smtp-check yourdomain.com, it will check:
It needs to access port 25, which is often blocked by ISPs, so it's likely that you need to run it from your server.
chasquid supports running a post-DATA hook, which can be used to perform greylisting, and run anti-spam and anti-virus filters.
The hook should be at
The one installed by default is a bash script supporting:
To use them, they just need to be available in your system.
For example, in Debian you can run the following to install all three:
apt install greylistd spamc clamdscan usermod -a -G greylist mail
Note that the default hook may not work in all cases, it is provided as a practical example but you should adjust it to your particular system if needed.