Giter VIP home page Giter VIP logo

dmarc-viewer's Introduction

DMARC viewer

DMARC viewer is a Django-based web application that lets you visually analyze DMARC aggregate reports, providing unique insights into how your mailing domains are used and abused. Moreover, with DMARC viewer you can create and store custom analysis views that filter reports based on the criteria you are interested in.

Configure DNS

To receive DMARC aggregate reports for your domains all you need to do is to add a DMARC entry to your DNS records. Read "Anatomy of a DMARC resource record in the DNS" for initial guidance.

Start Analyzing!

To analyze your own DMARC aggregate reports you need to deploy an instance of DMARC viewer. Follow these steps to get you started:

  1. Deploy your own instance of DMARC viewer,
  2. import DMARC aggregate reports,
  3. and create analysis views.

Alternatively you can deploy DMARC viewer using docker.

You'll find further usage instructions on the DMARC viewer help page and plenty of contextual help throughout the website (look out for "?" symbols).

Contribute

DMARC viewer is an open source project (MIT). If you want a new feature, discover a bug or have some general feedback, feel free to file an issue. You can also fork this repository, start coding and submit pull requests.

dmarc-viewer's People

Contributors

aaaaalbert avatar dependabot[bot] avatar lukpueh avatar trantor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dmarc-viewer's Issues

Syntax Error in "website" Files

Hi

I have just tried to start your program on a SuSE system and have seen the following syntax error. Since I am not very familiar with GIT, I am writing this here.

Here is missing an "s":
website/choices.py line 3
choice.py

a "from website" is missing in front of it
website/models.py line 50
import choices

website/urls.py line 22
import views

Otherwise I am currently fighting with the WSGI. So something can still be added ;-)

Add django logger setup and log statements

Add decent django (file) logger. This is a fully fledged MVC application, written by one person. Naturally there are many places where this can break. If something breaks it should at least be traceable by the courageous person that hosts the app.

Hint: Good places for log statements are except: clauses (c.f. #2).

Import reports from email (attachments)

currently dmarc-viewer (manage.py parse --type in /path/to/directory/) consume a directory with multiple uncompressed report.xml already extracted from e-mail messages, right?

would be handy if it could consume a directory with multiple messages, extract the attachement, optional decompress an then import data. As bonus, reading rfc822 messages from an IMAP server would be really cool! Then processed message could be moved to IMAP-folder done/ or fail/
(Idea: https://metacpan.org/pod/distribution/Mail-DMARC/bin/dmarc_receive)

Add new view

Hi, first of all I'm not a developer so I'm giving a non code specific suggestion.
The main thing I wish to know from all the dmarc reports I receive, is a list of domain which fail.
For each domain, I would like to have a list of ip/name of the servers sending in my behalf (and the number of mail it has sent).
To know the region state of sending servers would be convenient.

spf/dkim fail

  • mydomain1.com 200
    • server1 1.2.3.4 (RO) 50
    • server2 1.2.3.5 (RU) 100
    • server3 1.2.3.6 (AG) 50
  • mydomain2.com 999
    • and so on

Consider the case where I manage a mailserver and I set the spf to allow receiving mail only from my mailserver (spf policy ~all).
Before setting spf policy to -all I wish to know if there are other servers sending mail for that domain.
With the above view I could quickly identify, for example, a webserver that is sending mail in behalf of my domain.
In such case, I will update my spf record with it's ip and, once I'm sure there are no other legitimate servers left, I will set spf policy to -all.

Thank you.

Split project into back-end and front-end

Hi, inspired by @andreasschulze issue #9 I post the following considerations:

a project like dmarc-viewer shall be compose by 2 elements:

  1. a back-end that will take care of retrieving the reports (mail attachments);
  2. a front end that will show/query dmarc data by a web page.

I think there are two approaches for the back-end.
It may behave like a

  • client (fetch mail by imap / pop)
  • server (it will directly receive the mails)
    It will parse the mail and extract the attachment.
    I think it would be a good idea to let the back-end take care of parsing the reports and insert their data into the database.

The front-end will then take care of present and elaborate the data already in the database.
And that's exactly what dmarc-viewer does.

About client / server behavior, let first support imap mail fetching.
There's another project that focus more on the back-end side and could be a good starting point for the dmarc-viewer back-end: https://github.com/jsharkey13/dmarc-monitoring/blob/master/dmarc_analysis.py

Please let me know what you think about it.
I'm willing to work on the back-end.

Change `django_cache` ownership to `uswgi` user

inside dmarc-viewer-app there is a directory /var/tmp/django_cache/ owned by root:root
I had to run "chown 1000 /var/tmp/django_cache/" to view imported data:

dmarc-viewer-app | Internal Server Error: /overview-async/
dmarc-viewer-app | Traceback (most recent call last):
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
dmarc-viewer-app | response = get_response(request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
dmarc-viewer-app | response = self.process_exception_by_middleware(e, request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
dmarc-viewer-app | response = wrapped_callback(request, *callback_args, **callback_kwargs)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 141, in _wrapped_view
dmarc-viewer-app | result = middleware.process_request(request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/middleware/cache.py", line 133, in process_request
dmarc-viewer-app | cache_key = get_cache_key(request, self.key_prefix, 'GET', cache=self.cache)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/utils/cache.py", line 362, in get_cache_key
dmarc-viewer-app | headerlist = cache.get(cache_key)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 39, in get
dmarc-viewer-app | with io.open(fname, 'rb') as f:
dmarc-viewer-app | IOError: [Errno 13] Permission denied: '/var/tmp/django_cache/46f71a8be5cedca0e759fa387fa7fdbd.djcache'
dmarc-viewer-app | [pid: 53|app: 0|req: 4/18] 172.19.0.1 () {38 vars in 592 bytes} [Sat Jun 16 17:55:25 2018] GET /overview-async/?report_type=1 => generated 27 bytes in 1 msecs (HTTP/1.1 500) 3 headers in 112 bytes (1 switches on core 7)
dmarc-viewer-app | Internal Server Error: /overview-async/
dmarc-viewer-app | Traceback (most recent call last):
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
dmarc-viewer-app | response = get_response(request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
dmarc-viewer-app | response = self.process_exception_by_middleware(e, request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
dmarc-viewer-app | response = wrapped_callback(request, *callback_args, **callback_kwargs)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py", line 141, in _wrapped_view
dmarc-viewer-app | result = middleware.process_request(request)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/middleware/cache.py", line 133, in process_request
dmarc-viewer-app | cache_key = get_cache_key(request, self.key_prefix, 'GET', cache=self.cache)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/utils/cache.py", line 362, in get_cache_key
dmarc-viewer-app | headerlist = cache.get(cache_key)
dmarc-viewer-app | File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 39, in get
dmarc-viewer-app | with io.open(fname, 'rb') as f:
dmarc-viewer-app | IOError: [Errno 13] Permission denied: '/var/tmp/django_cache/d7a8b6638e2a94304541c8fe848c131f.djcache'
dmarc-viewer-app | [pid: 52|app: 0|req: 5/19] 172.19.0.1 () {38 vars in 592 bytes} [Sat Jun 16 17:55:25 2018] GET /overview-async/?report_type=2 => generated 27 bytes in 3 msecs (HTTP/1.1 500) 3 headers in 112 bytes (1 switches on core 0)

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.