/usr/share/squirrelmail/plugins/squirrel_logger/setup.php is in squirrelmail-logger 2.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | <?php
/**
* SquirrelMail Squirrel Logger Plugin
*
* Copyright (c) 2005-2011 Paul Lesniewski <paul@squirrelmail.org>
* Copyright (c) 2002-2003 Pat Winn <ptwinn@velocibyte.com>
* Copyright (c) 2001-2004 Ron Chinn <ron@squeaksoft.com>
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* @package plugins
* @subpackage squirrel_logger
*
*/
/**
* Register this plugin with SquirrelMail
*
*/
function squirrelmail_plugin_init_squirrel_logger()
{
global $squirrelmail_plugin_hooks;
$squirrelmail_plugin_hooks['login_verified']['squirrel_logger']
= 'sl_log_login';
$squirrelmail_plugin_hooks['logout']['squirrel_logger']
= 'sl_log_logout';
$squirrelmail_plugin_hooks['logout_error']['squirrel_logger']
= 'sl_log_login_error';
$squirrelmail_plugin_hooks['error_box']['squirrel_logger']
= 'sl_log_error';
$squirrelmail_plugin_hooks['compose_send']['squirrel_logger']
= 'sl_monitor_present_msgs';
$squirrelmail_plugin_hooks['compose_send_after']['squirrel_logger']
= 'sl_monitor_sent_msgs';
$squirrelmail_plugin_hooks['configtest']['squirrel_logger']
= 'squirrel_logger_check_configuration';
}
/**
* Returns info about this plugin
*
*/
function squirrel_logger_info()
{
return array(
'english_name' => 'Squirrel Logger',
'authors' => array(
'Paul Lesniewski' => array(
'email' => 'paul@squirrelmail.org',
'sm_site_username' => 'pdontthink',
),
),
'version' => '2.3.1',
'required_sm_version' => '1.2.7',
'requires_configuration' => 1,
'requires_source_patch' => 0,
'summary' => 'Logs user activity to file/database/syslog.',
'details' => 'This plugin implements logging functionality for your webmail interface. You can choose to log to a database, a file, your system log, or any combination thereof. You can also choose which kinds of events to log, including login events, logout events, login error events, all outgoing messages, possible outgoing spam messages, and other error events.<br /><br />Also included is monitoring functionality that will send alert emails to the administrator when certain events trigger.<br /><br />If you use the timeout_user plugin, logout events caused by user timeouts will be captured.<br /><br />Log message format is also completely custom-defined to meet your needs in the configuration file.',
'required_plugins' => array(
'compatibility' => array(
'version' => '2.0.10',
'activate' => FALSE,
)
)
);
}
/**
* Returns version info about this plugin
*
*/
function squirrel_logger_version()
{
$info = squirrel_logger_info();
return $info['version'];
}
/**
* Log user logins
*
*/
function sl_log_login()
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_log_login_do();
}
/**
* Log user logouts
*
*/
function sl_log_logout()
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_log_logout_do();
}
/**
* Log user login errors
*
*/
function sl_log_login_error($args)
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_log_login_error_do($args);
}
/**
* Log user errors
*
*/
function sl_log_error($args)
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_log_error_do($args);
}
/**
* Monitor mails being sent, watching for possible mass mailings (spam)
*
*/
function sl_monitor_present_msgs($args)
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_monitor_present_msgs_do($args);
}
/**
* Monitor mails when they are sent
*
*/
function sl_monitor_sent_msgs($args)
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
sl_monitor_sent_msgs_do($args);
}
/**
* Validate that this plugin is configured correctly
*
* @return boolean Whether or not there was a
* configuration error for this plugin.
*
*/
function squirrel_logger_check_configuration()
{
include_once(SM_PATH . 'plugins/squirrel_logger/functions.php');
return squirrel_logger_check_configuration_do();
}
|