docs: translate README and .gitignore to English
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
|||||||
# Echte CSV's met credentials nooit committen
|
# Never commit real credential CSVs
|
||||||
accounts.csv
|
accounts.csv
|
||||||
accounts.*.csv
|
accounts.*.csv
|
||||||
!accounts.example.csv
|
!accounts.example.csv
|
||||||
|
|||||||
82
README.md
82
README.md
@@ -1,36 +1,37 @@
|
|||||||
# Nextcloud-ConnectMail
|
# Nextcloud-ConnectMail
|
||||||
|
|
||||||
Bulk-link IMAP/SMTP mailaccounts voor Nextcloud-gebruikers via `occ mail:account:create`.
|
Bulk-link IMAP/SMTP mail accounts for Nextcloud users via `occ mail:account:create`.
|
||||||
|
|
||||||
Bedoeld voor admins die in één keer mail-accounts willen koppelen voor meerdere users —
|
Intended for admins who need to link mail accounts for multiple users at once —
|
||||||
bijvoorbeeld bij onboarding, migratie, of provisioning op basis van een externe lijst.
|
for example during onboarding, migration, or provisioning from an external list.
|
||||||
|
|
||||||
## Wanneer dit script gebruiken
|
## When to use this script
|
||||||
|
|
||||||
De Nextcloud Mail-app biedt **geen** REST-endpoint om als admin een account voor een
|
The Nextcloud Mail app provides **no** REST endpoint for an admin to link an
|
||||||
andere user te koppelen. Wel bestaat `occ mail:account:create <userId> ...`, maar dat
|
account on behalf of another user. There is an `occ mail:account:create <userId> ...`
|
||||||
is positioneel en omslachtig voor bulk-werk. Dit script wrapt die call en leest een CSV.
|
command, but it is positional and cumbersome for bulk work. This script wraps that
|
||||||
|
call and reads a CSV file.
|
||||||
|
|
||||||
Alternatieven:
|
Alternatives:
|
||||||
- **Provisioning-templates** (admin-UI in Mail): één template per domein, géén
|
- **Provisioning templates** (Mail admin UI): one template per domain, no
|
||||||
per-user credentials. Werkt alleen als alle users hetzelfde mail-cluster delen.
|
per-user credentials. Only works if all users share the same mail cluster.
|
||||||
- **Eigen REST-controller**: vereist een patch op de Mail-app.
|
- **Custom REST controller**: requires patching the Mail app itself.
|
||||||
|
|
||||||
## Vereisten
|
## Requirements
|
||||||
|
|
||||||
- Shell-toegang tot de Nextcloud-server (rechtstreeks of via SSH/docker exec)
|
- Shell access to the Nextcloud server (directly or via SSH / `docker exec`)
|
||||||
- `occ` uitvoerbaar als web-user (meestal `www-data`)
|
- `occ` executable as the web user (usually `www-data`)
|
||||||
- De Nextcloud Mail-app geïnstalleerd en geactiveerd
|
- The Nextcloud Mail app installed and enabled
|
||||||
- `python3` op de host waar het script draait (voor RFC-4180 CSV-parsing)
|
- `python3` on the host running the script (for RFC-4180 CSV parsing)
|
||||||
|
|
||||||
## Gebruik
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
OCC_CMD="docker exec -u www-data nc-dev php occ" \
|
OCC_CMD="docker exec -u www-data nc-dev php occ" \
|
||||||
./mail-bulk-link.sh accounts.csv
|
./mail-bulk-link.sh accounts.csv
|
||||||
```
|
```
|
||||||
|
|
||||||
Voor classic installs:
|
Classic install:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
OCC_CMD="sudo -u www-data php /var/www/nextcloud/occ" \
|
OCC_CMD="sudo -u www-data php /var/www/nextcloud/occ" \
|
||||||
@@ -44,41 +45,40 @@ OCC_CMD="ssh hetzner-ax42 docker exec -u www-data nc-dev php occ" \
|
|||||||
./mail-bulk-link.sh accounts.csv
|
./mail-bulk-link.sh accounts.csv
|
||||||
```
|
```
|
||||||
|
|
||||||
## CSV-formaat
|
## CSV format
|
||||||
|
|
||||||
Header verplicht, kolomvolgorde vrij. Verplichte kolommen:
|
Header row required, column order flexible. Required columns:
|
||||||
|
|
||||||
```
|
```
|
||||||
userId,name,email,imapHost,imapPort,imapSsl,imapUser,imapPass,smtpHost,smtpPort,smtpSsl,smtpUser,smtpPass
|
userId,name,email,imapHost,imapPort,imapSsl,imapUser,imapPass,smtpHost,smtpPort,smtpSsl,smtpUser,smtpPass
|
||||||
```
|
```
|
||||||
|
|
||||||
Optionele kolom: `authMethod` (`password` of `xoauth2`, default `password`).
|
Optional column: `authMethod` (`password` or `xoauth2`, defaults to `password`).
|
||||||
|
|
||||||
- `imapSsl` / `smtpSsl`: `ssl`, `tls`, of `none`
|
- `imapSsl` / `smtpSsl`: `ssl`, `tls`, or `none`
|
||||||
- Regels die beginnen met `#` worden overgeslagen
|
- Lines starting with `#` are skipped
|
||||||
- Quote velden met komma's volgens RFC 4180 (`"foo,bar"`)
|
- Quote fields containing commas per RFC 4180 (`"foo,bar"`)
|
||||||
|
|
||||||
Zie [accounts.example.csv](accounts.example.csv) voor een voorbeeld.
|
See [accounts.example.csv](accounts.example.csv) for a working example.
|
||||||
|
|
||||||
## Beperkingen
|
## Limitations
|
||||||
|
|
||||||
- **Geen connectie-test.** De `occ`-command slaat blind op — foute credentials worden
|
- **No connection test.** The `occ` command stores blindly — invalid credentials
|
||||||
geaccepteerd. De user merkt het pas bij de eerste sync. De REST-route (`POST
|
are accepted silently. The user only finds out on the first sync. The REST
|
||||||
/api/accounts`) doet wel een live IMAP/SMTP-test, maar werkt alleen voor de
|
route (`POST /api/accounts`) does a live IMAP/SMTP check, but only works for
|
||||||
ingelogde user zelf.
|
the currently logged-in user.
|
||||||
- **Geen initial mailbox-sync.** Wordt door de REST-route wel getriggerd, door
|
- **No initial mailbox sync.** The REST route triggers one; `occ` does not.
|
||||||
`occ` niet. Eerste sync gebeurt bij de eerstvolgende background-job of bij eerste
|
First sync happens on the next background job run or first user login.
|
||||||
login van de user.
|
- **Plaintext passwords in the CSV.** They sit on disk during execution. After
|
||||||
- **Wachtwoorden in CSV.** Plaintext op disk tijdens uitvoer. Na de run:
|
the run: `shred -u accounts.csv`. Never commit credential CSVs.
|
||||||
`shred -u accounts.csv`. Nooit committen.
|
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
- Voeg `accounts.csv` (en varianten) toe aan `.gitignore` van je deploy-repo
|
- Add `accounts.csv` (and variants) to your deployment repo's `.gitignore`
|
||||||
- Draai dit alleen vanuit een omgeving waar je sowieso admin-rechten hebt
|
- Only run this from environments where you already hold admin rights
|
||||||
- Voor productie: overweeg de credentials uit een secrets-store te halen en de
|
- For production use: pull credentials from a secrets store and generate the
|
||||||
CSV on-the-fly te genereren in tmpfs
|
CSV on the fly in `tmpfs`
|
||||||
|
|
||||||
## Licentie
|
## License
|
||||||
|
|
||||||
AGPL-3.0-or-later (consistent met Nextcloud Mail).
|
AGPL-3.0-or-later (consistent with Nextcloud Mail).
|
||||||
|
|||||||
Reference in New Issue
Block a user