Commit Graph
3531 Commits
Author SHA1 Message Date
Rodrigo Cortés Cano 9290d9bd45 Open navigation dropdowns on mouse hover (#1187)
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
2026-11-01 16:10:30 +00:00
Rodrigo Cortés Cano b14e323af7 Add Cancel navigation to create/edit forms and mail composers (#1181)
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
2026-11-01 10:44:23 +00:00
Rodrigo Cortés Cano 3feeb081af Escape security lists and make template escaping opt-outs explicit (#1172)
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
2026-11-01 10:41:54 +00:00
Jean-Francois Jauvin 06e3af5fe0 Fix session warnings in setup.php (#1183)
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
2026-10-27 09:37:45 +00:00
Rodrigo Cortés Cano ffc4650962 Use concise Spanish Backup MX label consistently (#1179)
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.
2026-10-18 09:37:37 +01:00
David Goodwin ae85e51f6e Security fixes (master only) (#1165)
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.
2026-10-17 09:27:59 +01:00
Rodrigo Cortés Cano 8995ee7b55 Support multiple recipient delimiters (#1178)
- 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
2026-10-15 19:26:09 +01:00
Rodrigo Cortés Cano ca76931f06 Allow configurable mailbox user display-name editing (#1177)
add config setting edit_mailbox_name which can be set to allow users to change their name. 

https://github.com/postfixadmin/postfixadmin/issues/1176#issuecomment-6061535053

Thanks @TrapoSAMA & @pvdv
2026-10-15 19:23:51 +01:00
Rodrigo Cortés Cano 01747fda26 Revoke stale XML-RPC authorization across web login and MFA (#1173)
Stop someone sharing a session cookie between xmlrpc and normal logins, and using it to avoid TOTP auth. 

thanks @TrapoSAMA
2026-10-13 17:10:21 +01:00
Rodrigo Cortés Cano 59e02ea7f6 Restore SMTP delivery without authentication (#1174)
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
2026-10-07 19:39:04 +01:00
Christian Boltz 047bf192fb db_where_clause(): fix Exception message
... to mention the correct function name
2026-10-04 18:20:08 +02:00
Rodrigo Cortés Cano 4b014a4fd6 Improve Spanish translation (#1170)
Update es.lang

thanks @TrapoSAMA
2026-10-04 09:58:04 +01:00
Rodrigo Cortés Cano 090ac0c56a Show configured TOTP status and reset action without empty space (#1166)
When TOTP is configured, stop reserving space on the status page for an enable form that isn't needed.

Thanks @TrapoSAMA
2026-10-03 11:26:06 +01:00
Rodrigo Cortés Cano ff0ae9ddbe Clarify alias destination status indicators (#1150)
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
2026-10-03 11:20:28 +01:00
Rodrigo Cortés Cano b0fe5db364 Show usage and neutral boxes for unlimited quotas (#1151)
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
2026-10-03 11:16:53 +01:00
masterblaster79 eea8021889 Fix password changes with database prefixes (#1155)
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
2026-09-27 19:52:14 +01:00
David Goodwin 2c05ff950c Totp fixes (#1153)
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)
2026-09-26 09:39:53 +01:00
David Goodwin 63ef208055 see #1162 - avoid passing null into explode(), thanks @danielsdadm-commits 2026-09-26 09:24:27 +01:00
8ctopus a2d5a5a94d Fix smarty template did not have noindex (#1161)
discourage search engines from indexing postfixadmin 

thanks @8ctopus
2026-09-25 08:55:59 +01:00
David Goodwin 8d4e24cda6 move the reset password button to the bottom of the form as I think this is more normal 2026-09-24 10:03:50 +01:00
David Goodwin cab4e8c3ca see #1159 - change aliases to forwarding to be more human friendly 2026-09-24 09:11:31 +01:00
8ctopus 57a18ac763 Ask search engine not to index (#1157)
Add "X-Robots-Tag: noindex" http header to discourage listing in search engines.

see #1142, thanks @8ctopus
2026-09-22 08:35:12 +01:00
Rodrigo Cortés Cano 24c51277c2 Show inactive domain DNS status in overview (#1146)
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
2026-09-19 15:04:21 +01:00
Rodrigo Cortés Cano 9babefd160 Remove obsolete quota usage script and Horde 3 guide (#1149)
Remove the legacy `ADDITIONS/quota_usage.pl` utility and the `DOCUMENTS/HORDE.txt` Horde 3 password-change recipe.
2026-09-19 10:23:47 +01:00
Rodrigo Cortés Cano d56a05d862 Replace list-virtual cNav_bar with shared pagination (#1093)
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
2026-09-16 14:52:53 +01:00
Rodrigo Cortés Cano e6a0b3a179 Label the virtual address search field (#1148)
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
2026-09-06 14:26:30 +01:00
Rodrigo Cortés Cano d92137719d Require reauthentication for TOTP removal (#1129)
- 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
2026-09-02 20:23:26 +01:00
Rodrigo Cortés Cano b07d4a5136 Document optional strict MX policy service (#1124)
Add a short documentation pointer from `ADDITIONS/README.md` to the standalone
[postfix-strict-mx-policy](https://github.com/TrapoSAMA/postfix-strict-mx-policy) project.

thanks @TrapoSAMA
2026-09-02 20:18:34 +01:00
Rodrigo Cortés Cano cd67f20b4e Enforce SMTP protocol state (#1132)
Improve SMTP connection handling + writing ( smtp_mail() )

Refs #1128

thanks @TrapoSAMA
2026-09-02 20:14:30 +01:00
Rodrigo Cortés Cano 2c8a8893e9 Enforce TOTP policy for XML-RPC login (#1131)
if a user/mailbox has TOTP enabled, block access via XMLRPC (if it's enabled) as the two aren't compatible.

Part of #1128.

thanks @TrapoSAMA
2026-08-29 20:07:23 +01:00
Rodrigo Cortés Cano 54be5e3828 Fix legacy md5crypt compatibility (#1125)
- 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
2026-08-29 15:11:54 +01:00
Rodrigo Cortés Cano 2a6f27c3c4 Use shared pagination in generic lists (#1127)
Extend bootstrap pagination to list.php

#1090, #1093, and this PR cover all three pagination surfaces tracked in #1064.

thanks @TrapoSAMA
2026-08-29 15:09:23 +01:00
Rodrigo Cortés Cano 47667e56ab Scope Roundcube TOTP preference updates (#1133)
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
2026-08-29 14:56:57 +01:00
Rodrigo Cortés Cano e638095d58 Harden password recovery requests (#1130)
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
2026-08-29 14:55:49 +01:00
Rodrigo Cortés Cano 314a3242c9 Escape viewlog output by default (#1134)
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
2026-08-29 14:51:41 +01:00
Kent Riboe 235cf06eb1 config: clarify dovecot: encrypt needs doveadm; note native alternatives (#1120)
Update docs in config.inc.php around  `$CONF['encrypt']` for doveadm usage. 

see #1119

thanks @knofte
2026-08-22 15:10:40 +01:00
Rodrigo Cortés Cano a9b561506d doveadm: accept valid results with stderr warnings (#1121)
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
2026-08-22 15:07:33 +01:00
Rodrigo Cortés Cano aa8b4e1f31 Spanish (es.lang) translation updates (#1116)
thanks @TrapoSAMA
2026-08-16 12:05:36 +01:00
David Goodwin 1b55dc96e4 security updates (smarty, phpunit)
move to use smarty/smarty ^5.8.4 (see https://github.com/postfixadmin/postfixadmin/security/dependabot/2),
use phpunit ^11.5.50
use only psalm 6
2026-08-16 10:28:44 +01:00
Rodrigo Cortés Cano 2008d06bf4 Harden language catalog repair and syntax validation (#1114)
Improve language-update.sh script, fix missing semi-colons, cover languages/*.lang in ci with parallel-lint etc.
Fixes #1112 #1113

thanks @TrapoSAMA
2026-08-12 09:07:15 +01:00
Rodrigo Cortés Cano 60f8c46514 Document optional Dovecot mail deletion logging (#1111)
update dovecot 2.4 example config to not log deletions by default.

thanks @TrapoSAMA
2026-08-11 09:08:03 +01:00
Rodrigo Cortés Cano ab0a4d1357 Fix password expiration handling and visibility (#1109)
- validate domain password-expiration policies as whole numbers from 0 through 36500 days
- make password expiration optional and disabled by default
- make 0 consistently mean that passwords in the domain do not expire
- align administrator, recovery, mailbox-user, and XML-RPC password changes
- show each mailbox password-expiration state in lists and CSV output
- add the new labels to every language file
- document how to enable the feature in `config.local.php`

thanks @TrapoSAMA
2026-08-10 09:19:35 +01:00
Rodrigo Cortés Cano 875113f305 Improve form focus and TOTP input semantics (#1105)
- use a softer, consistent primary-blue focus treatment for standard
data-entry controls
- identify TOTP inputs as one-time codes and request numeric keyboards
on supported devices
- keep TOTP digits visible while they are entered
- fix the TOTP setup input ID so its label points to the actual control

thanks @TrapoSAMA
2026-08-10 09:09:08 +01:00
Christian Boltz bdda34aa09 Add missing alias_goto_default* translations to several languages
Fixes: 513542370d
2026-08-09 18:00:00 +02:00
Christian Boltz a1e3f0f474 README: Typo fix db_min_version -> min_db_version 2026-08-09 17:54:08 +02:00
Christian Boltz d691c90cef translations: update password_expiration and password_expiration_desc
In languages that were not translated yet, update to the new english
text.

In already-translated translations, add comments with the new text.

Fixes: deb5289362
2026-08-09 17:52:32 +02:00
Christian Boltz 9cc02670a9 Add translation markers for pViewlog_per_page
Fixes: 0f68dee15c
2026-08-09 17:15:49 +02:00
Christian Boltz 53cc8325c7 Add missing translation marker for pViewlog_all_domains
Fixes: d6aabd7745
2026-08-09 17:10:17 +02:00
Rodrigo Cortés Cano deb5289362 Clarify password expiration units (#1107)
Update spanish and english translations for password expiry to make it clear the units are in days.
2026-08-09 09:08:33 +01:00
Özgür Konstantin Kazanççı 65b10f7285 Update tr.lang (#1104)
Missing lines translated  - thanks @ozgurkazancci
2026-08-07 09:48:02 +01:00