Code Monkey home page Code Monkey logo

dmarc_view's Introduction

dmarc_view

This is the frontend for parsed DMARC reports

Backend and frontend should run on diffrent machines. This avoids to have you IMAP credentials on the public webserver. The cron-job push the results via rsync to the webserver.

Requirements:

  • Install Ruby
  • Install erubis
  • Install Webserver with CGI support

Example configuration for lighttpd:

server.modules += ( "mod_cgi" )
static-file.exclude-extensions += ( ".rb", ".rbx", ".rhtml" )
cgi.assign += ( ".rhtml" => "/usr/local/bin/eruby" )

server.document-root = "/var/www/example.com/"

$HTTP["url"] =~ "^/daten/" {
  url.access-deny = ( "" )
}
$HTTP["url"] =~ "^/include/" {
  url.access-deny = ( "" )
}

Helper script to log errors to a file.

vim /usr/local/bin/eruby
#!/bin/sh
LANG="de_DE.UTF-8"
export LANG
/usr/bin/erubis -E Stdout "${@}" 2>> /var/log/lighttpd/eruby-error.log
# eof

Add /var/log/lighttpd/eruby-error.log to your logrotate

Installation:

Extract:

git clone [email protected]:dinoex/dmarc_view.git

Install files into your webroot:

mkdir /var/www/example.com
cd dmarc_view
./install-webroot.sh /var/www/example.com

Edir the configuration file:

vim /var/www/example.com/include/config.rbx

Set the full path to files generated by dmarc_report

DMARC_CSV_FILE = '/home/user/dmarc-report.csv'.freeze
DNS_CACHE_FILE = '/home/user/dmarc-dns.json'.freeze

If you don't need user control, set:

ADMIN_USER = nil

If you want user control, set

ADMIN_USER = 'admin'.freeze

To highlite your own servers in green, add your IP-addresses to the list:

GREEN_MX = [
  '2001:db8:1234::25', '192.0.2.0', # smtp.example.com
].freeze

user control:

Configure AUTH on your webserver. For each username create a file:

mkdir /var/www/example.com/daten
vim /var/www/example.com/daten/admin

After the Keyword 'Domain(s)' you need a TAB char followed by the list of domains the user is allowed to see:

Domain(s)	example.net,example.com

navigation

If you have mode modules you can extend the navigation line here:

vim /var/www/example.com/include/level-index.html

dmarc_view's People

Contributors

dinoex avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.