9 Commits

Author SHA1 Message Date
3cc73dc9ec feat: rich log viewers for all remaining log types
- Syslog-style table (postfix, dovecot, sogo, netfilter, acme):
  Time | Priority badge (colour-coded debug→info→notice→warn→error→crit)
  | Process | Message — columns hidden when unused by that log type
- API access log: Time | Method badge (GET=green, POST=blue,
  PUT=orange, DELETE=red) | Endpoint | Remote IP | Data
- Autodiscover: Time | User | Service badge (ActiveSync, CalDAV,
  CardDAV, IMAP, SMTP) | User Agent
- Watchdog: Time | Service | Health badge (Healthy/Degraded/Critical
  based on lvl) | Processes (now/total) | Change (+/-/±0 coloured)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 09:52:17 +01:00
332efe59eb feat: rich ratelimited log viewer table
Renders ratelimited log entries as a structured table instead of raw
JSON, showing: timestamp, sender (header_from), recipient, subject,
IP address, rate-limit rule name (orange badge, tooltip with rl_info),
and queue ID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 09:47:49 +01:00
dbaf3b330b feat: rich Rspamd history viewer with score badges and symbol details
- Rspamd log type renders a structured table instead of raw JSON
- Each row shows: timestamp, sender, recipient, subject, colour-coded
  score (green/amber/red relative to required threshold), action badge
- Expand button reveals a detail panel per message with:
  - Meta grid: Sender SMTP/MIME, IP, size, process time, Message-ID
  - Threshold strip showing all configured score boundaries
  - Symbol table sorted by impact, with dashicons (warning/check/minus),
    +/- score in colour, description, and option values
  - Zero-score informational symbols shown dimmed at the bottom
- Other log types (postfix, dovecot, etc.) still render as before

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:57:00 +01:00
dbe4abccf7 feat: domain edit/delete, fix logs, add admin quarantine with block
- Add ajax_woocow_admin_domain_edit and _delete PHP handlers
- Domain table: richer columns (mailboxes used/limit, quota), icon buttons
- Edit domain modal: pre-populates fields, loads relayhosts for transport select
- Fix logs: correct Mailcow API slugs (rspamd-history, ratelimited) and add /{count} suffix to endpoint
- Add admin Quarantine submenu: view all quarantined messages, delete, blacklist sender via domain policy
- Add domain policy methods to API class (add/delete/get_bl)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:53:11 +01:00
1c5b58f238 feat: domains, transports, logs, quarantine, spam filter, i18n + UX fixes
Features added:
- Admin > Domains: add domains to Mailcow servers, auto-generate DKIM,
  display full DNS record set (MX, SPF, DMARC, DKIM, autoconfig CNAMEs)
  with one-click copy per record
- Admin > Transports: manage sender-dependent relay hosts (add/delete)
- Admin > Logs: view Postfix, Dovecot, Rspamd, Ratelimit, API and other
  server logs in a dark scrollable panel
- My Account: per-domain Quarantine panel — view score, sender, subject,
  date; permanently delete quarantined messages
- My Account: per-mailbox Spam Filter slider (1–15 threshold) saved via API
- My Account: Aliases & Forwarders (alias creation doubles as forwarder
  to any external address)

UX fixes:
- Quota 0 now displays ∞ (unlimited) in both admin and account views
- Admin mailbox action buttons replaced with Dashicon icon buttons
  (lock, chart-bar, trash) with title tooltips

i18n:
- load_plugin_textdomain registered on init hook
- All user-facing PHP strings wrapped in __() / esc_html__()
- Translated strings array passed to account JS via wp_localize_script
- woocow-es_ES.po/.mo — Spanish translation
- woocow-ro_RO.po/.mo — Romanian translation (with correct plural forms)
- English remains the fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:38:52 +01:00
1ea2ed7e74 feat: admin reset password and set quota for existing mailboxes
- Add Reset PW and Set Quota action buttons to each mailbox row
- Shared edit modal that switches between password / quota modes
- New woocow_admin_mailbox_edit AJAX handler in PHP
- Quota reloads mailbox list after save; password closes modal silently
- Customer-facing Change Password was already implemented in account JS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:21:46 +01:00
8644282ecb fix: correct mailbox endpoint path and quota field name
- get_domain_mailboxes: was POST /api/v1/get/mailboxes/{domain},
  correct path is GET /api/v1/get/mailbox/all/{domain}
- Quota percentage field is percent_in_use, not quota_used_in_percent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:18:08 +01:00
6f7c66e2c4 fix: use domain_name field from Mailcow API response
Mailcow's GET /api/v1/get/domain/all returns domain_name (not domain)
in each response object. Using the wrong key caused the dropdown to
display 'null' for every entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:14:00 +01:00
2ee81efacf feat: initial WooCow plugin — Mailcow/WooCommerce integration
- Mailcow API client wrapping domains, mailboxes, aliases endpoints
- Admin backend: server management, customer-domain assignments, mailbox overview
- WooCommerce My Account: email hosting tab with mailbox/alias management
- Per-mailbox password change (independent of WP account password)
- Optional WP account password sync to all customer mailboxes
- Installer creates wp_woocow_servers and wp_woocow_assignments DB tables
- Full nonce + capability + ownership verification on all AJAX endpoints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 08:06:22 +01:00