GithubHelp home page GithubHelp logo

khit93 / mailguardian Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 2.0 3.96 MB

A Django-based RESTful SPA web GUI for MailScanner

Home Page: https://mailguardian.org

License: GNU General Public License v3.0

CSS 0.43% JavaScript 3.99% Vue 40.71% Python 48.20% Perl 4.28% HTML 1.34% Shell 0.64% PLpgSQL 0.41%
mailscanner spam-filter-appliance mailscanner-deployment

mailguardian's Introduction

MailGuardian

A Django-based RESTful SPA (Single Page Application) web GUI for MailScanner.

MailGuardian is your choice no matter if you need a single instance MailScanner deployment for your internal business email services or if you are a commercial hosting company, looking for a modern, reliable and scalable solution for letting you, your staff and your customers easily manage their spam filter appliance.

Features

  • Built in modern technology
  • Modern web interface that works great on your computer, phone or tablet
  • RESTful API for easy integration with other applications
  • Multi-node compatible, to allow running multiple MailScanner appliances with one web interface to manage them all
  • Three user levels to easily manage access rights

Supported browsers

  • Microsoft Edge 12 or newer
  • Mozilla Firefox 21 or newer
  • Google Chrome 23 or newer
  • Apple Safari 6 or newer for macOS/OSX
  • Android 7 or newer
  • iOS 10 or newer

Requirements

Hardware

We recommend the following requirements for your hardware, regardless of whether you are running with a physical machine or a virtual machine

  • 2 CPU cores
  • 4GB of RAM (This will vary greatly based on your database size and how much email that you are processing)
  • 20GB of SAS storage or SSD storage

Please note that these requirements are for the full single-node deployment and does therefore also include the resources necessary for MailScannerand SpamAssassinetc.

Software

  • Debian 10 Buster, Ubuntu 18.04, Ubuntu 20.04, CentOS 7 or CentOS 8
  • Python 3.6 or newer
  • Python virtualenv
  • PostgreSQL 12.x
  • Postfix 3.3+ with pgsql driver
  • Nginx 1.10+ or Apache 2.4+ with HTTP/2 support
  • sudo installed and configured on your system
  • EPEL repository for CentOS
  • Backports for Debian

Most requirements are handled by our installation script, but are listed in case that you want to install on an unsupported version or distribution, since this is technically possible as long as MailScanner, SpamAssassin and their dependencies will run.

Optional requirements

  • DataDumper library for perl for debugging (libdata-dumper-simple-perl)

Getting started

Welcome to the MailGuardian documentation. We are glad that you have chosen our applicatin to manage your MailScanner deployment. We have made it unbelievably easy to deploy and manage your own professional spam filtering appliance. For this to be as easy as possible, we have made the below instructions for the more technical parts of the deployment, to ensure that most people can follow along and get started.

To help you get started quickyl, we have a simple installation script, which will take care of everything for you. Simply run the lines below as root on your system

wget https://raw.githubusercontent.com/KHIT93/mailguardian/installer/installer.sh
bash installer.sh

We will ask you some questions during the installation and the rest will be automated

Initial setup in the browser

Once the installation script, install.py, has completed, it is time to perform the final steps of the setup and create our application administrator account. To perform the final steps and start using the application, please visit the URL given at the end of the installation script. Once you visit the given URL, you will automatically be redirected to the setup screen.

Complete the setup wizard and then log in to the application.

As you will not be able to process any mail without valid domains, you need to go to the Domains menu item and create your first domain.

That's it. Once you have completed the remaining steps in this setup guide, you will be able to receive/process e-mail for the created domain(s).

Congratulations!

We would like to congratulate you on completing the setup and configuration of our application and wish you the best of luck with the usage. If you find any issues with the application, have requests for feature or find a security problem, please do not hesitate to create an issue here on GitHub and we will get back to you

Extras

Programmatically generate authentication tokens

You can programmatically generate authentication tokens, if you do not have one for a given user. Run python src/manage.py shell and then execute this code to generate tokens for users that do currently not have one

from core.models import User
from rest_framework.authtoken.models import Token

users = User.objects.all()
for user in users:
    token, created = Token.objects.get_or_create(user=user)
    print(user.username, token.key)

Custom cronjob timing

If you for some reason, wish to customize when your cronjobs run, you just need to replace the magic @interval with the normal cron syntax.

This is the crontab you have if you have followed the installation guide:

@hourly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs hourly
@daily /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs daily
@weekly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs weekly
@monthly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs monthly

Let us now change the hourly cronjob to run at 5th minute of every hour, which means that it would run at 01:05AM, 02:05AM, 03:05AM etc. instead of running 01:00AM, 02:00AM, 03:00AM etc. Change this:

@hourly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs hourly

To this:

5 * * * * /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs hourly

Next let us change the daily cron job to run at 03:00 AM instead of the default 00:00AM. Change this:

@daily /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs daily

To this:

0 3 * * * /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs daily

While we are at it, let us also change the weekly cronjob to run at 04:00AM every week on sundays. Change this:

@weekly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs weekly

To this:

0 4 * * 0 /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs weekly

Finally, let us reschedule the monthly cron job for running at 01:00AM the first day in every month:

Change this:

@monthly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs monthly

To this:

0 4 * */1 * /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjobs monthly

Increasing the size limit for when message scan is skipped

Change the Max SpamAssassin Size and Max Spam Check Size of /etc/MailScanner/MailScanner.conf and restart MailScanner. Be careful not to set this to high, as bigger messages will increase the processing time for SpamAssassin when evaluating a large message.

Transport log data is not populating on messages

This is related to the permissions set on the mail log. Often these files are owned by root and some administrative group. The easy fix is simply to make your mailguardian application user to a member of the given group. This can however introduce some security risks if the given user account is compromised.

Another option is to create a cronjob for root, so that the log synchronization can be executed as root. This eliminates the problem in a farily simple way. The cronjob to create would look like this:

@hourly /home/mailguardian/mailguardian/bin/python /home/mailguardian/mailguardian/src/manage.py runjob mail process_mta_log > /dev/null 2>&1

This job is also what we create in our installation script

The final option, which would be the most secure option, although a bit more complicated to configure, is to change the settings for log rotation. This would allow you to set the permissions of the log file when it is being rotated by the operating system and thereby allow you to set just enough permissions for allowing the mailguardian application user to read the logfile.

SMTP using STARTTLS

Edit /etc/postfix/main.cf and add this:

smtpd_tls_security_level = may
smtp_tls_security_level = may
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1
smtp_tls_mandatory_protocols  = !SSLv2,!SSLv3,!TLSv1
smtpd_tls_protocols           = !SSLv2,!SSLv3,!TLSv1
smtp_tls_protocols            = !SSLv2,!SSLv3,!TLSv1
smtpd_tls_exclude_ciphers     = aNULL, LOW, EXP, MEDIUM, ADH, AECDH, MD5, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES, eNULL

During the usage of our installation script, we configure the script to handle encrypted connections only on TLSv1.2 and TLSv1.3

mailguardian's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mailguardian's Issues

Refactor tailwind config

We need to refactor the tailwind configuration file, so that we do not have utilities generated, which are not used.
By doing this we will decrease the size of the generated CSS-file and improve loadtimes for the application

Support display of message scanning status

We currently have a feature to allow users to disable message scanning. It could also be a configuration on fx. SpamAssassin that disables message scanning.

MailScanner provides this through $message->{scanmail}

Implement support for mix.version

For compilation of frontend assets we use webpack and everything is managed by Laravel Mix.
Mix implements an easy to use way of versioning your files and therefore also implementing cache busting.

We need to implement a template tag/code that is able to read the mix-manifest.json file and pass the value to the static template function to get the correct path

Missing polyfill for IE11

When opening the MailGuardian interface in Internet Explorer 11, you just see the background.
It complains in the debug console about methods related to Promises in ES6, so maybe a polyfill is missing.

It would be great to have either a polyfill for making the system work with IE or have a message show that IE is not supported.

Upgrade script

We need to create an easy to use upgrade script, so that system administrators only have to replace the files or pull the latest changes from GitHub and then simply run one file and that file will then take care of all the tasks needed to perform in order for the system to upgrade the local installation to the latest version.

Installation problems

Hello,

I am trying to install mail guardian, and during the process there are questions about database user/passwords etc.. But I not see any database created nor do I find any documentation about what I must create first already and empty database and user or not.

Can you help me out ?

Thanks in advance,

Kurt

Things needed to finish 2.0.0

This issue tracks the remaining changes, which are needed before we feel that we are ready to tag 2.0.0

  • Test multi-node deployment from the installation scripts
  • Test that the new Milter configuration is working
  • Write a conversion script to convert from postfix to MailScanner Milter
  • Get a fully working API to resend messages currently in the queue
  • Get new installation script to work with multi node
  • Implement support for GeoIP lookups
  • Reimplement audit logging and activity logging (#51 )
  • Support Bayes data in PostgreSQL database

New feature: Manage own spamassassin rules

A feature that I have seen in cPanel is the ability to set your own spamassassin rule scores.
While making the feature usable per user is not quite what I had in mind, the idea would be to make it possible for the application administrator / Staff members, to manage a custom spamassassin rules file or maybe use the existing spamassassin SQL support to store this information in the SQL-database.

First step of this would be to manage a text file from the database and then we can later move on to have it run directly from the database.

Add test suite for django apps

Once the project is rolling, we need to add add unit tests and feature tests for the django apps.
If we feel that it is necessary, we could also add integration tests for the OS-level libraries and binaries that we interact with

[BUG] file_path() method od Message evaluates blacklisted messages as nonspam

Describe the bug
When a message is blacklisted, MailScanner places this in the spam folder in the quarantine folder, but MailGuardian does not take this into consideration when computing the expected filepath

To Reproduce
Steps to reproduce the behavior:

  1. Find a blacklisted message, that is not marked as spam
  2. Determine that the buttons for releasing, marking as spam, etc. do not appear
  3. Check the api call done to fetch whether the file exists or not
  4. Check in the server quarantine folder under nonspam and find that the file does not exist there
  5. Check in the server quarantine folder under spam and find that the file exists there
  6. Copy the file from spam to nonspam to work around the issue

Expected behavior
Alignment of file placement between MailScanner and MailGuardian is expected

Application information

  • MailGuardian version: 1.5.3
  • Python version: 3.7.3
  • PostgreSQL version: 11.13
  • Postfix version: 3.4.14
  • MailScanner version 5.3.4-1

Define a support link

We use this product commercially, but find it problematic to direct users at helpful resources or to instructions on how to open a support ticket.

Could we maybe get some kind of configuration parameter to define links for fx. our knowledge base and link to get support.

Link to support would simply be the href value, so that we can set the parameter as https://example.com/get-support or directly to an email with mailto:[email protected]

The same goes for a knowledge base

Extend audit logging

Currently we are using an audit logging package for Django, which gives us a basic audit logging system to handle changes to records in the system.
However, this does not currently track actions that do not change, create or delete records.
In practice, this means that if a user was to mark a message as spam and asking spamassassin to learn the given message as spam, then there would be no record of the given action.

To fix this, we need to extend the audit logging action types to match our needs

[BUG] npm not checked for presence during install

Describe the bug
npm not installed prior to installation script causes mailguardian build to fail

To Reproduce
Steps to reproduce the behavior:

  1. Install Debian 10 default no gui, standard system utilities
  2. Run mailguardian install

Expected behavior
Should check for npm prior to invoking and install it if missing

Initial release

We need to have certain things ready to make the initial release of the application

  • RESTful API for the underlying database
  • API endpoints for server actions (spamassassin release, mark as spam etc.)
  • Handling permissions and query scopes
  • Quarantine reports on email
  • Audit logging
  • Update the transport/delivery details of each message based on the mail.log
  • Initial installation documentation
  • Setup wizard
  • Installation script
  • SQL-based blacklisting/whitelisting
  • SQL-based control of when messages are treated as spam

After this we would be ready for release 1.0.0 stable

For the 1.0.0 release, we would also like to have these features supported

  • Support for handling multiple servers

Mailqueue across hosts not working

Issue summary

When using the UI to see the status of the mailqueue, only the mailqueue of the host running the Web UI is shown, when we are running in multi server configuration

Expected result

It would be expected that the application showed the mailqueue across nodes.

Installation

Version information

  • MailGuardian Version: 1.3.2
  • Install type: GitHub checkout

MailGuardian for inclusion in eFa

Greetings!

I have followed this project for a while and would like to inquire about including MailGuardian as a frontend to eFa.

I find the interface to be clean and well-defined, and it provides functionality beyond the traditional MailWatch interface.

Installation issue on Ubuntu 20.04.3

Hello,

today I wanted to install mailguardian on a freshly installed Ubuntu 20.04.3 Server, but the installation script ended with an error:

Installing MailGuardian...
CREATE DATABASE
CREATE ROLE
GRANT
Traceback (most recent call last):
File "./installer/mailguardian.py", line 66, in
installer_config['mailguardian']['secret'] = get_random_secret_key()
File "/usr/lib/python3.8/configparser.py", line 1259, in setitem
return self._parser.set(self._name, key, value)
File "/usr/lib/python3.8/configparser.py", line 1201, in set
super().set(section, option, value)
File "/usr/lib/python3.8/configparser.py", line 894, in set
value = self._interpolation.before_set(self, section, option,
File "/usr/lib/python3.8/configparser.py", line 402, in before_set
raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in 'u%yq^p5xem!@m@71run2hmrd+9n0###soj0oq983(=q#ih4j' at position 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./installer/mailguardian.py", line 68, in
installer_config['mailguardian']['secret'] = get_random_secret_key()
File "/usr/lib/python3.8/configparser.py", line 1259, in setitem
return self._parser.set(self._name, key, value)
File "/usr/lib/python3.8/configparser.py", line 1201, in set
super().set(section, option, value)
File "/usr/lib/python3.8/configparser.py", line 894, in set
value = self.interpolation.before_set(self, section, option,
File "/usr/lib/python3.8/configparser.py", line 402, in before_set
raise ValueError("invalid interpolation syntax in %r at "
ValueError: invalid interpolation syntax in '6do3ae^8
%nyp=%-hwnosn+uk$321zfbs&w0zrc#c@xug=bb53' at position 9
We are really sorry, but something seems to have gone wrong or the script was aborted

And ClamAV can't be build:

Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Unrecognized argument in LIBS ignored: '-clamav'
Generating a Unix-style Makefile
Writing Makefile for Mail::ClamAV
Writing MYMETA.yml and MYMETA.json
Finished "perl Makefile.PL" Stage

Starting "make" Stage
make[1]: Entering directory '/root/.cpan/build/Mail-ClamAV-0.30-0/_Inline/build/Mail/ClamAV'
Running Mkbootstrap for ClamAV ()
chmod 644 "ClamAV.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- ClamAV.bs blib/arch/auto/Mail/ClamAV/ClamAV.bs 644
"/usr/bin/perl" "/usr/share/perl/5.30/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.30/ExtUtils/typemap" ClamAV.xs > ClamAV.xsc
mv ClamAV.xsc ClamAV.c
x86_64-linux-gnu-gcc -c -iquote"/root/.cpan/build/Mail-ClamAV-0.30-0" -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION="0.30" -DXS_VERSION="0.30" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.30/CORE" ClamAV.c
ClamAV.xs: In function ‘clamav_perl_maxreclevel’:
ClamAV.xs:131:9: warning: ‘return’ with no value, in function returning non-void
131 | return;
| ^~~~~~
ClamAV.xs:115:5: note: declared here
115 | int clamav_perl_maxreclevel(SV *self, ...)
| ^~~~~~~~~~~~~~~~~~~~~~~
ClamAV.xs: In function ‘clamav_perl_maxfiles’:
ClamAV.xs:158:9: warning: ‘return’ with no value, in function returning non-void
158 | return;
| ^~~~~~
ClamAV.xs:142:5: note: declared here
142 | int clamav_perl_maxfiles(SV *self, ...)
| ^~~~~~~~~~~~~~~~~~~~
ClamAV.xs: In function ‘clamav_perl_maxfilesize’:
ClamAV.xs:179:9: warning: ‘return’ with no value, in function returning non-void
179 | return;
| ^~~~~~
ClamAV.xs:163:5: note: declared here
163 | int clamav_perl_maxfilesize(SV *self, ...)
| ^~~~~~~~~~~~~~~~~~~~~~~
ClamAV.xs: In function ‘clamav_perl__scanfd’:
ClamAV.xs:219:30: warning: passing argument 2 of ‘cl_scandesc’ from incompatible pointer type [-Wincompatible-pointer-types]
219 | status = cl_scandesc(fd, &virname, &scanned, c->root, options);
| ^~~~~~~~
| |
| const char **
In file included from ClamAV.xs:11:
/usr/include/clamav.h:894:53: note: expected ‘const char *’ but argument is of type ‘const char **’
894 | extern cl_error_t cl_scandesc(int desc, const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ~~~~~~~~~~~~^~~~~~~~
ClamAV.xs:219:40: warning: passing argument 3 of ‘cl_scandesc’ from incompatible pointer type [-Wincompatible-pointer-types]
219 | status = cl_scandesc(fd, &virname, &scanned, c->root, options);
| ^~~~~~~~
| |
| long unsigned int *
In file included from ClamAV.xs:11:
/usr/include/clamav.h:894:76: note: expected ‘const char **’ but argument is of type ‘long unsigned int *’
894 | extern cl_error_t cl_scandesc(int desc, const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ~~~~~~~~~~~~~^~~~~~~
ClamAV.xs:219:51: warning: passing argument 4 of ‘cl_scandesc’ from incompatible pointer type [-Wincompatible-pointer-types]
219 | status = cl_scandesc(fd, &virname, &scanned, c->root, options);
| ~^~~~~~
| |
| struct cl_engine *
In file included from ClamAV.xs:11:
/usr/include/clamav.h:894:104: note: expected ‘long unsigned int *’ but argument is of type ‘struct cl_engine *’
894 | extern cl_error_t cl_scandesc(int desc, const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
ClamAV.xs:219:59: warning: passing argument 5 of ‘cl_scandesc’ makes pointer from integer without a cast [-Wint-conversion]
219 | status = cl_scandesc(fd, &virname, &scanned, c->root, options);
| ^~~~~~~
| |
| int
In file included from ClamAV.xs:11:
/usr/include/clamav.h:894:137: note: expected ‘const struct cl_engine *’ but argument is of type ‘int’
894 | _scandesc(int desc, const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~

ClamAV.xs:219:14: error: too few arguments to function ‘cl_scandesc’
219 | status = cl_scandesc(fd, &virname, &scanned, c->root, options);
| ^~~~~~~~~~~
In file included from ClamAV.xs:11:
/usr/include/clamav.h:894:19: note: declared here
894 | extern cl_error_t cl_scandesc(int desc, const char *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ^~~~~~~~~~~
ClamAV.xs: In function ‘clamav_perl__scanfile’:
ClamAV.xs:259:54: warning: passing argument 5 of ‘cl_scanfile’ makes pointer from integer without a cast [-Wint-conversion]
259 | status = cl_scanfile(p, &msg, &scanned, c->root, options);
| ^~~~~~~
| |
| int
In file included from ClamAV.xs:11:
/usr/include/clamav.h:922:159: note: expected ‘struct cl_scan_options *’ but argument is of type ‘int’
922 | har *filename, const char **virname, unsigned long int *scanned, const struct cl_engine *engine, struct cl_scan_options *scanoptions);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

ClamAV.xs: In function ‘clamav_perl_constant’:
ClamAV.xs:352:44: error: ‘CL_SCAN_RAW’ undeclared (first use in this function)
352 | if (strEQ("CL_SCAN_RAW", name)) return CL_SCAN_RAW;
| ^~~~~~~~~~~
ClamAV.xs:352:44: note: each undeclared identifier is reported only once for each function it appears in
ClamAV.xs:353:48: error: ‘CL_SCAN_ARCHIVE’ undeclared (first use in this function); did you mean ‘CL_SCAN_PARSE_PE’?
353 | if (strEQ("CL_SCAN_ARCHIVE", name)) return CL_SCAN_ARCHIVE;
| ^~~~~~~~~~~~~~~
| CL_SCAN_PARSE_PE
ClamAV.xs:354:45: error: ‘CL_SCAN_MAIL’ undeclared (first use in this function)
354 | if (strEQ("CL_SCAN_MAIL", name)) return CL_SCAN_MAIL;
| ^~~~~~~~~~~~
ClamAV.xs:355:45: error: ‘CL_SCAN_OLE2’ undeclared (first use in this function)
355 | if (strEQ("CL_SCAN_OLE2", name)) return CL_SCAN_OLE2;
| ^~~~~~~~~~~~
ClamAV.xs:356:55: error: ‘CL_SCAN_BLOCKENCRYPTED’ undeclared (first use in this function)
356 | if (strEQ("CL_SCAN_BLOCKENCRYPTED", name)) return CL_SCAN_BLOCKENCRYPTED;
| ^~~~~~~~~~~~~~~~~~~~~~
ClamAV.xs:357:45: error: ‘CL_SCAN_HTML’ undeclared (first use in this function)
357 | if (strEQ("CL_SCAN_HTML", name)) return CL_SCAN_HTML;
| ^~~~~~~~~~~~
ClamAV.xs:358:43: error: ‘CL_SCAN_PE’ undeclared (first use in this function)
358 | if (strEQ("CL_SCAN_PE", name)) return CL_SCAN_PE;
| ^~~~~~~~~~
ClamAV.xs:359:52: error: ‘CL_SCAN_BLOCKBROKEN’ undeclared (first use in this function)
359 | if (strEQ("CL_SCAN_BLOCKBROKEN", name)) return CL_SCAN_BLOCKBROKEN;
| ^~~~~~~~~~~~~~~~~~~
ClamAV.xs:360:48: error: ‘CL_SCAN_MAILURL’ undeclared (first use in this function)
360 | if (strEQ("CL_SCAN_MAILURL", name)) return CL_SCAN_MAILURL;
| ^~~~~~~~~~~~~~~
ClamAV.xs:361:49: error: ‘CL_SCAN_BLOCKMAX’ undeclared (first use in this function)
361 | if (strEQ("CL_SCAN_BLOCKMAX", name)) return CL_SCAN_BLOCKMAX;
| ^~~~~~~~~~~~~~~~
ClamAV.xs:362:52: error: ‘CL_SCAN_ALGORITHMIC’ undeclared (first use in this function)
362 | if (strEQ("CL_SCAN_ALGORITHMIC", name)) return CL_SCAN_ALGORITHMIC;
| ^~~~~~~~~~~~~~~~~~~
ClamAV.xs:363:58: error: ‘CL_SCAN_PHISHING_BLOCKSSL’ undeclared (first use in this function)
363 | if (strEQ("CL_SCAN_PHISHING_BLOCKSSL", name)) return CL_SCAN_PHISHING_BLOCKSSL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
ClamAV.xs:364:60: error: ‘CL_SCAN_PHISHING_BLOCKCLOAK’ undeclared (first use in this function)
364 | if (strEQ("CL_SCAN_PHISHING_BLOCKCLOAK", name)) return CL_SCAN_PHISHING_BLOCKCLOAK;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ClamAV.xs:365:44: error: ‘CL_SCAN_ELF’ undeclared (first use in this function)
365 | if (strEQ("CL_SCAN_ELF", name)) return CL_SCAN_ELF;
| ^~~~~~~~~~~
ClamAV.xs:366:44: error: ‘CL_SCAN_PDF’ undeclared (first use in this function)
366 | if (strEQ("CL_SCAN_PDF", name)) return CL_SCAN_PDF;
| ^~~~~~~~~~~
ClamAV.xs:367:51: error: ‘CL_SCAN_STRUCTURED’ undeclared (first use in this function)
367 | if (strEQ("CL_SCAN_STRUCTURED", name)) return CL_SCAN_STRUCTURED;
| ^~~~~~~~~~~~~~~~~~
ClamAV.xs:368:62: error: ‘CL_SCAN_STRUCTURED_SSN_NORMAL’ undeclared (first use in this function); did you mean ‘CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL’?
368 | if (strEQ("CL_SCAN_STRUCTURED_SSN_NORMAL", name)) return CL_SCAN_STRUCTURED_SSN_NORMAL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL
ClamAV.xs:369:64: error: ‘CL_SCAN_STRUCTURED_SSN_STRIPPED’ undeclared (first use in this function); did you mean ‘CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED’?
369 | if (strEQ("CL_SCAN_STRUCTURED_SSN_STRIPPED", name)) return CL_SCAN_STRUCTURED_SSN_STRIPPED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED
ClamAV.xs:370:56: error: ‘CL_SCAN_PARTIAL_MESSAGE’ undeclared (first use in this function); did you mean ‘CL_SCAN_MAIL_PARTIAL_MESSAGE’?
370 | if (strEQ("CL_SCAN_PARTIAL_MESSAGE", name)) return CL_SCAN_PARTIAL_MESSAGE;
| ^~~~~~~~~~~~~~~~~~~~~~~
| CL_SCAN_MAIL_PARTIAL_MESSAGE
ClamAV.xs:371:61: error: ‘CL_SCAN_HEURISTIC_PRECEDENCE’ undeclared (first use in this function); did you mean ‘CL_SCAN_HEURISTIC_BROKEN’?
371 | if (strEQ("CL_SCAN_HEURISTIC_PRECEDENCE", name)) return CL_SCAN_HEURISTIC_PRECEDENCE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| CL_SCAN_HEURISTIC_BROKEN
ClamAV.xs:393:47: error: ‘CL_SCAN_STDOPT’ undeclared (first use in this function); did you mean ‘CL_DB_STDOPT’?
393 | if (strEQ("CL_SCAN_STDOPT", name)) return CL_SCAN_STDOPT;
| ^~~~~~~~~~~~~~
| CL_DB_STDOPT
make[1]: *** [Makefile:335: ClamAV.o] Error 1
make[1]: Leaving directory '/root/.cpan/build/Mail-ClamAV-0.30-0/_Inline/build/Mail/ClamAV'

A problem was encountered while attempting to compile and install your Inline
C code. The command that failed was:
"make" with error code 2

The build directory was:
/root/.cpan/build/Mail-ClamAV-0.30-0/_Inline/build/Mail/ClamAV

To debug the problem, cd to the build directory, and inspect the output files.

at /root/.cpan/build/Mail-ClamAV-0.30-0/blib/lib/Mail/ClamAV.pm line 162.
...propagated at /usr/share/perl5/Inline/C.pm line 888.
BEGIN failed--compilation aborted at /root/.cpan/build/Mail-ClamAV-0.30-0/blib/lib/Mail/ClamAV.pm line 162.
Compilation failed in require.
BEGIN failed--compilation aborted.
make: *** [Makefile:824: ClamAV.inl] Error 25
CAVAC/Mail-ClamAV-0.30.tar.gz
/usr/bin/make -- NOT OK

Can someone please tell me what I did wrong?

Sincerely,
Ulrich Frey.

Refactor CSS to have components

We need to refactor the CSS/LESS code to generate components based on where we are reusing the same utilities to archive the same result.
The main things will be the pseudo tables we create using flexbox, the buttons used all over the app, modals, alerts and generic form input field styles

MailGuardian Web GUI not working properly

Describe the bug
I have installed the MailGuardian using the installer.sh. The installation went successfully but as I was trying to access the web console I am getting error which mentions that : Uncaught SyntaxError: Cannot use import statement outside a module from app.js:1.upon investigation I found out that the issue is happening on the file that is located under assests/src/js/app.js and the import modules were not working properly. As a result, I only see a spinning circle on the web page.

Screenshots
If applicable, add screenshots to help explain your question to others.

Application information

  • MailGuardian version: [e.g. 1.5.3]
  • Python version: python3
  • PostgreSQL version: 13.10
  • Postfix version: 3.5.8
  • MailScanner version: 5.4

Desktop (please complete the following information):

  • OS: AlmaLinux
  • Browser: Chrome , Edge
  • Version 112.0.5615.138

Notifications on login screen

For supporting commercial usage of the application, we need to develop a feature where we can allow admins to show messages on the login screen.
This could be maintenance notices or security information

Add support for sendmail and exim4 MTA

As my test setup is using postfix, the application is developed to handle postfix configuration files.
However, MailScanner also supports sendmail and exim4, so we need support this as well.

Multi-node connectivity monitoring

Implement support for connectivity monitoring between nodes in a multi-node setup
Configuration for notifications should be available and an API endpoint for monitoring tools such as Zabbix to look at

Add support for translations in the UI

Currently django has a way for us to create translatable strings in the python code. We need to develop a way to handle this in the JavaScript code, as well as a way to store translations for both parts of the code.
We also need a fallback system, so that any strings not translated into the selected language, will be showed in English.

Report filters miss the target

When a filtering is made on fx. to_address contains "nordea", then users are shown emails to/from other domains that they do not have access to

Add support for multifactor authentication

To improve security for users, we need to find a way to integrate multifactor authentication.
This does however need to be built by ourselves, as existing third-party packages will apply multifactor authentication to every request made and thereby prevent the webinterface node (in multi node systems) from executing actions/tasks on behalf of the given user.

The initial plan is to to use pyotp and connect with Google Authenticator.

2FA using Email

We need to implement support for 2FA using email instead of having to have an app on a mobile device

New feature: Manage MailScanner custom phishing whitelist/blacklist

We need a feature where we can manage the custom whitelist and blacklist of phishing sites for MailScanner.
My initial thoughts would be to simply have a cron job that is creating/overwritng a certain file and then have MailScanner look at that file.
Once the feature is initially added, we could look at making it SQL-based, so that we query a database, but for that I will need to look at the performance hits and ressource usage associated with this kind of queries

Add support for queueing tasks to run in the background

From experimenting with celery, we have not been able to use it with the existing data in order to have queued jobs on each node.

In order for us to be able to create tasks and queue them for execution in the background, we need to come up with a working task queue system

Tasks:

  • Build a tasks table for storing the tasks created, as well as their status
  • Integrate the task with audit logging, so that the task is logged as being executed automatically by the given user
  • Perform task execution in the scope of the user who requested the task, so that we ensure users are not able to perform tasks outside of the allowed permissions
  • [ ]

Implement a view of the quarantine folder

Sometimes MailScanner stops quarantines messages before they have been categories as spam or nonspam.
Since these are not logged to the database, there is no way to see these or get any attachments from them.
These are normally stored as files or folders in /var/spool/MailScanner/quarantine and we need a way to show these and download any attachments assigned to these messages.

Refactor the usage of loading states

Currently our JavaScript SPA uses a global loading state to find out if we are currently loading something into the browser.
This does currently lock the entire application using an overlay, but on slower network connections or servers with longer response times, there is a slight delay when clicking a button and the loading state appearing.
To make this more userfriendly, we will have to perform the following tasks

  • Create a new initializing property in the state to track initial application launch
  • Change the usage of loading, so that we use it locally in the components, but it is still tracked globally
  • Build a solution so that we can track page loads, when vue-router is processing the next request
  • Build a wrapper component for default loading state behaviour

Add chart to reports

Some reports are currently only showing the raw data.
To make it visually represented, we need to add some charts to the views using chartjs

DNS Monitoring

Inspired from some big cloud services, we think that it would be a good idea to implement a feature in MailGuardian to notify domain administrators if their MX records in DNS are not pointing at our servers or in other ways do not match the set of records for the specified domain.
The feature is disabled by default, but can be enabled if needed/wanted.

Per email spam scores, without user access

We have a lot of customers running on our mailguardian deployment and these have a lot of email adresses, which do not necessarily require access to the web portal
Would it be possible to add a feature for creating email address spam rules without adding a user to the portal?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.