1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

111 Commits

Author SHA1 Message Date
ad68f20f82 avoid passing null to exit, see also #921 2025-05-17 19:51:37 +01:00
798e8b269c Topt app passwords fixes (WIP) (#805)
various improvements to the TOTP code see also:  #802
2025-05-16 20:31:20 +01:00
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
c32f344b9d formatting? 2024-05-31 19:27:12 +01:00
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
f01274ec94 try relaxing composer dependencies to allow php8.2 dev support, reformat so composer format passes 2024-04-22 21:02:01 +01:00
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
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
4d17aa6ef9 manaul merge in of verdigado:master (see #753) (MFA/TOTP support) 2023-12-23 17:05:52 +00:00
2882f86ad8 fix formatting 2022-06-28 14:06:33 +01:00
2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
ddafed6f4d fix php8 moaning about { } on strings 2021-01-18 20:46:25 +00:00
d49de35189 improve docs 2020-06-23 21:14:29 +01:00
ad4142134a merge __parseParams() into parseParams() 2020-05-02 01:30:25 +02:00
9833a8f289 whitespace fix in __parseParams() 2020-05-02 01:26:35 +02:00
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
2742849e7b reformat 2019-09-17 21:06:00 +01:00
34e6f7829e tighten psalm checks; fix errors 2019-09-17 20:55:14 +01:00
034a50836c tighten psalm checks 2019-09-17 20:50:42 +01:00
f7c7e35b34 fix formatting 2019-09-15 11:42:21 +01:00
17a50c51f1 drop some dies; use Exception and catch after dispatch() - see #197 2019-09-14 21:01:09 +01:00
2ff05bc737 typo 2019-09-14 20:17:16 +01:00
9cd7dac187 initial attempt at trying to return an exit value within the cli 2019-09-14 20:09:56 +01:00
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
4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
029c4ffe47 psalm fixes 2018-12-27 13:55:41 +00:00
6d328795cb remove windows code; remove array_merge (seems to just break parsing) 2018-07-02 21:54:49 +01:00
aa38d0090d token fixes; code looks incomplete anyway 2018-06-18 21:36:25 +01:00
97c48a0fc9 fix phpdoc 2018-06-18 21:35:20 +01:00
b48f99d4c6 reformat (phpcs) 2018-05-02 12:54:17 +01:00
c7201afa6c drop unused shells/mailbox.php 2018-03-25 21:48:16 +02:00
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
71d61a1d8a drop superfluous Config::read('all') call 2018-03-25 21:38:45 +02:00
48a3709041 postfixadmin-cli: get rid of empty/unused initialize() 2018-03-25 21:34:26 +02:00
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
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
2f7d3d9534 remove (possibly) unnecessary Config::read(all) calls ... see #144 2018-02-27 21:16:54 +00:00
15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
252d42dcc0 fix perms (executable) 2017-09-07 14:54:32 +01:00
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
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
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
5dac4295a4 postfixadmin-cli.php:
- whitelist '-1' as valid value instead of misinterpreting it as option
  https://sourceforge.net/p/postfixadmin/bugs/369/
- don't remove quote chars (") from parameter values


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1837 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-15 20:04:21 +00:00
3640a1b804 postfixadmin-cli.php:
- add fetchmail to module list


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1784 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-26 18:01:54 +00:00
d9e30fb41b Add CliScheme.php:
- displays the database scheme (for usage in upgrade.php)

PFAHandler:
- add "Scheme" to the list of available tasks

postfixadmin-cli.php:
- add "scheme" to help

This is the first patch of a series sponsored by 
    Bund der Deutschen Landjugend (german rural youth)
	http://bdl.landjugend.info/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1710 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-01 18:08:11 +00:00
da14ddf6d7 postfixadmin-cli.php:
- __parse_params(): only check for first character if $params[$i]
  is not empty (avoids PHP warning)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1660 a1433add-5e2c-0410-b055-b7f2511e0802
2014-04-27 13:34:03 +00:00
252ae047d5 various files:
- get rid of global $table_* variables, use table_by_key() instead



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1601 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 19:41:01 +00:00
a9e0638d82 postfixadmin-cli.php:
- update help()
- comment out commands() - it's outdated and now unused


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1599 a1433add-5e2c-0410-b055-b7f2511e0802
2013-12-08 16:32:14 +00:00