项目作者: baretools

项目描述 :
A minimalistic mailing list.
高级语言: Go
项目地址: git://github.com/baretools/verteilzentrum.git
创建时间: 2020-03-21T09:13:09Z
项目社区:https://github.com/baretools/verteilzentrum

开源协议:GNU General Public License v3.0

下载


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/bn4t/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:
````shell script
setfacl -m u:verteilzentrum:rx

  1. #### Increasing deliverability
  2. To increase deliverability it is recommended to set up an [SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework) and [DMARC](https://en.wikipedia.org/wiki/DMARC) record for the MTA.
  3. # How to use
  4. #### Subscribing to a list
  5. Send an email (content doesn't matter) to `subscribe+$list_name`. E.g. `subscribe+news@lists.example.com`.
  6. You will receive a confirmation email that subscribing was successful.
  7. #### Unsubscribing from a list
  8. Send an email (content doesn't matter) to `unsubscribe+$list_name`. E.g. `unsubscribe+news@lists.example.com`.
  9. You will receive a confirmation email that unsubscribing was successful.
  10. # Config
  11. By default the config is located at `/etc/verteilzentrum/config.toml`.
  12. ## General options
  13. #### logging
  14. The logging level for verteilzentrum.
  15. Can be one of the following:
  16. - `DEBUG` => Everything is logged
  17. - `INFO` => Everything is logged except debug messages
  18. - `ERROR` => Only errors are logged
  19. #### bind_to
  20. The address including port on which the server should listen for non tls connections.
  21. Listens by default on `0.0.0.0:25`.
  22. #### bind_to_tls
  23. The address including port on which the server should listen for tls connections.
  24. Can be left empty if no tls certificates are configured.
  25. Listens by default on `0.0.0.0:465`.
  26. #### hostname
  27. The hostname of the list server. If you specify a TLS certificate it has to be valid for this hostname.
  28. #### read_timeout
  29. SMTP read timeout in milliseconds.
  30. #### write_timeout
  31. SMTP write timeout in milliseconds.
  32. #### max_message_bytes
  33. Maximum incoming message size in bytes.
  34. #### tls_cert_file
  35. Path to the TLS certificate file.
  36. #### tls_key_file
  37. Path to the corresponding private key to the TLS certificate.
  38. To disable inbound TLS just comment out both TLS settings.
  39. #### data_dir
  40. The location where all persistent data is stored.
  41. #### mta_address
  42. The address of the mta used to send mailing list messages.
  43. This mta is used to send messages for all configured mailing lists including subscription notifications.
  44. #### mta_auth_method
  45. The auth method used for authentication to the mta.
  46. Can be either `PLAIN` or `ANONYMOUS`.
  47. #### mta_username
  48. The username used for authentication to the mta.
  49. #### mta_password
  50. The password used for authentication to the mta.
  51. #### Example
  52. ````toml
  53. [verteilzentrum]
  54. logging = "INFO"
  55. bind_to = "0.0.0.0:25"
  56. bind_to_tls = "0.0.0.0:465"
  57. hostname = "lists.example.com"
  58. read_timeout = 100000
  59. write_timeout = 100000
  60. max_message_bytes = 1048576 # 1024 * 1024
  61. tls_cert_file = "/some/path/cert.pem"
  62. tls_key_file = "/some/path/key.pem"
  63. data_dir = "/var/lib/verteilzentrum"
  64. mta_address = "smtp.example.com"
  65. mta_auth_method = "PLAIN"
  66. mta_username = "lists@example.com"
  67. 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

  1. [[list]]
  2. name = "private-list@lists.example.com"
  3. persistent_receivers = []
  4. whitelist = ["hostmaster@example.com","john@example.com"]
  5. blacklist = []
  6. can_publish = ["hostmaster@example.com"]
  7. [[list]]
  8. name = "public-list@lists.example.com"
  9. persistent_receivers = ["archive@example.com"]
  10. whitelist = []
  11. blacklist = ["spam@example.com"]
  12. 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.