Commit Graph
117 Commits
Author SHA1 Message Date
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 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
Copilot ae7339afd4 Use native booleans for prepared SQL params; stop binding db_get_boolean() values (#1019)
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
2026-04-23 19:28:01 +01:00
David Goodwin 57378ee157 see #992 - try and remove bash-ism from postfixadmin-cli wrapper; manual merge of provided patch 2026-03-24 12:24:21 +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 16facd0fb8 scripts/postfixadmin-cli.php : see #385 - add to the current error reporting level, not trample all over it 2025-08-27 08:51:03 +01:00
David Goodwin ad68f20f82 avoid passing null to exit, see also #921 2025-05-17 19:51: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 fa56b1ccb8 scripts/examples/vacation-cron.php: add db_get_boolean() call, this should let it work on postgresql too 2024-06-01 08:57:57 +01:00
David Goodwin c32f344b9d formatting? 2024-05-31 19:27:12 +01:00
David Goodwin 519c934ed3 Add minimal cron job to remove old vacation alias records - see https://github.com/postfixadmin/postfixadmin/issues/832 2024-05-31 19:25:53 +01: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
Shao Yu-Lung (Allen) 0876c368e4 feat: support Dovecot DIGEST-MD5 (#816)
Add support for dovecot DIGEST-MD5 auth (using : $CONF['pacrypt'] = 'dovecot:DIGEST-MD5') 

This also changes the pacrypt() function to take an optional 3rd argument (username). 
Thanks @bestlong
2024-04-12 09:57:19 +01:00
David Goodwin 015d4ec9cd reindent / reformat; add type hints for some of the app password stuff; try and make sure someone can only remove their own app password (see revokeAppPassword() ) 2023-12-23 21:43:31 +00:00
David Goodwin 4d17aa6ef9 manaul merge in of verdigado:master (see #753) (MFA/TOTP support) 2023-12-23 17:05:52 +00:00
David Goodwin 2882f86ad8 fix formatting 2022-06-28 14:06:33 +01:00
David Goodwin 2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01: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 ddafed6f4d fix php8 moaning about { } on strings 2021-01-18 20:46:25 +00:00
David Goodwin d49de35189 improve docs 2020-06-23 21:14:29 +01:00
Christian Boltz ad4142134a merge __parseParams() into parseParams() 2020-05-02 01:30:25 +02:00
Christian Boltz 9833a8f289 whitespace fix in __parseParams() 2020-05-02 01:26:35 +02:00
Christian Boltz 4e9e3db75d Fix parameter parsing for '-1'
'--quota -1' gets parsed as two options ("quota" and "1"), but it's
meant to be "quota => -1".

Make sure '-1' is considered as a value, not as an option.

Also get rid of unset()'ing $params[$i] and (now?) superfluous recursive
calls to __parseParams() to make the code less confusing.
2020-05-02 01:24:08 +02:00
David Goodwin 2742849e7b reformat 2019-09-17 21:06:00 +01:00
David Goodwin 34e6f7829e tighten psalm checks; fix errors 2019-09-17 20:55:14 +01:00
David Goodwin 034a50836c tighten psalm checks 2019-09-17 20:50:42 +01:00
David Goodwin f7c7e35b34 fix formatting 2019-09-15 11:42:21 +01:00
David Goodwin 17a50c51f1 drop some dies; use Exception and catch after dispatch() - see #197 2019-09-14 21:01:09 +01:00
David Goodwin 2ff05bc737 typo 2019-09-14 20:17:16 +01:00
David Goodwin 9cd7dac187 initial attempt at trying to return an exit value within the cli 2019-09-14 20:09:56 +01:00
Lars Liedtke 0c94760828 Update postfixadmin-cli
Make this script platform independent to be usable under e.g. FreeBSD, where bash is located in /usr/local/bin/bash and thus the script fails.
2019-09-06 10:20:42 +02:00
David Goodwin 4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
David Goodwin 029c4ffe47 psalm fixes 2018-12-27 13:55:41 +00:00
David Goodwin 6d328795cb remove windows code; remove array_merge (seems to just break parsing) 2018-07-02 21:54:49 +01:00
David Goodwin aa38d0090d token fixes; code looks incomplete anyway 2018-06-18 21:36:25 +01:00
David Goodwin 97c48a0fc9 fix phpdoc 2018-06-18 21:35:20 +01:00
David Goodwin b48f99d4c6 reformat (phpcs) 2018-05-02 12:54:17 +01:00
Christian Boltz c7201afa6c drop unused shells/mailbox.php 2018-03-25 21:48:16 +02:00
Christian Boltz 12c4a4f29e move shells/shell.php to model/Shell.php
... and drop a few lines in postfixadmin-cli.php that became superfluous
by this move (thanks autoloader!)
2018-03-25 21:44:42 +02:00
Christian Boltz 71d61a1d8a drop superfluous Config::read('all') call 2018-03-25 21:38:45 +02:00
Christian Boltz 48a3709041 postfixadmin-cli: get rid of empty/unused initialize() 2018-03-25 21:34:26 +02:00
Christian Boltz 36fe1f6ccc remove deleted functions from $protectedCommands
If grep -r doesn't find a function, we don't need to keep it in
$protectedCommands ;-)
2018-03-25 21:23:52 +02:00
Christian Boltz 5e93dfe604 postfixadmin-cli: drop (undocumented) -webroot etc.
Dropping the -webroot parameter (which basically means hardcoding that
../common.php has to exist) allows to do quite some cleanup.

Also unconditionally require_once('../common.php') to ensure that
everything we expect in the global namespace (like the 'Conf' class) is
there.

This allows even more cleanup. We get rid of __bootstrap() and some
constants, and can simplify parameter handling.
2018-03-25 21:15:45 +02:00
David Goodwin 2f7d3d9534 remove (possibly) unnecessary Config::read(all) calls ... see #144 2018-02-27 21:16:54 +00:00
Adrien Crivelli 15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
David Goodwin 252d42dcc0 fix perms (executable) 2017-09-07 14:54:32 +01:00
Christian Boltz 13cdd50d0a Add checks to login.php and cli to ensure database layout is up to date
- add check_db_version() to functions.inc.php
- add $min_db_version (needs to be updated at least before the release)
- call check_db_version in login.php, users/login.php and CLI - they'll
  error out if the database layout is outdated
- change setup.php to use check_db_version()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1853 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-22 19:58:54 +00:00
Christian Boltz 694d13f6db delete suprefluous whitespace
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1843 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-20 20:58:13 +00:00
David Goodwin 54603b0968 reforamt cli commands; update code to php v5 syntax; remove regexp and use filter_var for email validation; use private/protected/public
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1840 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-20 19:55:55 +00:00