command module
v0.13.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: unknown License: LGPL-3.0 Imports: 21 Imported by: 0


``` _________ ______ ______ /________ _________ / _ __ /_ __ \_ | / / _ \_ / / /_/ / / /_/ /_ |/ // __/ / \__,_/ \____/_____/ \___//_/ ```

Go Report Card Go Reference

dovel development home

Welcome! This is the git repository of the project, here you'll find the go code for the SMTP server.


General instructions can be found on the git index page, to keep track of patches or bug reports use the mail link on the header of this page.

Thank you for taking your time.



server is a SMTP server that is simple to setup and use.

The binary is the main server, it is configured using a single config file which should be located in ~/.config/dovel/config.json. This server is responsible to receive your emails and save them according to your hooks.

The structure of this config file is Config. See that doc for more info.

Setting up your email server

Email works in a complex way, DNS records must match your server's configuration. This guide will try to give more detailed information in comparison with the website tutorial.

An email server typically listens on ports 25, 2525, 587 or 465 for mail exchange. But their use differ:

  • 25: is the original SMTP port and first to be official by RFC.
  • 465: is marked as deprecated.
  • 587: is also official by RFC, this port is used for TLS encrypted mail.

The current recomendation is to use port 586. Dovel works with any port, and the value must be set in the port field of the config file. To configure this server see Config.

To receive email only the MX record is enough. Everytime dovel receives an email it searches for an executable file in $XDG_CONFIG_DIR/dovel/hooks/ named receive-DOMAIN, for the DOMAIN receiving the email and executes it passing the email in mbox format as standard input. Then it is up to the script to decide what to do. See the scripts repo for examples.


A simple hook is a shell script that simply concatenates the received email to a .mbox file, e.g. to receive email for your domain create a file named receive-<DOMAIN> in the hooks folder with the following content:

cat > ~/mail/dovel.mbox

Be sure to make the file executable.

Configuring DNS records

To receive emails you need to setup the MX record in your domain registrar, sending email is more complicated, some receiving servers only need the SPF and PTR records, some also need DKIM and DMARC, adjust according to your needs. Configuring DNS records is not the goal of this doc.

DKIM configuration

DKIM in dovel is handled in a per-user basis only for sending emails, for receiving emails it is up to the corresponding hook. This means that each user have to setup its DKIM key. Luckily this is simply pointing the key path in the User struct.

Sending email

Dovel also sends email, for that it needs a valid VaultFile path on the config. That means you need at least one user descrived on the json file. The format of that file is a JSON array of the User struct.

Dovel is listening to connections on the port specified in the config file use any email client to communicate with dovel. When an email comes from the domain configured Dovel will check if the sending user is valid using the Vault interface, in positive case the email is sent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL