diff options
| author | Carson Fleming <[email protected]> | 2026-02-12 00:09:12 -0500 |
|---|---|---|
| committer | Carson Fleming <[email protected]> | 2026-02-12 00:09:12 -0500 |
| commit | 73d87c23b9bfa893560f93a677e20e1a47974e0c (patch) | |
| tree | 87d1123f24d38a376bf339c7cb501498ef33eb42 /config.inc.php.dist | |
| parent | dcef208b2fd2a0628fc15763d7b2ab9571430b95 (diff) | |
| download | rc-inbox-settings-73d87c23b9bfa893560f93a677e20e1a47974e0c.tar.gz | |
draft of storage control
Diffstat (limited to 'config.inc.php.dist')
| -rw-r--r-- | config.inc.php.dist | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/config.inc.php.dist b/config.inc.php.dist index a7c045d..f8e559f 100644 --- a/config.inc.php.dist +++ b/config.inc.php.dist @@ -35,7 +35,7 @@ $config['inbox_settings_encryption_enabled_query'] = 'SELECT encrypt FROM users // %d - the domain part of the username // (in case the username is an email address) // %se - whether the inbox should be encrypted (boolean) -$config['inbox_settings_update_encryption_query'] = 'UPDATE users SET encrypt = ? WHERE username = %u'; +$config['inbox_settings_update_encryption_query'] = 'UPDATE users SET encrypt = %se WHERE username = %u'; // The SQL query used to select a user's forwarding addresses. // Supported replacement variables: @@ -61,7 +61,32 @@ $config['inbox_settings_forwarding_addresses_query'] = 'SELECT addr, fwd_addr, a // %ad - the domain part of the forwarding address // %sf - whether forwarding is set for this address (boolean) // %sa - the new forwarding address (string) -$config['inbox_settings_update_forwarder_query'] = 'UPDATE forwarders SET fwd_addr = %sf, active = %sa WHERE addr = %fa'; +$config['inbox_settings_update_forwarder_query'] = 'UPDATE forwarders SET fwd_addr = %sf, active = %sa WHERE addr = %aa'; + +// The SQL query used to select a user's storage addresses. +// Supported replacement variables: +// %h - user's IMAP hostname +// %u - the username (from the session info) +// %l - the local part of the username +// (in case the username is an email address) +// %d - the domain part of the username +// (in case the username is an email address) +$config['inbox_settings_stored_addresses_query'] = 'SELECT username, store FROM users WHERE username = %u'; + +// The SQL query used to update a user's forwarding setting for an address. +// Supported replacement variables: +// %h - user's IMAP hostname +// %u - the username (from the session info) +// %l - the local part of the username +// (in case the username is an email address) +// %d - the domain part of the username +// (in case the username is an email address) +// %aa - the full email address in question +// (returned as `addr` from the above query) +// %al - the local part of the email address +// %ad - the domain part of the email address +// %ss - whether storage is enabled this address (boolean) +$config['inbox_settings_update_stored_address_query'] = 'UPDATE users SET store = %ss WHERE username = %aa'; // The SQL query used to select a user's PGP keys. // Supported replacement variables: |
