mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
smtp: enable TLS peer verification, fix envelope injection, fix dot-stuffing
This commit is contained in:
8
TODO.md
8
TODO.md
@@ -63,6 +63,14 @@
|
||||
- [ ] Verify TCP reachability from XAMXAM VM to LDAP server (port 636)
|
||||
- [ ] See `docs/LDAP_AUTH_PLAN.md` for full phase-by-phase plan
|
||||
|
||||
## SMTP transport security hardening
|
||||
|
||||
- [x] Enable TLS peer verification (`verify_peer`, `verify_peer_name`, `peer_name`) on both `smtpSend` and `smtpProbe` — removes MITM vulnerability from `verify_peer: false`
|
||||
- [x] Add `caBundlePath()` — resolves system CA bundle path (php.ini → Debian/RHEL/Alpine candidates → PHP built-in fallback)
|
||||
- [x] Set SSL context options explicitly on socket before `stream_socket_enable_crypto()` for STARTTLS (both probe and send paths)
|
||||
- [x] Add `sanitiseEnvelope()` — strips CR/LF from envelope addresses to prevent SMTP command injection
|
||||
- [x] Fix RFC 5321 §4.5.2 dot-stuffing: replace `preg_replace` with correct CRLF-normalise → `str_replace("\r\n.", "\r\n..")` sequence
|
||||
|
||||
## SMTP notify_email fix
|
||||
|
||||
- [x] Migration 006: add `notify_email` column to `smtp_settings`
|
||||
|
||||
Reference in New Issue
Block a user