diff options
-rw-r--r-- | config/imspector-wip/imspector.inc | 40 | ||||
-rw-r--r-- | config/imspector-wip/imspector.xml | 54 |
2 files changed, 86 insertions, 8 deletions
diff --git a/config/imspector-wip/imspector.inc b/config/imspector-wip/imspector.inc index 2151755e..36cf7bec 100644 --- a/config/imspector-wip/imspector.inc +++ b/config/imspector-wip/imspector.inc @@ -230,30 +230,31 @@ if(isset($imspector_config["ssl_ca_cert"]) && $imspector_config["ssl_ca_cert"] != "none" && isset($imspector_config["ssl_server_cert"]) && $imspector_config["ssl_server_cert"] != "none") { $conf['ssl'] = "on"; - if(!is_dir("/usr/local/etc/imspector/ssl")) - mkdir("/usr/local/etc/imspector/ssl"); + if(!is_dir(IMSPECTOR_ETC . "/ssl")) + mkdir(IMSPECTOR_ETC . "/ssl"); $ca_cert = lookup_ca($imspector_config["ssl_ca_cert"]); if ($ca_cert != false) { if(base64_decode($ca_cert['prv'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_key.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_ca_key.pem", base64_decode($ca_cert['prv'])); - $conf['ssl_ca_key'] = '/usr/local/etc/imspector/ssl/ssl_ca_key.pem'; + $conf['ssl_ca_key'] = IMSPECTOR_ETC . '/ssl/ssl_ca_key.pem'; } if(base64_decode($ca_cert['crt'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_cert.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_ca_cert.pem", base64_decode($ca_cert['crt'])); - $conf['ssl_ca_key'] = "/usr/local/etc/imspector/ssl/ssl_ca_cert.pem"; + $conf['ssl_ca_cert'] = IMSPECTOR_ETC . "/ssl/ssl_ca_cert.pem"; } $svr_cert = lookup_cert($imspector_config["ssl_server_cert"]); if ($svr_cert != false) { if(base64_decode($svr_cert['prv'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_server_key.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_server_key.pem", base64_decode($svr_cert['prv'])); - $conf['ssl_key'] = '/usr/local/etc/imspector/ssl/ssl_server_key.pem'; + $conf['ssl_key'] = IMSPECTOR_ETC . '/ssl/ssl_server_key.pem'; } } + $conf['ssl_cert_dir'] = IMSPECTOR_ETC . '/ssl'; } } else { // SSL Not enabled. Make sure Jabber-SSL is not processed. @@ -261,6 +262,29 @@ unset($conf['ssl']); } + if (isset($imspector_config['resonder']) && $imspector_config['resonder'] == 'on') { + $conf['responder_filename'] = IMSPECTOR_ETC . "/responder.db"; + if (isset($imspector_config['prefix_message']) && $imspector_config['prefix_message'] != '' ) { + $conf['response_prefix'] = base64_decode($imspector_config['prefix_message']); + } + if (isset($imspector_config['notice_days']) && is_numeric($imspector_config['notice_days'])) { + if ($imspector_config['notice_days'] != 0) { + $conf['notice_days'] = $imspector_config['notice_days']; + } + } else { + $conf['notice_days'] = 1; + } + $conf['notice_response'] = "Your activities are being logged"; + if (isset($imspector_config['filtered_minutes']) && is_numeric($imspector_config['filtered_minutes'])) { + if ($imspector_config['filtered_minutes'] != 0) { + $conf['filtered_mins'] = $imspector_config['filtered_minutes']; + } + } else { + $conf['filtered_mins'] = 15; + } + $conf['filtered_response'] = "Your message has been filtered"; + } + $conftext = ''; foreach($conf as $var => $key) $conftext .= "{$var}={$key}\n"; diff --git a/config/imspector-wip/imspector.xml b/config/imspector-wip/imspector.xml index 20c661cd..e0e37ac9 100644 --- a/config/imspector-wip/imspector.xml +++ b/config/imspector-wip/imspector.xml @@ -195,6 +195,60 @@ <type>checkbox</type> </field> <field> + <fielddescr>Enable response messages</fielddescr> + <fieldname>resonder</fieldname> + <description> + Inform the users (both local and remote) that the conversation they are having is being recorded. This might be needed for legal reasons. + Inform the sender that a file (or message) was blocked. This is useful because the sender will know a block occured, instead of the transfer simply failing.</description> + <type>checkbox</type> + </field> + <field> + <fielddescr>Notification frequency</fielddescr> + <fieldname>notice_days</fieldname> + <type>input</type> + <description>Frequency in number of days for notifying users they are being logged. Default 1 day if responses are enabled, set to 0 to disable</description> + </field> + <field> + <fielddescr>Filtered frequency</fielddescr> + <fieldname>filtered_minutes</fieldname> + <type>input</type> + <description>The time between sending “filtered” in minutes. Default 15 minutes if responses are enabled, set to 0 to disable</description> + </field> + <field> + <fielddescr>Custom message prefix</fielddescr> + <fieldname>prefix_message</fieldname> + <description> + Message to prepend to all IMSpector generated messages. The default is "Message from IMSpector" + </description> + <type>textarea</type> + <encoding>base64</encoding> + <rows>5</rows> + <cols>40</cols> + </field> + <field> + <fielddescr>Custom recorded message response</fielddescr> + <fieldname>recorded_message</fieldname> + <description> + Message to send to users to let them know they are being recorded. The default is "Your activities are being logged" + </description> + <type>textarea</type> + <encoding>base64</encoding> + <rows>5</rows> + <cols>40</cols> + </field> + <field> + <fielddescr>Custom filtered message response</fielddescr> + <fieldname>filtered_message</fieldname> + <description> + Message to send to users to let them know about filtered messages. + </description> + <type>textarea</type> + <encoding>base64</encoding> + <rows>5</rows> + <cols>40</cols> + </field> + + <field> <fielddescr>Bad words list</fielddescr> <fieldname>badwords_list</fieldname> <description> |