86 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
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 4a38010594 Make 3.3 schema reconciliation retry-safe (#1092)
fix regression in MySQL schema upgrade from 3.3 where vacation.domain, vacation.email and quota2.username had the wrong collation.

thanks @TrapoSAMA + @Knofte
2026-07-28 09:27:38 +01:00
mkocustos 513542370d Let admins store a default for the alias "To" (goto) field (#1061)
adds new db table admin_preferences to store a default goto for aliases etc, which when populated will prefil the forward form with that value.


thanks @mkocustos
2026-07-25 10:56:40 +01:00
Rodrigo Cortés Cano 755f6c3990 Reconcile 3.3 MySQL upgrades on master (#1089)
fix regression in MySQL database update order. See #971

thanks @TrapoSAMA and @csware
2026-07-23 09:31:31 +01:00
Justin Warren 2469e045d8 Add 'description' field to alias and alias_domain tables. (#1042)
Adds a `description` field to the `alias` and `alias_domain` tables, so you can add a comment explaining why the alias exists.

Partially addresses #1036

thanks @jpwarren
2026-06-08 09:08:02 +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
Kent Riboe c6773f8390 Migrate TOTP exceptions to TotpexceptionHandler class (#1007)
refactor code to use the PFAHandler approach, allowing re-use of list.php and edit.php.
2026-04-18 10:22:54 +01:00
Kent Riboe 0f9f67be0f Add missing database indexes for domain_admins and fetchmail (#1010)
* Add missing database indexes for domain_admins and fetchmail (see #972)

Adds composite index on domain_admins(username, domain, active) for
permission checks that run on every admin operation, and index on
fetchmail(mailbox) for domain deletion cascades.
2026-04-09 09:24:57 +01:00
David Goodwin 52794bede7 misc fixes for psalm after allowing it to be updated 2026-01-28 09:50:26 +00:00
Christian Boltz 4b20d2be2b Fix hardcoded table name mailbox_app_password
... which exploded when using custom table names.
2025-09-11 22:39:57 +02:00
David Goodwin b97d89c280 try and only moan about db drivers missing if the specific driver is in the config, try and improve rendering of warnings/errors etc 2025-05-26 19:40:08 +01:00
David Goodwin 72c0dd1184 token code refactor 2025-05-26 15:53:33 +01:00
David Goodwin 4c01abf440 try and ensure core db tables are InnoDB format for MySQL users upgrading. 2025-05-26 15:51:48 +01:00
David Goodwin 5f46bdedaf respect db prefix stuff for the TOTP database tables. 2025-05-26 15:49:29 +01:00
James Lucas III dce68cdf50 Update upgrade.php (#906)
fix upgrade.php - admin.totp_secret field was not being added in the right place which caused an error. 

see also #899, thanks @jimlucas
2025-02-23 20:21:27 +00:00
David Goodwin 8461afb4ff add {BOOLEAN_TRUE} for pgsql, see #891 2025-01-18 09:01:35 +00:00
David Goodwin 9ac03371ce formatting 2025-01-17 11:20:22 +00:00
David Goodwin f61266cd7d see https://github.com/postfixadmin/postfixadmin/issues/891 - fix addition of mailbox.smtp_active to work on postgresql, add {BOOLEAN_TRUE} placeholder for mysql (not sure how this did not exist) 2025-01-17 10:43:20 +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
David Goodwin 45557a6ed4 code formatting fix 2024-01-11 08:57:27 +00:00
David Goodwin c700f3c9c7 update mailbox - add smtp_active for #796 2024-01-10 10:02:07 +00:00
David Goodwin 0829e032d4 try and fix db schema for app password stuff for Sqlite 2023-12-27 16:17:55 +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
David Goodwin fcf14f0165 rename some tables so someone migrating from 3.3.x to 3.4 (?) should not have problems 2022-12-08 20:46:47 +00:00
David Goodwin d3e101e9d8 Merge remote-tracking branch 'origin/master' into feature/dkim 2022-07-18 08:55:07 +01:00
David Goodwin 38549c48ad composer format 2022-07-17 21:16:47 +01:00
David Goodwin 64bb52d0e3 fix pgsql schema generation for dkim 2022-07-17 21:07:57 +01:00
Adrien Crivelli a97771adfd Automatic code style fixes 2022-07-15 11:29:55 +02:00
David Goodwin 2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
Fredrik Falk 9e73025058 Add Domain Key handling 2022-06-23 20:40:06 +02:00
David Goodwin 08ce130d58 try and improve mysql db collation fix - see #591 2022-02-14 21:36:33 +00:00
David Goodwin 66c71418a6 mysql does not support DROP CONSTRAINT, looks like it is MariaDB only - see https://github.com/postfixadmin/postfixadmin/issues/591#issuecomment-1021340592 2022-01-25 16:58:35 +00:00
David Goodwin 52ed517f35 also fix collation on domain_admins.domain to be latin1_general_ci - see also #327 (else a domain admin cannot login) 2021-12-07 19:42:49 +00:00
David Goodwin 047774b250 reorder upgrade sql, see #561 2021-11-21 21:32:24 +00:00
David Goodwin 7dcfb00377 composer format 2021-11-10 19:48:20 +00:00
David Goodwin 2ab28e795d fix more collation issues 2021-11-10 19:43:14 +00:00
David Goodwin 1018847cd5 fix formatting 2021-10-21 22:10:49 +01:00
David Goodwin ba825ef3c1 see #506 and #327 - this might unify enough of our textual latin1 columns to resolve collation issues 2021-10-21 22:08:25 +01:00
David Goodwin b271ae8cb8 composer format! 2021-05-13 13:17:07 +01:00
David Goodwin 8518d53906 merge postfixadmin_3.3 into master 2021-05-13 13:15:27 +01:00
David Goodwin 59f0b89233 explode on errors when performing db upgrade; try and fix #498 by updating domain created/modified columns to something MySQL might be happier with 2021-05-08 20:11:58 +01:00
David Goodwin b9ca22c918 change mailbox.name to be utf8mb4 too - see #484 2021-05-07 20:07:18 +01:00
David Goodwin 4e7b69e04c formatting 2021-05-07 19:54:17 +01:00
David Goodwin df34c100ea schema changes for https://github.com/postfixadmin/postfixadmin/pull/484 - changing vacation.subject and vacation.text to be utf8mb4 2021-05-07 19:52:45 +01:00
David Goodwin e8f3c40442 ignore this for sqlite which does not like a pk field being added 2021-04-13 21:26:11 +01:00
David Goodwin 2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin bbec16aac1 see: #475 - add domain_admins.id pk autoincrement field 2021-04-13 21:08:49 +01:00
David Goodwin e7e1ce9c28 fix postgresql test 2021-01-19 16:50:56 +00:00