69f183d356
Document mail TXT records in the customer login, correct _domainkey value format, and update todo 02 for DKIM DNS propagation. Co-authored-by: Cursor <cursoragent@cursor.com>
78 lines
2.4 KiB
Markdown
78 lines
2.4 KiB
Markdown
# 02 — E-Mail & SMTP
|
|
|
|
**Priorität:** high
|
|
**Status:** erledigt (2026-06-11)
|
|
**Abhängigkeiten:** 01
|
|
**Blockiert:** 03 (Alarmierung)
|
|
|
|
## Ziel
|
|
|
|
Mail-Infrastruktur auf 0012.de für Monitoring-Alerts und Skript-Versand.
|
|
|
|
Relay von **boka** → ausgelagert nach [`11-boka-smtp-relay.md`](11-boka-smtp-relay.md).
|
|
|
|
## Postfach-Setup (Plesk)
|
|
|
|
| | |
|
|
|---|---|
|
|
| Postfach | `admin@0012.de` |
|
|
| Aliase | `monitor@0012.de`, `alert@0012.de` |
|
|
| SMTP-Login | `admin@0012.de` (Hauptpostfach, nicht Alias) |
|
|
| Absender Monitoring | `SMTP_FROM=monitor@0012.de` |
|
|
| Alarm-Empfänger | `ALERT_EMAIL` → persönliche Adresse |
|
|
|
|
## Checkliste
|
|
|
|
### Postfächer auf 0012.de
|
|
|
|
- [x] `admin@0012.de` mit Aliasen `monitor@`, `alert@`
|
|
- [x] Passwort in `.env` → `SMTP_USER`, `SMTP_PASSWORD`
|
|
- [x] `ALERT_EMAIL` gesetzt
|
|
- [x] `SMTP_FROM=monitor@0012.de`
|
|
- [x] Webmail-Login auf `ha01s019.org-dns.com`
|
|
|
|
### SMTP für Skripte (0012.de)
|
|
|
|
- [x] `config/mail.php` — `sendMail()`, `sendAlert()`
|
|
- [x] `scripts/test-mail.php` — CLI-Test
|
|
- [x] Port 587 + STARTTLS getestet (`php scripts/test-mail.php` → OK)
|
|
- [x] SPF gesetzt (Hoster-DNS)
|
|
- [x] DKIM in Plesk aktiviert
|
|
- [ ] DKIM in **öffentlicher DNS** — eingetragen im wint-Kundenbereich (2026-06-12), Propagation prüfen nach ~24 h
|
|
- [x] DMARC vorhanden (Hoster-DNS)
|
|
|
|
### Technische Notizen
|
|
|
|
- **Envelope vs. From:** SMTP-Login als `admin@`, `MAIL FROM` ebenfalls `admin@`; sichtbarer Absender bleibt `monitor@` (Alias). Plesk verwirft sonst oft still nach `250 OK`.
|
|
- **Test lokal:** `php scripts/test-mail.php` (liest `.env`)
|
|
- **Test vom Webspace:** `mail-test.php?token=…` (liest `private/server.env`)
|
|
- **Tuta/strenge Empfänger:** bis DKIM-DNS steht → `ALERT_EMAIL` Gmail o. ä.
|
|
- **Kein DNS in Plesk:** Einträge im [wint Kundenlogin](https://login.wint.global/clientarea.php) — siehe [`../HOSTING.md`](../HOSTING.md#dns-bearbeiten-wint-kundenbereich)
|
|
|
|
## `.env` (Beispiel)
|
|
|
|
```env
|
|
SMTP_USER=admin@0012.de
|
|
SMTP_FROM=monitor@0012.de
|
|
ALERT_EMAIL=you@example.com
|
|
```
|
|
|
|
## Test
|
|
|
|
```bash
|
|
php scripts/test-mail.php
|
|
```
|
|
|
|
Nach Deploy: `server.env` auf Server, Test lokal mit `.env`.
|
|
|
|
## Akzeptanzkriterien
|
|
|
|
- [x] Testmail an `ALERT_EMAIL` kommt an
|
|
- [ ] SPF/DKIM ohne Hard-Fail (mail-tester.com o. ä.) — optional
|
|
|
|
## Referenz
|
|
|
|
- [`../HOSTING.md`](../HOSTING.md)
|
|
- [`../config/mail.php`](../config/mail.php)
|
|
- boka-Relay: [`11-boka-smtp-relay.md`](11-boka-smtp-relay.md)
|