Last active
April 11, 2019 08:16
-
-
Save alinradut/f9f073e73e65ce6259ba326d69d08d26 to your computer and use it in GitHub Desktop.
Revisions
-
alinradut revised this gist
Apr 11, 2019 . 1 changed file with 18 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,47 +2,65 @@ Create a user/database combo in MySQL, username dmarc, password [generated] Install the dependencies: ``` apt-get install libmail-imapclient-perl libmime-tools-perl libxml-simple-perl \ libclass-dbi-mysql-perl libio-socket-inet6-perl libio-socket-ip-perl libperlio-gzip-perl \ libmail-mbox-messageparser-perl unzip ``` Download and install dmarcts-report-parser to /opt: ``` cd /opt git clone https://github.com/techsneeze/dmarcts-report-parser cd dmarcts-report-parser ``` Rename dmarcts-report-parser.conf.sample: ``` mv dmarcts-report-parser.conf.sample dmarcts-report-parser.conf ``` Edit dmarcts-report-parser.conf and set the MySQL username and password, ignore IMAP: ``` nano dmarcts-report-parser.conf ``` Test if this works correctly: ``` /opt/dmarcts-report-parser/dmarcts-report-parser.pl -d -e /var/vmail/[domain]/[user]/Maildir/cur/* ``` Set up crontab, once per hour: ``` crontab -e # check both cur and new folders 0 * * * * /opt/dmarcts-report-parser/dmarcts-report-parser.pl -e /var/vmail/[domain]/[user]/Maildir/cur/* >/dev/null 2>&1 0 * * * * /opt/dmarcts-report-parser/dmarcts-report-parser.pl -e /var/vmail/[domain]/[user]/Maildir/new/* >/dev/null 2>&1 ``` Download the viewer: ``` cd /var/www/[domain]/public_html git clone https://github.com/techsneeze/dmarcts-report-viewer.git cd dmarcts-report-viewer ``` Rename the configuration file: ``` mv dmarcts-report-viewer-config.php.sample dmarcts-report-viewer-config.php ``` Edit dmarcts-report-parser.conf and set the MySQL username and password, ignore IMAP: ``` nano dmarcts-report-parser.conf ``` Done. -
alinradut renamed this gist
Apr 11, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
alinradut created this gist
Apr 3, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ Create a user/database combo in MySQL, username dmarc, password [generated] Install the dependencies: apt-get install libmail-imapclient-perl libmime-tools-perl libxml-simple-perl \ libclass-dbi-mysql-perl libio-socket-inet6-perl libio-socket-ip-perl libperlio-gzip-perl \ libmail-mbox-messageparser-perl unzip Download and install dmarcts-report-parser to /opt: cd /opt git clone https://github.com/techsneeze/dmarcts-report-parser cd dmarcts-report-parser Rename dmarcts-report-parser.conf.sample: mv dmarcts-report-parser.conf.sample dmarcts-report-parser.conf Edit dmarcts-report-parser.conf and set the MySQL username and password, ignore IMAP: nano dmarcts-report-parser.conf Test if this works correctly: /opt/dmarcts-report-parser/dmarcts-report-parser.pl -d -e /var/vmail/[domain]/[user]/Maildir/cur/* Set up crontab, once per hour: crontab -e # check both cur and new folders 0 * * * * /opt/dmarcts-report-parser/dmarcts-report-parser.pl -e /var/vmail/[domain]/[user]/Maildir/cur/* >/dev/null 2>&1 0 * * * * /opt/dmarcts-report-parser/dmarcts-report-parser.pl -e /var/vmail/[domain]/[user]/Maildir/new/* >/dev/null 2>&1 Download the viewer: cd /var/www/[domain]/public_html git clone https://github.com/techsneeze/dmarcts-report-viewer.git cd dmarcts-report-viewer Rename the configuration file: mv dmarcts-report-viewer-config.php.sample dmarcts-report-viewer-config.php Edit dmarcts-report-parser.conf and set the MySQL username and password, ignore IMAP: nano dmarcts-report-parser.conf Done.