44 Commits
Author SHA1 Message Date
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 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
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 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
David Goodwin 63ef208055 see #1162 - avoid passing null into explode(), thanks @danielsdadm-commits 2026-09-26 09:24:27 +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 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 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
David Goodwin 94d8ffcf78 squash merge #1058 - add the ability to bulk delete forwards from the alias list, thanks @knofte
see https://github.com/postfixadmin/postfixadmin/pull/1058
2026-07-07 21:22:33 +01:00
Kent Riboe a400db12dc Add active-status filter to the alias (forwards) list (#1038) (#1056)
Adds a **Forward status: All / Active / Inactive** selector above the
alias (forwards) list in the domain overview (`list-virtual.php`). 

see #1038, thanks @knofte
2026-07-07 20:44:43 +01:00
Kent Riboe 26530c5d0b Replace escape_string() concatenation with parameterized queries (#1004)
* Replace most escape_string() usages with parameterized queries (reducing the chance of SQL injection), see also #1003 

thanks @knofte
2026-04-06 20:47:34 +01:00
David Goodwin 8a1f9a11af CSRF protection - support multiple tokens (#985)
possible fix for https://github.com/postfixadmin/postfixadmin/issues/967

CSRF Token changes : rather than have one PFA_Token value in $_SESSION, store a list of them, where each value has a time stamp it was issued on. The aim is to allow the user to have multiple browser tabs open at once - and not have the last tab that loaded trample on others. Tokens expire after 1 hour.

Adds a Smarty helper function `{CSRF_Token}` which will output `<input type=hidden name=CSRF_Token value=asdf123>` or `{CSRF_Token type=url}` which outputs a literal string like 'asdf123' suitable for placing in a URL.

Adds a PHP exception handler in public/common.php, which could be used to display a more friendly error message/response (but at the moment is fairly minimal).

Removes most uses of `die()` within the codebase, and instead moves to throw an exception
2026-03-01 19:30:16 +00:00
David Goodwin ff0a3d7636 psalm stuff, add Languages class, token refactor 2026-01-28 09:50:26 +00:00
David Goodwin 52794bede7 misc fixes for psalm after allowing it to be updated 2026-01-28 09:50:26 +00:00
David Goodwin 460c624275 remove more references to sourceforge 2025-07-13 18:29:37 +01:00
David Goodwin 798e8b269c Topt app passwords fixes (WIP) (#805)
various improvements to the TOTP code see also:  #802
2025-05-16 20:31:20 +01:00
David Goodwin 759304ecb8 apparently these all need reformatting 2024-12-05 14:33:41 +00:00
David Goodwin f01274ec94 try relaxing composer dependencies to allow php8.2 dev support, reformat so composer format passes 2024-04-22 21:02:01 +01:00
Christian Boltz 43ce9feda1 Fix typos introduced in https://github.com/postfixadmin/postfixadmin/pull/665 / e279c77ca5 2022-10-18 23:24:38 +02:00
David Goodwin 7caf25244a composer format time 2022-10-12 20:41:14 +01:00
Jan Kruis e279c77ca5 languages/nl.lang translation from english for new function such as dkim and password
public/editactive.php			edit wrong description text it said this module is used for deleting admin domains mailbos etc
					modify templates that it is used

public/list-virtual.php			modify templates that it is used
					modify the remarks behind arguments and internal , the texteditor thought the text after this was still remark text untl is see */

public/vacation.php and
model/VacantionHandel.php		adjust date string actionFrom and activeUntil these are written in the database as e.g. 2020-10-01 15:14:00 and 2020-10-30-15:14:00
					this should be 2020-10-01 00:00:00 and 2020-10-30 23:59:59 so that it contains all day, this happens if no holiday has been set for the account yet
					when adjusting the dates, the seconds of until are set to 00 instead of 59. When the holiday is canceled and then action is taken again, the from time
					to the time when the setting is made.

templates/editform.tpl			remove blank space

templates/list-virtual_mailbox.tpl	remove indent tabs
2022-10-12 17:46:15 +02:00
David Goodwin 2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin 823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
David Goodwin 4f1ef668d9 stop undefined indexes etc - see https://github.com/postfixadmin/postfixadmin/issues/470 2021-03-15 20:26:21 +00:00
David Goodwin b2831d1241 psalm improvements 2021-02-17 21:29:18 +00:00
David Goodwin 92a7042ba1 fix typo checks 2020-11-09 21:56:08 +00:00
David Goodwin 750838d7f7 psalm fixes; make safepost()/safeget() return strings 2020-11-09 21:40:52 +00:00
David Goodwin f6f62180e8 remove some global variables 2020-09-27 11:02:58 +01:00
David Goodwin 8754af58cb fix undefined variables (psalm) 2020-03-12 20:45:51 +00:00
David Goodwin 34e6f7829e tighten psalm checks; fix errors 2019-09-17 20:55:14 +01:00
David Goodwin 17a420152c use pdo/prepared statement for list-virtual + page browser 2019-02-15 21:33:55 +00:00
David Goodwin 803e2342f8 fix psalm issues; reformat; rename new db functions 2019-01-06 21:32:58 +00:00
David Goodwin 1176c9ce78 reformat; fix some transition bugs 2019-01-06 21:32:58 +00:00
David Goodwin ea33d9951a try migrating to pdo 2019-01-06 21:32:58 +00:00
David Goodwin 20b1eb842e fix sqlite display of password expired check for mailboxes 2018-12-28 19:57:21 +00:00
David Goodwin 4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
David Goodwin 74002bbf57 psalm fixes 2018-12-27 21:43:11 +00:00
David Goodwin 8cf7947f15 move function into the only place it is used 2018-12-27 13:07:31 +00:00
David Goodwin 77d1b6c2e7 rename sql fields to just have mailbox.password_expiry and domain.password_expiry 2018-08-28 21:19:56 +01:00
Damien Martins e786609aa9 Adding support for password expiration. Please read README.password_expiration for more details 2018-08-17 16:07:14 +02:00
David Goodwin 532eb09f1f possible readability improvement 2018-06-18 21:42:52 +01:00
David Goodwin c147eb053b move to use db_assoc() rather than db_array() (code assumes assoc. array) 2018-02-10 21:08:29 +00:00
Adrien Crivelli 15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
David Goodwin 99147d51eb move public facing stuff into public/, this allows us to stop exposing templates_c/ etc to the world 2018-01-25 20:27:09 +00:00