Compare commits

...

4 Commits

Author SHA1 Message Date
holger krekel
0bfbff4400 strike this weird CHATMAIL_DOMAIN variable 2023-12-15 23:56:31 +01:00
holger krekel
0a42fd1a9f strike last mentins of "instance" in readme 2023-12-15 23:52:06 +01:00
Floris Bruynooghe
8a338f1320 Use more characters for passwords (#124)
This expands the character set used for passwords generated for new
accounts.  The set it taken from the set used by the pass tool.  The
special characters is the full GNU grep [:punct:] set.
2023-12-14 11:51:22 +01:00
Sebastian Klähn
d437b8a943 Merge pull request #125 from deltachat/sk/fix_typo
fix: align spelling of Delta Chat
2023-12-14 11:35:41 +01:00
2 changed files with 18 additions and 12 deletions

View File

@@ -15,8 +15,8 @@ after which the initially specified password is required for using them.
## Deploying your own chatmail server
We subsequently use `CHATMAIL_DOMAIN` as a placeholder for your fully qualified
DNS domain name (FQDN), for example `chat.example.org`.
We use `chat.example.org` as the chatmail domain in the following steps.
Please substitute it with your own domain.
1. Install the `cmdeploy` command in a virtualenv
@@ -25,19 +25,19 @@ DNS domain name (FQDN), for example `chat.example.org`.
cd chatmail
scripts/initenv.sh
```
2. Create chatmail configuration file `chatmail.ini`:
```
scripts/cmdeploy init CHATMAIL_DOMAIN
scripts/cmdeploy init chat.example.org # <-- use your domain
```
3. Setup first DNS records for your `CHATMAIL_DOMAIN`,
3. Setup first DNS records for your chatmail domain,
according to the hints provided by `cmdeploy init`.
Verify that SSH root login works:
```
ssh root@CHATMAIL_DOMAIN
ssh root@chat.example.org # <-- use your domain
```
4. Deploy to the remote chatmail server:
@@ -75,7 +75,7 @@ scripts/cmdeploy bench
## Overview of this repository
This repository drives the development of "chatmail instances",
This repository drives the development of chatmail services,
comprised of minimal setups of
- [postfix smtp server](https://www.postfix.org)
@@ -91,7 +91,7 @@ as well as custom services that are integrated with these two:
to send mails for them.
- `chatmaild/src/chatmaild/filtermail.py` prevents
unencrypted e-mail from leaving the chatmail instance
unencrypted e-mail from leaving the chatmail service
and is integrated into postfix's outbound mail pipelines.
There is also the `cmdeploy/src/cmdeploy/cmdeploy.py` command line tool
@@ -104,7 +104,7 @@ to automatically install all chatmail components on a server.
### Home page and getting started for users
`cmdeploy run` also creates default static Web pages and deploys them
to an nginx web server under `https://CHATMAIL_DOMAIN`.
to a nginx web server with:
- a default `index.html` along with a QR code that users can click to
create accounts on your chatmail provider,

View File

@@ -4,16 +4,22 @@
import json
import random
import secrets
import string
from chatmaild.config import read_config, Config
CONFIG_PATH = "/usr/local/lib/chatmaild/chatmail.ini"
ALPHANUMERIC = string.ascii_lowercase + string.digits
ALPHANUMERIC_PUNCT = string.ascii_letters + string.digits + string.punctuation
def create_newemail_dict(config: Config):
alphanumeric = "abcdefghijklmnopqrstuvwxyz1234567890"
user = "".join(random.choices(alphanumeric, k=config.username_min_length))
password = "".join(random.choices(alphanumeric, k=config.password_min_length + 3))
user = "".join(random.choices(ALPHANUMERIC, k=config.username_min_length))
password = "".join(
secrets.choice(ALPHANUMERIC_PUNCT)
for _ in range(config.password_min_length + 3)
)
return dict(email=f"{user}@{config.mail_domain}", password=f"{password}")