You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
bn4t ee42823c95
Migration to baretools
7 months ago
configs implement persistent receivers 7 months ago
init change docs url of systemd service 7 months ago
internal improve message queue logging 7 months ago
.gitignore Use a configurable mta instead of the own builtin mta (#3) 8 months ago
LICENSE Add license 1 year ago
Makefile only try to add user if the verteilzentrum user doesn't exist 7 months ago
README.md Migration to baretools 7 months ago
go.mod Use a configurable mta instead of the own builtin mta (#3) 8 months ago
go.sum update dependencies 8 months ago
main.go minor refactoring 7 months ago

README.md

Verteilzentrum

A minimalistic mailing list

Verteilzentrum is a minimalistic mailing list following the KISS philosophy.

Features:

  • Single config file
  • Multiple lists
  • Blacklisting
  • Whitelisting
  • Persistent Receivers
  • Configurable publishing rights
  • Sending through an external MTA

Installation

  1. Install golang (>=1.15), gcc, make and build-essential if you don't have them already
  2. Clone the repository: git clone https://github.com/baretools/verteilzentrum.git
  3. Checkout the latest stable tag
  4. Make sure go is in your $PATH and run make build to build the verteilzentrum binary
  5. Run sudo make install to install verteilzentrum on your system. This will create the directories /etc/verteilzentrum (config directory) and /var/lib/verteilzentrum (data directory). Additionally the user verteilzentrum will be created.
  6. If you have systemd installed you can run sudo make install-systemd to install the systemd service. Run service verteilzentrum start to start the verteilzentrum service. Verteilzentrum will automatically run as the verteilzentrum user.

You can make certificates and private key files accessible to the verteilzentrum user with the following command:

setfacl -m u:verteilzentrum:rx <directory_with_certs>

Increasing deliverability

To increase deliverability it is recommended to set up an SPF and DMARC record for the MTA.

How to use

Subscribing to a list

Send an email (content doesn't matter) to subscribe+$list_name. E.g. subscribe+news@lists.example.com.

You will receive a confirmation email that subscribing was successful.

Unsubscribing from a list

Send an email (content doesn't matter) to unsubscribe+$list_name. E.g. unsubscribe+news@lists.example.com.

You will receive a confirmation email that unsubscribing was successful.

Config

By default the config is located at /etc/verteilzentrum/config.toml.

General options

logging

The logging level for verteilzentrum. Can be one of the following:

  • DEBUG => Everything is logged
  • INFO => Everything is logged except debug messages
  • ERROR => Only errors are logged

bind_to

The address including port on which the server should listen for non tls connections. Listens by default on 0.0.0.0:25.

bind_to_tls

The address including port on which the server should listen for tls connections. Can be left empty if no tls certificates are configured.

Listens by default on 0.0.0.0:465.

hostname

The hostname of the list server. If you specify a TLS certificate it has to be valid for this hostname.

read_timeout

SMTP read timeout in milliseconds.

write_timeout

SMTP write timeout in milliseconds.

max_message_bytes

Maximum incoming message size in bytes.

tls_cert_file

Path to the TLS certificate file.

tls_key_file

Path to the corresponding private key to the TLS certificate.

To disable inbound TLS just comment out both TLS settings.

data_dir

The location where all persistent data is stored.

mta_address

The address of the mta used to send mailing list messages.

This mta is used to send messages for all configured mailing lists including subscription notifications.

mta_auth_method

The auth method used for authentication to the mta.

Can be either PLAIN or ANONYMOUS.

mta_username

The username used for authentication to the mta.

mta_password

The password used for authentication to the mta.

Example

[verteilzentrum]
logging = "INFO"
bind_to = "0.0.0.0:25"
bind_to_tls = "0.0.0.0:465"
hostname = "lists.example.com"
read_timeout = 100000
write_timeout = 100000
max_message_bytes = 1048576 # 1024 * 1024
tls_cert_file = "/some/path/cert.pem"
tls_key_file = "/some/path/key.pem"
data_dir = "/var/lib/verteilzentrum"
mta_address = "smtp.example.com"
mta_auth_method = "PLAIN"
mta_username = "lists@example.com"
mta_password = "secret"

Lists

Lists are represented as toml tables in an array.

Table elements

name

The name of the list which also serves as the list address.

persistent_receivers

Array of email addresses which always receive mailing list messages regardless of whether they are subscribed.

whitelist

Array of whitelisted email addresses which are allowed to interact with the list. Supports wildcards.

If empty the whitelist is disabled.

blacklist

Array of blacklisted email addresses.

Blacklisted addresses are not allowed to interact in any way with the list. Can be empty. Supports wildcards.

Important: The Blacklist has a higher priority than the whitelist.

can_publish

Array of email addresses which are allowed to publish messages to the list. Supports wildcards.

Example

[[list]]
name = "private-list@lists.example.com"
persistent_receivers = []
whitelist = ["hostmaster@example.com","john@example.com"]
blacklist = []
can_publish = ["hostmaster@example.com"]

[[list]]
name = "public-list@lists.example.com"
persistent_receivers = ["archive@example.com"]
whitelist = []
blacklist = ["spam@example.com"]
can_publish = ["moderator@example.com", "admin@example.com"]

For further examples take a look at the example config.

Command line flags

  • -config <config file> - The location of the config file to use. Defaults to config.toml in the working directory.

Deinstallation

Run sudo make uninstall to uninstall verteilzentrum. This will remove the verteilzentrum binary and the directories /etc/verteilzentrum and /var/lib/verteilzentrum if they are empty.

To remove the systemd service run sudo make uninstall-systemd.

Contributing

Feel free to send patches to me@bn4t.me or to open pull requests on Github.

License

This project is licensed under the GPL version 3 and later. See the LICENSE file.