Commit Graph

30 Commits

Author SHA1 Message Date
Laurent Dinclaux
efcca69d43 Fix double HTML escaping in switcher and harden JS edge cases 2026-02-11 01:18:10 +11:00
Laurent Dinclaux
da573c184e Merge parent_id migration into single 2026021000 upgrade script 2026-02-10 23:34:38 +11:00
Laurent Dinclaux
08797ab5a8 Add parent_id column for alias identity support
Migration and initial schemas for linking alias identities to parent
accounts via a nullable parent_id foreign key.
2026-02-10 22:28:20 +11:00
Laurent Dinclaux
fd9836c7ae Add custom auth, connection testing, preconfig_only, and security fixes
Major form improvements:
- Custom SMTP/Sieve credentials (separate username/password per protocol)
- Connection testing on save (IMAP, SMTP, Sieve) with localized errors
- preconfig_only mode to restrict domains to preconfigured entries
- Form POST value preservation on save errors (auth selects, passwords)
- Smart host placeholders (SMTP/Sieve default to IMAP host)

Security and bug:
- Fix password re-encryption bug (was comparing raw vs encrypted values)
- Fix XSS: escape label output in special folders form
- Fix parse_url() return value not checked for false
- Fix decrypt() failures not handled (fallback to empty string)
- Sanitize log output (remove raw POST data from log messages)
- Replace weak == comparisons with strict === (PHP and JS)

SQL changes:
- Consolidate 4 migrations (2026021000-03) into single 2026021000
- Remove now unused notify_sound_url column
- Add smtp_username, smtp_password, sieve_username, sieve_password columns
2026-02-10 20:50:05 +11:00
Laurent Dinclaux
12572b563d Add background mail checking and new mail notifications 2026-02-10 17:13:57 +11:00
Laurent Dinclaux
6ea4aee0a7 Add managesieve (Sieve) support for remote accounts
When switching identities, the managesieve plugin still connected to
the default sieve server. Hook into managesieve_connect to redirect
the sieve connection to the remote account's server.

Adds sieve_host, sieve_port and sieve_auth columns to the database,
a Sieve section to the identity settings form, preconfig support for
sieve_host, and localized labels for all 7 languages.
2026-02-10 14:03:47 +11:00
Laurent Dinclaux
3c4d856d60 Fix SQL schema issues across all database engines
- Increase password column from varchar(64) to varchar(255) to
  prevent silent truncation of encrypted passwords
- Add missing UNIQUE constraint on iid in MySQL
- Add missing IX_ident_switch_iid index in PostgreSQL
- Remove deprecated int display width in MySQL (int(10) -> int)
- Fix trailing comma syntax error in SQLite 2018121800 migration
- Normalize indentation across all initial SQL files
- Add migration 2026021000 for all engines to fix existing installs
2026-02-10 14:02:52 +11:00
Boris Gulay
7795a0fbf9 Fix SQlite scripts. Thanx to T S. Closes #76 2020-12-16 23:56:28 +03:00
Boris Gulay
072ef65fdf Add option to disable SMTP auth
Closes #61
2020-06-01 16:34:19 +03:00
Boris Gulay
312026b059 Quote all identifier for MySQL/MariaDB. Closes #54 2020-04-21 21:30:21 +03:00
Boris Gulay
8176ab9c26 Add Postgres migration for special folders 2019-12-26 22:56:17 +03:00
Christian Landvogt
fa0d0c1684 adjust MySQL database - postgres and sqlite are missing! 2019-12-13 12:37:42 +01:00
Boris Gulay
148052a6d0 Add delimiter to account setup. Closes #50 2019-11-24 18:48:25 +03:00
Boris Gulay
652d1aaa1f Fix field names in CHECK. Thanx Tina Rosenstein 2019-07-30 23:14:30 +03:00
Boris Gulay
4a20b77edb Fix incorrect field names in CHECKs (#42) 2019-04-14 17:51:01 +03:00
Boris Gulay
89791e1f49 Fix sqlite scripts. Closes #35. 2019-02-03 19:48:43 +03:00
Boris Gulay
f164ccfd05 SQLite script updates for new SMTP feature. 2019-01-10 23:55:33 +03:00
Boris Gulay
6ba63dfe50 Updated MySQL scripts to work with new SMTP feature.
Closes #34
Closes #26
2019-01-08 15:26:04 +03:00
Boris Gulay
f796334126 Add ability to specify SMTP server directly.
Closes #32.
Closes #30.
2018-12-22 13:31:25 +03:00
Boris Gulay
ea21509f2a Added initial script for SQLite. Thanx to Gergely Papp. Closes #29. 2018-10-12 17:32:58 +03:00
Boris Gulay
a437a107ba Drop NOT NULL for username column.
Someone please check MySQL script!
2018-07-16 18:55:12 +03:00
Boris Gulay
7a97816d1c Username is not a required field anymore. If empty - email from identity
is used.
2016-06-02 16:17:48 +03:00
Boris Gulay
6849c47fd9 Renamed initial file for PgSQL because of incorrect DB driver name. 2016-06-02 15:56:07 +03:00
Boris Gulay
f28fb5bb58 Added initial script for MySQL (thanx Wouter de Geus). Closes #1. 2016-05-27 22:46:58 +03:00
Boris Gulay
6705312240 Removed NOT NULL constraints in initial file. 2016-05-21 01:22:41 +03:00
Boris Gulay
bbf28eed57 Label and host are not required from now. 2016-05-20 23:21:15 +03:00
Boris Gulay
0e92fe4f02 Allow port field to be NULL (using default port in that case). 2016-05-11 14:31:34 +03:00
Boris Gulay
b0149a99c2 Boolean fields changed to int. 2016-05-11 12:05:42 +03:00
Boris Gulay
440616d6ff Cleaned up SQL directory. I will start with pgsql only. 2016-05-11 11:32:54 +03:00
Boris Gulay
f9b2762d30 Really initial commit. 2016-04-28 00:43:39 +03:00