Commit Graph
519 Commits
Author SHA1 Message Date
Sven Strickroth 42981d5b70 Check for address validity before checking domain existence
get_domain_properties might throw.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2026-01-25 16:29:58 +01:00
David Goodwin 7f1d78e2cd fix issues from merging #958 - no longer provide smtp_password to smtp_mail(..) call, as it does it internally now 2026-01-01 13:40:17 +00:00
Christian Boltz d50d171914 Fix 404 when loading css etc. for admins
For admins, the relative path to css etc. is '', not '../'
2025-09-11 21:56:35 +02:00
David Goodwin 0d5edbf099 move pacol() into PFAHandler class, I think it makes more sense for it to be there given the dependency between the two 2025-07-13 10:12:22 +01:00
David Goodwin a0a6944f3a fix wrong name for table_name 2025-06-17 19:19:00 +01:00
David Goodwin edb368edb0 merge postfixadmin_4.0 in, fix conflicts in model/TotpPf.php 2025-06-17 19:18:03 +01:00
David Goodwin 986aefbdd0 stfu psalm - Encoding definitely takes a value 2025-06-11 21:26:34 +01:00
David Goodwin 5f9d0f5223 try and allow endroid\qrcode v5 to be installed, if the version of PHP supports it ... this reduces the number of deprecation warnings shown (but does not remove them all) 2025-06-11 21:25:09 +01:00
David Goodwin 1a1d3f4977 token tidy up to TotpPF 2025-06-01 20:04:53 +01:00
David Goodwin e7e59bc4ae remove x/y suffix, improve error handling message when failing to delete a totp exception 2025-06-01 18:59:54 +01:00
David Goodwin 838144bfa0 typo fix (tablename/table_name) 2025-05-26 19:42:52 +01:00
Christian Boltz b71df0b403 TotoPf: use correct table name 2025-05-26 19:41:24 +01:00
Christian Boltz 0e7099c862 TotoPf: use correct table name 2025-05-26 20:04:17 +02:00
David Goodwin 5f46bdedaf respect db prefix stuff for the TOTP database tables. 2025-05-26 15:49:29 +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 cb12b6f3ec formatting 2025-04-21 19:33:48 +01:00
David Goodwin ee3329a91c i think this is an actual fix for #913 - add a htmlentities_no_double_encode modifier to smarty and use it to hopefully escape the itemkey variable... 2025-04-11 09:56:56 +01:00
David Goodwin c8bf8ec642 register htmlentities earlier, although i do not think this changes anything 2025-04-11 09:26:42 +01:00
David Goodwin 759304ecb8 apparently these all need reformatting 2024-12-05 14:33:41 +00:00
David Goodwin 8ec9140673 fix: "PHP Deprecated: Using unregistered function "htmlentities" in a template..." from Smarty, see https://github.com/postfixadmin/postfixadmin/issues/872 2024-11-22 20:28:34 +00:00
David Goodwin 24b3b12581 MailboxHandler: change mailbox_postcreation_hook and maildir_name_hook CONF callable check to use is_callable() and not is_string() && function_exists() - this should allow someone to define a PHP 7+ style anonymous function within their config, add unit test to illustrate behaviour etc
see also #869 and #812
2024-11-12 20:12:53 +00:00
Gianluca Giacometti 5bcfc0f613 Fix typo (#867)
typo fix in config file for mailbox_postcreation_hook; thanks @gianlucagiacometti
2024-11-11 08:54:35 +00:00
Christian Boltz dc51b00ce1 Fix formatting 2024-11-10 22:19:22 +01:00
David Goodwin 25bab8d7a2 code formatting 2024-11-09 14:47:28 +00:00
Gianluca Giacometti bfebea5f3c Create new_mailbox_hook function (#864)
* Add new postcreate mailbox hook ( mailbox_postcreation_hook ) - which can be called after a mailbox is created (similar to mailbox_postcreation_script). 

Thanks @gianlucagiacometti !
2024-11-09 08:23:26 +00:00
Gianluca Giacometti 9b169e27f9 smtp_active should be a checkboox (#861) 2024-11-05 19:08:26 +00:00
David Goodwin e1c64f887f reformat code 2024-10-30 19:29:55 +00:00
kvassss 5de5fb2719 Fix deprecated config parameter error (#859)
add create_mailbox_subdirs to deprecated list - stop error_log() call for it from Config.
see also #812 
Co-authored-by: Sergey Lisenko <lisenkosergey@loc.tashkent.uz>
2024-10-30 15:04:19 +00: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 f3ce7e232d token formatting changes 2024-05-17 22:03:55 +01:00
David Goodwin 56dd787ce2 when going through password recovery, only wipe the recovery token after the user has updated their password
see https://github.com/postfixadmin/postfixadmin/issues/550
2024-05-17 22:02:01 +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
David Goodwin d3dfe6382b fix syntax error added in 4ae78cd172 and #823 2024-04-22 21:00:12 +01:00
Nuno TavaresandNuno Tavares 4ae78cd172 dont assume 'quota' will be in the values, just like block before wasn't assuming (#823)
Co-authored-by: Nuno Tavares <n.tavares@portavita.eu>
2024-04-22 08:35:55 +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 279e7f682d underlying db field is set to an int (for mysql and pgsql), pgsql does not cope with t/f being set for an inty field, so change the model definition .... - see #814 2024-04-07 19:37:41 +01:00
David Goodwin 62a76734c9 see #812 - remove config options for create_mailbox_subdirs_* due to the php-imap module being deprecated; leave in an error_log message to perhaps avoid future support tickets asking why this does not work 2024-04-01 19:38:31 +01:00
David Goodwin 81a1d45617 drop use of the deprecated PHP imap extension (php-imap) - see #472 and #812 2024-04-01 19:32:47 +01:00
David Goodwin c422a4bad2 see #808 - db_log expects 3 strings ... make sure we do not pass in a null 2024-03-08 11:46:14 +00:00
David Goodwin eda637df1a Merge branch 'master' into michaelkrieger-patch-1 2024-01-11 08:51:17 +00:00
John Fawcett 668960ccf6 Add a flag to mailbox table for enable/disable smtp protocol. The table column name
is "smtp_active". This enables use of this flag instead of active flag for postfix
mysql queries. There is a new configuration parameter $CONF['smtp_active_flag'] =
YES or NO, which defaults to NO, providing the existing behaviour. When set to YES
the active_smtp field is displayed in the edit mode and can be modified.
The commit includes update to the language files and documentation.

The commit does not include the code to add the field to existing installs,
which I presume can be added during the release cycle in upgrade.php along the
lines of:

_db_add_field('mailbox',  'smtp_active', 'int DEFAULT 1');
2024-01-09 20:50:49 +01:00
David Goodwin 6e6e4301ed an empty check would catch null ... while != "" will also match null it feels wrong 2024-01-05 19:31:54 +00:00
David Goodwin 6b5801c666 typo fixes 2024-01-05 19:30:16 +00:00
David Goodwin 39e378c783 improve type hinting 2023-12-27 16:17:55 +00:00
David Goodwin dc792a0222 add unit test to cover some of Login::addAppPassword() 2023-12-27 16:17:55 +00:00
David Goodwin 8003978ca5 type hints etc and todo notes 2023-12-23 21:55:50 +00:00
David Goodwin 824ba906b1 more type hints 2023-12-23 21:49:57 +00:00
David Goodwin 4d6767cc37 avoid sql injection 2023-12-23 21:47:57 +00: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