3546 Commits
Author SHA1 Message Date
Rodrigo Cortés Cano 907117b4b8 Queue broadcast messages for background sending (#1054)
When doing a broadcast message, create a list of pending recipients in new db tables, and processes each message in turn. Jobs can be cancelled/retried. Locking is in place to try and stop multiple concurrent jobs being run. 

Adds db tables: broadcast_job, broadcast_job_domain and broadcast_recipient. 

thanks @TrapoSAMA
2026-11-20 20:20:34 +00:00
vibpe 7a1eb67db2 Send the 419 status with a reason phrase so Apache does not answer 500 (#1209)
Fixes #1208 - add reason phrase with http 419 response (used with  invalid or missing CSRF token is answered with the "Session expired"), otherwise Apache returns a http 500 response instead.

thanks @vibpe
2026-11-20 13:56:53 +00:00
Rodrigo Cortés Cano 5cc297210b Fix MFA status test after TOTP action rendering change (#1202)
thanks @TrapoSAMA
2026-11-18 20:21:52 +00:00
Rodrigo Cortés Cano 1eaaecfcbc Show configured MFA status and add CLI reset commands (#1196)
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
2026-11-18 13:22:21 +00:00
Rodrigo Cortés Cano f3ffeae493 Fix mailbox-user TOTP navigation and overlapping header (#1194)
Mailbox users now go to users/totp-exceptions.php for TOTP Excemptions. 
Fix navigation bar / logo overlapping.
thanks @TrapoSAMA
2026-11-18 13:13:02 +00:00
Rodrigo Cortés Cano 748e3ea121 Refactor account TOTP action rendering and status queries (#1198)
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.
2026-11-18 13:05:39 +00:00
Rodrigo Cortés Cano fda66026ca FIX: Restrict administrator TOTP self-exceptions to managed domains (#1201)
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
2026-11-16 14:20:46 +00:00
Rodrigo Cortés Cano bff07294dd Add daily Vacation choice and optional INI reply intervals (#1189)
Update vacation interval selection and support readable choice names 

thanks @TrapoSAMA
2026-11-12 19:57:12 +00:00
Rodrigo Cortés Cano 07b9d500fe FIX: Complete search and account-form follow-ups from #1165 (#1188)
thanks @TrapoSAMA
2026-11-12 19:39:49 +00:00
Pranav GargandClaude Opus 5.5 a2ee929eda fetchmail.pl: add SQLite support
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>
2026-11-12 19:23:47 +00:00
Pranav GargandClaude Opus 5.5 9e8c3d9c2a Add documentation for ADDITIONS/fetchmail.pl
Explain how the Fetch Email tab and fetchmail.pl work together, the
required Perl modules, the config file, running it from cron, poll_time
and delivery options.

Requested in https://github.com/postfixadmin/postfixadmin/discussions/1197

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 18:46:56 +00:00
Sven Strickroth bce950ee4d list-virtual_mailbox.tpl: Indicate by color whether vacation is active (#1193)
thanks @csware
2026-11-09 14:54:06 +00:00
Oulra 69404871ed Update french translations (#1190)
thanks @oulra
2026-11-08 09:29:00 +00:00
Rodrigo Cortés Cano 4f2b5e3e54 Add complete PHP CLI Virtual Vacation transport (#1118)
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
2026-11-06 18:38:36 +00:00
Christian Boltz 2eeee564d6 CHANGELOG: Add CVE number for TOTP exception description 2026-11-04 21:31:01 +01:00
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