Skip to content

Commit

Permalink
Merge branch 'release/1.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
endelwar committed Jun 18, 2017
2 parents 8cec216 + 7a2ab47 commit 1f5a656
Show file tree
Hide file tree
Showing 198 changed files with 24,733 additions and 45,474 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
1.2.4
-----------
Improvements
- Converted remaining graph to Chart.js and removed JpGraph dependency
- Add OS detection in Software Version page
- Add geoip_update cron script
- New graph: Messages per Hour for the last 24 hours
- Recognition of Message/Partial as attachment in view mail
- Beautify error message on database exception
- Add visual display for released and learned messages
- Add a comunity code of conduct
- Localization updates

Fixes
- Fix wrong MAILWATCH_SMTP_HOSTNAME defined check
- Correct some graph generation
- Fix timestamp field autoupdating in maillog table
- Fix status mail queues in MailWatch cluster

1.2.3
-----------
Improvements
Expand Down
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@mailwatch.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
4 changes: 0 additions & 4 deletions MailScanner_perl_scripts/MailWatch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
4 changes: 0 additions & 4 deletions MailScanner_perl_scripts/SQLBlackWhiteList.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
4 changes: 0 additions & 4 deletions MailScanner_perl_scripts/SQLSpamSettings.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# MailWatch for MailScanner

MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL, JpGraph and and others usefull libraries
MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL, Chart.js and and others usefull libraries

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Expand All @@ -14,7 +14,7 @@ It comes with a CustomConfig modules for MailScanner which causes MailScanner to
* Colour-coded display of recently processed mail.
* Drill-down onto each message to see detailed information.
* Quarantine management allows you to release, delete or run SpamAssasin `sa-learn` across any quarantined messages.
* Reports with customisable filters and graphs by JpGraph.
* Reports with customisable filters and graphs by Chart.js.
* Tools to view Virus Scanner status, MySQL database status and to view the MailScanner configuration files.
* Utilities for Postfix and Sendmail to monitor and display the mail queue sizes and to record and display message relay information.
* Multiple user levels: user, domain and admin that limit the data and features available to each.
Expand All @@ -28,7 +28,7 @@ It comes with a CustomConfig modules for MailScanner which causes MailScanner to
* HtmlPurifier
* IPSet
* ircmaxell/password_compat
* JPGraph
* Chart.js
* MaxMind GeoIP
* Pear Mail
* Pear Pager
Expand Down
3 changes: 2 additions & 1 deletion create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ CREATE TABLE IF NOT EXISTS `inq` (

CREATE TABLE IF NOT EXISTS `maillog` (
`maillog_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`id` mediumtext COLLATE utf8_unicode_ci,
`size` bigint(20) DEFAULT '0',
`from_address` mediumtext COLLATE utf8_unicode_ci,
Expand Down Expand Up @@ -128,6 +128,7 @@ CREATE TABLE IF NOT EXISTS `maillog` (
`token` CHAR(64) COLLATE utf8_unicode_ci DEFAULT NULL,
`released` tinyint(1) DEFAULT '0',
`salearn` tinyint(1) DEFAULT '0',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`maillog_id`),
KEY `maillog_datetime_idx` (`date`,`time`),
KEY `maillog_id_idx` (`id`(20)),
Expand Down
4 changes: 0 additions & 4 deletions fix_quarantine_permissions
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
29 changes: 11 additions & 18 deletions mailscanner/auto-release.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down Expand Up @@ -86,35 +82,32 @@
}
} else {
$output[] = __('notallowed59');
} ?>
}
echo '
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo __('title59'); ?></title>
<title>' . __('title59') . '</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/favicon.png">
<link rel="stylesheet" href="style.css" type="text/css">
<?php if (is_file(__DIR__ . '/skin.css')) {
echo '<link rel="stylesheet" href="skin.css" type="text/css">';
} ?>
' . (is_file(__DIR__ . '/skin.css') ? '<link rel="stylesheet" href="skin.css" type="text/css">' : '') . '
</head>
<body class="autorelease">
<div class="autorelease">
<img src="<?php echo MAILWATCH_HOSTURL . IMAGES_DIR . MW_LOGO; ?>" alt="<?php echo __('mwlogo99'); ?>">
<img src="' . MAILWATCH_HOSTURL . IMAGES_DIR . MW_LOGO . '" alt="' . __('mwlogo99') . '">
<div class="border-rounded">
<h1><?php echo __('title59'); ?></h1>
<?php
foreach ($output as $msg) {
echo '<p>' . $msg . '</p>';
} ?>
<h1>' . __('title59') . '</h1>' . "\n";
foreach ($output as $msg) {
echo '<p>' . $msg . '</p>' . "\n";
}
echo '
</div>
</div>
</body>
</html>
<?php

</html>';
} else {
echo __('cannot_read_conf');
}
4 changes: 0 additions & 4 deletions mailscanner/bayes_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/checklogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/clamav.awk
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/clamav_status.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
10 changes: 3 additions & 7 deletions mailscanner/conf.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down Expand Up @@ -105,14 +101,12 @@ define('PROXY_USER', '');
define('PROXY_PASS', '');

// Paths
define('MAILWATCH_HOME', '/opt/mailwatch/mailscanner');
define('MAILWATCH_HOME', '/var/www/html/mailscanner');
define('MS_CONFIG_DIR', '/etc/MailScanner/');
define('MS_SHARE_DIR', '/usr/share/MailScanner/'); // Path for ConfigDefs.pl file
define('MS_LIB_DIR', '/usr/lib/MailScanner/'); // Path for sophos-wrapper file
define('MS_EXECUTABLE_PATH', '/usr/sbin/MailScanner');
define('IMAGES_DIR', './images/'); // Trailing slash needed
define('CACHE_DIR', './images/cache/'); // JpGraph cache
define('TTF_DIR', './lib/jpgraph/src/fonts/'); // JpGraph fonts
define('SA_DIR', '/usr/bin/');
define('SA_RULES_DIR', '/usr/share/spamassassin/');
define('SA_PREFS', MS_CONFIG_DIR . 'spamassassin.conf'); // spam.assassin.prefs.conf in V4, spamassassin.conf in V5
Expand Down Expand Up @@ -307,3 +301,5 @@ define('RESET_LINK_EXPIRE', 1);
// define('PWD_RESET_FROM_ADDRESS', 'support@yourdomain.com'); // Set is you wish reset email sent from alternative address.
/* End Password Reset */

// Interval for the traffic chart for admins in minutes (default is 60, max 1440 (24h))
define('STATUSGRAPH_INTERVAL', 60);
29 changes: 24 additions & 5 deletions mailscanner/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down Expand Up @@ -63,7 +59,30 @@ public static function connect($host = '', $username = '', $password = '', $data
}
self::$link->set_charset($charset);
} catch (Exception $e) {
die(__('diedbconn103') . ' ' . $e->getCode() . ' ' . $e->getMessage() . PHP_EOL);
$output = '
<style>
.db-error {
width: 40%;
margin: 0 auto;
text-align: center;
margin-top: 100px;
border: solid 3px #ebcccc;
-webkit-border-radius:20px;
-moz-border-radius:20px;
border-radius:20px;
background-color: #f2dede;
color: #a94442;
}
.db-error .emphasise {
font-weight:bold;
font-size:larger;
}
</style>
<div class="db-error">';
$output .= __('dbconnecterror99');
$output .= '</div>';
die($output);
}
}
return self::$link;
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/do_message_ops.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/f-prot.awk
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
# your version of the program, but you are not obligated to do so.
# If you do not wish to do so, delete this exception statement from your version.
#
# As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
# as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
# JpGraph.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
Expand Down
4 changes: 0 additions & 4 deletions mailscanner/f-prot_status.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
* your version of the program, but you are not obligated to do so.
* If you do not wish to do so, delete this exception statement from your version.
*
* As a special exception, you have permission to link this program with the JpGraph library and distribute executables,
* as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from
* JpGraph.
*
* You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
Expand Down
Loading

0 comments on commit 1f5a656

Please sign in to comment.