Restrict recreating $_SESSION to only those where the user has been logged in previously; this should help stop anonymous users from failing a CSRF check.
thanks @TrapoSAMA
- Clarifies that the documented `sudoers` policy applies to every enabled PostfixAdmin hook, not only to the optional Rspamd integration.
- Explains which generic rules remain in place and when the composite Rspamd domain-deletion rule replaces the direct domain-deletion rule.
thanks @TrapoSAMA
- harden the existing optional Maildir domain, mailbox creation/deletion and Dovecot mail-crypt hooks
- validate hook argument contracts and keep all derived paths below their configured base directories
- quote filesystem operations, check command failures and make deletion hooks safely retryable
- update the Dovecot password example for the prompt behaviour available since Dovecot 2.3.19, with a Dovecot 2.4 setting note
- add optional Rspamd DKIM creation/deletion helpers, a privilege-separated composite domain hook and deployment documentation
These hooks remain optional and disabled by default. Administrators must review the configured paths and service-account names before installation. The mail-crypt password example now requires Dovecot 2.3.19 or newer; its comment identifies the setting name needed by Dovecot 2.4.
Add Dovecot 2.4-oriented documentation for PostfixAdmin installations.
The new document covers:
- baseline Dovecot 2.4 SQL passdb/userdb configuration
- temporary weak password scheme compatibility for old MD5/MD5-CRYPT
hashes
- optional post-login password migration to ARGON2ID
- optional per-user Maildir to mdbox migration using a local mail_format
field
- quota warning delivery to the user's INBOX
- optional IMAPSieve/Rspamd spam and ham learning hooks
- security notes for userdb_plain_pass and verbose password logging
It also adds sanitized example files under DOCUMENTS/examples and
references the new Dovecot 2.4 document from the existing DOVECOT and
HASHING docs.
Thanks @TrapoSAMA
Adds a **Forward status: All / Active / Inactive** selector above the
alias (forwards) list in the domain overview (`list-virtual.php`).
see #1038, thanks @knofte
Refresh the Translation process
* rename DOCUMENTS/LANGUAGE.txt to DOCUMENTS/Translations.md, attempt to format.
* Removes the dead SVN / SourceForge references, points at GitHub.
* Add a **"for developers"** section etc
Thanks @knofte
As discussed in #1068.
Adds `DOCUMENTS/CUSTOM_FIELDS.md`, a start-to-finish walkthrough for
adding a custom field to a built-in entity using the `*_struct_hook`
callbacks, no core patching required.
Changes:
* Improve Spanish translations for mail, DKIM, logs, quota and Backup MX labels.
* Use a shorter domain-list quota label while keeping the full domain quota label in edit forms.
* Keep hidden domain-list values available in the domain tooltip without reusing form labels.
* Add explicit labels for max mailbox quota and unmanaged quota state.
Thanks @TrapoSAMA
small UI and translation fixes for virtual/admin forms.
Changes:
- Adds PALANG entry for the domain search placeholder.
- Replaces the hardcoded domain search placeholder in edit forms.
- Shows the Domain label when creating aliases and mailboxes.
- Uses Bootstrap 5 form-select for generated select controls.
- Adds minor spacing for the virtual search field.
Thanks @trapoSAMA
Improve CSRF invalid error page
- Replaces the raw hardcoded error with localized PALANG text.
- Provides a simple Continue link back to main.php
Related to the 4.0 branch fix in PR #1055.
Adds an **"All domains"** option to the View Log domain dropdown, so an
admin managing many domains can see log entries across all of them in
one view instead of picking each domain individually.
Closes#1059.
Thanks @knofte
This PR includes two small UI improvements:
* Add horizontal scroll wrappers to virtual mailbox/alias lists so
action buttons and table content do not overflow narrow desktop/tablet
widths.
* Add a domain quota tooltip showing assigned quota and real used quota,
while preserving the existing visible assigned quota text and
usage-based bar color.
Tested locally with PHP lint for DomainHandler.php.
thanks @trapoSAMA
various patches from @trapoSama sent via email -
* Keeps the assigned domain quota text and uses real mailbox usage for
the quota bar color and fill.
* Shows a red count next to a domain when one or more mailboxes exceed
the configured quota alert threshold. Requires patch 1.
* Adds optional configuration to hide mailbox quota and password expiry
columns while retaining those values in the domain tooltip.
* Corrects the quota-bar markup and aligns domain-list columns.
* Replaces the quota bars in the domain overview and mailbox list with a
unified bar component, preventing the fill, label, and border from
separating. It hides Modified, Backup MX, and Transport progressively on
reduced desktop widths, then uses horizontal scrolling as the final
fallback.
* Uses icon-only controls with translated tooltips in domain and mailbox
lists: active state, SMTP active state, autoresponder, alias, edit, and
delete. Active-state tooltips show the current value, for example
`Activo: SI` or `Activo: NO`.
- Use context-specific top menu labels instead of reusing the first dropdown
item label.
- Compact the Bootstrap 5 top navbar spacing and switch collapse to xl to avoid wrapping on desktop widths.
- Move hardcoded main dashboard/search labels into PALANG entries, including Spanish
translations
thanks @TrapoSAMA
Adds a `description` field to the `alias` and `alias_domain` tables, so you can add a comment explaining why the alias exists.
Partially addresses #1036
thanks @jpwarren
Implements the improvements suggested by @fredkilbourn in #1024, cleaned up for current master.
**Changes:**
1. **Auto-generate RSA 2048 keypair** when creating a new DKIM key. Only
generates on the create form, not on list views or edits.
2. **Descriptive signing table dropdown** shows `domain:selector
(description) [id]` instead of just the numeric ID.
3. **Domain:Selector and Description columns** in the signing table list
view via LEFT JOIN.
4. **Order by domain:selector** instead of raw dkim_id.
**Technical notes:**
- Uses `$this->new` check to avoid key generation overhead on list/edit
views
- Handles MySQL (`CONCAT()`) vs SQLite/PostgreSQL (`||`) string
concatenation
- Uses named arguments for `pacol()` per current conventions
Two separate commits. Credit to @fredkilbourn for the original patch.
- Make cards look closer to Bootstrap reference implementation by
removing padding and using the proper header element.
- Vertically center align table row content.
- Add a theme adaptive background to the navigation bar, and reuse the
design for non logged in pages.
thanks @Lombra
Prepared statements were binding DB-specific boolean literals (`'t'/'f'`) produced by `db_get_boolean()`, which breaks PostgreSQL parameter typing in some paths (notably mailbox creation via handler flows).
This change standardizes bound boolean parameters to native PHP `true`/`false` (which are then cast to 0/1 which seems to work fine within PDO/PostgreSQL).
fixes https://github.com/postfixadmin/postfixadmin/issues/1017
Add DOCUMENTS/HANDLER_CLASSES.md which attempts to document how the Handler classes work and help future developers/contributors.
Changes spec of PFAHandler::pacol() to discourage the 9th parameter (was: multiopt) from being passed as an array (param renamed to not_in_db). Previous behaviour is maintained, but a deprecation error should be triggered.
* code refactoring (adds Exec class to centralise proc_open like calls).
* bump phpunit to ^11.0, as this is the last release that supports php8.2. Note, there is not (yet?) a phpunit release for php8.2 that fixes PKSA-z3gr-8qht-p93v or PKSA-5jz8-6tcw-pbk4, so ignore them for now in composer.json
* Add regression tests for global admin privilege check in TOTP exceptions (#1012)
Verifies that global admins with both 'admin' and 'global-admin' roles
can add TOTP exceptions for any domain, while regular admins are
restricted to their managed domains.
* Add tests for db_in_clause(): placeholders, empty array, unique keys, real query
Covers the parameterized query refactor from PR #1004.
* Move test cleanup to tearDown: add admin table delete and session unset
Prevents state leaking between tests, especially when expectException()
aborts the method before inline cleanup runs.
* Use assertEquals with exact expected SQL per review
* Fix privilege check ordering in TotpPf::addException() (#1012)
Global admins were incorrectly downgraded to regular admins because
authentication_has_role('admin') was checked before 'global-admin',
and global admins have both roles. Reorder to check global-admin first.
* Add missing isset() check on $_GET['abort'] in users/login-mfa.php (#1013)
Matches the admin version at public/login-mfa.php which already has
the isset() check.