2023-10-12 15:06:48 +02:00
|
|
|
# Chat Mail server configuration
|
|
|
|
|
|
|
|
This package deploys Postfix and Dovecot servers, including OpenDKIM for DKIM signing.
|
|
|
|
|
|
|
|
Postfix uses Dovecot for authentication as described in <https://www.postfix.org/SASL_README.html#server_dovecot>
|
|
|
|
|
2023-10-13 16:14:11 +02:00
|
|
|
## Getting started
|
|
|
|
|
|
|
|
prepare:
|
|
|
|
|
|
|
|
pip install -e chatmail-infra
|
|
|
|
|
|
|
|
|
|
|
|
then run with pyinfra command line tool:
|
|
|
|
|
|
|
|
CHATMAIL_DOMAIN=c1.testrun.org pyinfra --ssh-user root c1.testrun.org deploy.py
|
|
|
|
|
|
|
|
|
2023-10-13 15:36:42 +02:00
|
|
|
## Structure (wip)
|
|
|
|
```
|
|
|
|
|
|
|
|
# package doveauth tool and deploy chatmail server to a envvar-specified ssh-reachable host
|
|
|
|
deploy.py
|
|
|
|
|
|
|
|
# chatmail pyinfra deploy package
|
2023-10-13 16:14:11 +02:00
|
|
|
chatmail-pyinfra
|
2023-10-13 15:36:42 +02:00
|
|
|
pyproject.toml
|
|
|
|
chatmail/__init__ ...
|
|
|
|
|
|
|
|
# doveauth tool used by dovecot's auth mechanism on the host system
|
2023-10-13 16:14:11 +02:00
|
|
|
doveauth
|
2023-10-13 15:36:42 +02:00
|
|
|
README.md
|
|
|
|
pyproject.toml
|
|
|
|
doveauth.py
|
|
|
|
test_doveauth.py
|
2023-10-13 17:45:54 +02:00
|
|
|
|
|
|
|
# lmtp server to block (outgoing) unencrypted messages
|
|
|
|
filtermail
|
|
|
|
README.md
|
|
|
|
pyproject.toml
|
|
|
|
....
|
|
|
|
|
2023-10-14 11:34:09 +02:00
|
|
|
# online tests (after deploy)
|
|
|
|
|
|
|
|
online-tests # runnable via pytest
|
|
|
|
|
|
|
|
|
2023-10-13 17:45:54 +02:00
|
|
|
|
|
|
|
# scripts for setup/development/deployment
|
|
|
|
|
|
|
|
scripts/
|
|
|
|
init.sh # create venv/other perequires
|
|
|
|
deploy.sh # run pyinfra based deploy of everything
|
2023-10-14 11:34:09 +02:00
|
|
|
test.sh # run all local and online tests
|
2023-10-16 21:49:29 +02:00
|
|
|
bench.sh # run performance benchmark tests
|
2023-10-13 17:45:54 +02:00
|
|
|
|
2023-10-13 15:36:42 +02:00
|
|
|
```
|
|
|
|
|
2023-10-13 16:14:11 +02:00
|
|
|
## Dovecot/Postfix configuration
|
|
|
|
|
|
|
|
### Ports
|
2023-10-12 15:06:48 +02:00
|
|
|
|
|
|
|
Postfix listens on ports 25 (smtp) and 587 (submission) and 465 (submissions).
|
|
|
|
Dovecot listens on ports 143(imap) and 993 (imaps).
|
|
|
|
|
|
|
|
## DNS
|
|
|
|
|
|
|
|
For DKIM you must add a DNS entry as in /etc/opendkim/selector.txt (where selector is the opendkim_selector configured in the chatmail inventory).
|