The administrator list shows a translated Yes/No MFA column immediately after Active.
Domains display an MFA badge only when at least one mailbox has a configured secret.
Add resetmfa task for the postfixadmin-cli command. ( postfixadmin-cli admin resetmfa <address> and
postfixadmin-cli mailbox resetmfa <address> )
thanks @TrapoSAMA
As suggested by @cboltz in #1188 (comment) and #1188 (comment), move TOTP action HTML out of both AdminHandler and MailboxHandler into a shared Smarty partial.
A domain administrator managing foo.com/bar.com could create a TOTP exception for their own login at example.com without managing example.com.
see also discussion on https://github.com/postfixadmin/postfixadmin/pull/1188
Accept $db_type = 'SQLite' with $db_name as the path to the database
file. SQLite has no now() or unix_timestamp(), so use strftime('%s', ...)
for the poll interval check and datetime('now') when storing the poll
time. Booleans are 1/0 on SQLite, the same as MySQL.
Requested in https://github.com/postfixadmin/postfixadmin/discussions/1197
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a PHP based vacation script - which can remove some of the installation and maintenance problems we have with vacation.pl. Depends on the 'mailparse' PHP extension.
thanks @TrapoSAMA
Navigation dropdowns currently require a click on desktop. This change opens all navigation dropdowns on mouse entry when their navbar is expanded, using Bootstrap's Dropdown API to keep visibility and ARIA state synchronized.
thanks @TrapoSAMA
Create and edit forms currently lack a Cancel action, making administrators and mailbox users rely on browser navigation or menus to abandon changes. The individual and broadcast mail composers have the
same gap.
thanks @TrapoSAMA
fixes potential XSS issue with TOTP exception lists (which need escaping, see also #1185).
refactors Template escaping to use TemplateEscape enum (rather than the previous boolean).
thanks @TrapoSAMA
Move `<!DOCTYPE html>` below the opening PHP block in `public/setup.php`
so `common.php` initializes the session and sends headers before any
HTML output.
thanks @jfjauvin
The Spanish Backup MX domain-list heading currently displays the full
edit-form sentence because `DomainHandler` uses
`pAdminEdit_domain_backupmx` as its shared field label. The shorter
`pAdminList_domain_backupmx` value already exists but is not used by
this list. Set the edit key to the same concise `MX de respaldo` value
so the domain list and form consistently use the wording approved in PR
#1170.
Someone wishing to remain anonymous emailed @cboltz a number of security issues, summarised below.
1. fix sql injection bug in getPageBrowser - search keys bypass the field filter, due to 2a6f27c3 / #1127
2. when performing a password change, do not start the session before the new password has been validated for compexity etc - as things stand someone with a recovery code gets logged in even if their password gets
rejected. Also invalid recovery code on failure.
3. broadcast-message.php was using smtp_mail() with incorrect args, and passing the SMTP password in as the mail body. - probably related to commit 7f1d78e and 42a664e9c2
4. a regular (non-admin) user could submit an arbitrary username in the POST data and create/edit a TOTP exception for another user or entire domain
PR includes refactoring of the password change code (into PasswordChangeAttempt) to make it easier to test/verify.
- treat recipient_delimiter as a set of alternative characters, matching Postfix semantics
- centralize recipient-extension removal so alias status and mailbox classification cannot diverge
- restrict delimiter matching to the local part and document multi-character configuration
- add focused unit and alias-status regression coverage
See #1143
Thanks @TrapoSAMA
fix regression in smtp_mail() so only do SMTP AUTH if $CONF['admin_smtp_password'] is a non-empty string
(used by password recovery, broadcast message, mailbox post-creation etc)
Thanks @TrapoSAMA
Alias destinations absent from local records previously shared the misleading “maybe UNDELIVERABLE” indicator, including valid external addresses such as Gmail. The indicator now distinguishes “Check local destination” (red) from “External destination” (blue), with short explanatory tooltips. An alias with both kinds of destinations can show
both indicators.
thanks @TrapoSAMA
Unlimited mailboxes currently show only the unlimited label, hiding available usage.
Unlimited domain counters also lose their quota box, and the domain storage label continues to show assigned quota even when actual usage is available.
thanks @TrapoSAMA
Users changing their mailbox password currently hit an unprefixed `mailbox` table lookup when `database_prefix` is configured, causing the password change to fail even though authentication succeeds.
Fixes: #1154
thanks @masterblaster79
Wenhao Wu emailed with the following security report, this affects master and postfixadmin-4.0.
High — mailbox takeover of mail flow for a 2FA-enrolled account by a password holder. CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N ≈ 8.1 (PR:L models possession of the first factor; impact is limited to the attacker's own mailbox account). CWE-308 (Use of Single-Factor Authentication with Two Factors), secondary CWE-287. Not related to the fixed TOTP-exception issue #1014.
....
With `$CONF['totp']='YES'` and a mailbox that has TOTP enrolled, logging in with **only the mailbox password** creates an MFA-incomplete session (`username` set, `roles=[]`, `mfa_complete=false`) that is parked at `users/login-mfa.php`. That half-session cannot open `users/main.php` (it has no `user` role), but `public/edit.php` never checks MFA completion:
- `public/edit.php:30` — `authentication_get_username()` (comment "enforce login") treats any session with a username as logged in; it never calls `authentication_mfa_incomplete()`.
- `public/edit.php:57-63` — for a non-admin session with a handler that has `user_hardcoded_field`, `require_role('admin')` is skipped entirely.
....
Wenhao Wu, Southeast University
thanks @d3do-23 (@cboltz and TrapoSAMA for reviewing etc)
Show DNS status for domains to administrators.
Adds new config setting domain_dns_status_check ( 0 - disabled, 1 authoritative zone, 2 usable MX )
Document installation, an optional CLI/cron command, permissions, networking, timeouts, and saved-result semantics.
thanks @TrapoSAMA
This is the second step of #1064, following #1090.
- replace `list-virtual.php`'s `cNav_bar` HTML renderer with normalized items for the shared `templates/_pagination.tpl`
- preserve the selected domain and nested search parameter in every page link
- use stable `#aliases` and `#mailboxes` anchors for the two independently rendered lists
- render the same accessible Bootstrap 5 pagination above and below each list
- remove the now-unused `arrow-l.png`, `arrow-r.png`, and `arrow-u.png` assets
The virtual-address overview currently shows a blank search box with
only a hard-coded English tooltip. Add a visible translated placeholder
and an accessible name: "Search mailboxes and aliases..." (Spanish:
"Buscar buzones y alias...").
thanks @TrapoSAMA
- require a completed user or admin role before opening TOTP management
- remove TOTP through the existing password-verifying change path
- keep configured post-change hooks active when a secret is removed
- add regression coverage proving an invalid password cannot remove the stored secret
This is the first focused change for #1128.
thanks @TrapoSAMA
- restore `md5crypt` as the PostfixAdmin 3.x-compatible alias for MD5-CRYPT
- verify stored unprefixed MD5-CRYPT, prefixed MD5-CRYPT, bcrypt, and SHA512 crypt hashes from their stored format
- document the canonical `MD5-CRYPT` setting, the legacy alias, and the 3.x upgrade implications
This addresses #1123 on `master`. The `postfixadmin_4.0` correction is in #1126 so each maintained branch can be reviewed and tested against its own PHP requirements.
thanks @TrapoSAMA
Limit the example Roundcube synchronization update to the selected user and disallow object instantiation while decoding stored preferences.
The script also validates its arguments and safely initializes malformed preference data.
Refs #1128
thanks @TrapoSAMA
Require a validated canonical site_url for recovery links, keep responses uniform, and persist a five-minute per-account request limit.
The token update is atomic across supported database engines and performs the same password hashing work for unknown accounts.
Refs #1128
thanks @TrapoSAMA
Render log records through the default output sanitization path and
remove the inline JavaScript interpolation of log data.
Full log data remains available through a native details element without
placing it in a script context.
Refs #1128
thanks @TrapoSAMA
When using dovecot: passwords, and calling the doveadm binary,, ignore stderr as long as the exit code is 0.
Switch _pacrypt_dovecot() to use the Exec class (instead of calling proc_popen directly).
fixes#1119
thanks @TrapoSAMA