1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<?php
$config = [];
// PEAR database DSN for performing the query. By default
// Roundcube DB settings are used.
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
$config['inbox_settings_db_dsn'] = '';
// Whether we should scrub the "Encryption" tab from the preferences list.
// This may be confusing to some users since this plugin adds additional
// encryption settings in a different place.
$config['inbox_settings_scrub_encryption_preference'] = true;
// The SQL query used to select whether a user's inbox is encrypted.
// 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_encryption_enabled_query'] = 'SELECT encrypt FROM users WHERE username = %u';
// The SQL query used to update whether a user's inbox is encrypted.
// 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)
// %se - whether the inbox should be encrypted (boolean)
$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:
// %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_forwarding_addresses_query'] = 'SELECT addr, fwd_addr, active FROM forwarders 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 email address being forwarded
// (returned as `addr` from the above query)
// %al - the local part of the forwarding address
// %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 = %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 storage 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:
// %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_keys_query'] = 'SELECT id, fingerprint, comment FROM pgp_keys WHERE username = %u';
// The SQL query used to delete or deactivate a subset of a user's PGP keys.
// 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)
// %k - the key IDs being deleted
$config['inbox_settings_delete_keys_query'] = 'DELETE FROM pgp_keys WHERE id IN %k AND username = %u';
// The SQL query used add a PGP key to a user's account.
// 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)
// %f - the key fingerprint
// %k - the binary key data blob
// %c - the comment to identify the key
$config['inbox_settings_add_key_query'] = 'INSERT INTO pgp_keys (username, fingerprint, key_data, comment) VALUES (%u, %f, %k, %c)';
?>
|