https://github.com/drewag/dmarc-analyzer
https://github.com/drewag/dmarc-analyzer
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/drewag/dmarc-analyzer
- Owner: drewag
- Created: 2018-02-22T18:38:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-26T00:41:32.000Z (over 4 years ago)
- Last Synced: 2025-01-28T17:14:25.053Z (4 months ago)
- Language: Swift
- Size: 43 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DMARC Analyzer
This is my personal implementation of a parser for DMARC to alert me when a report comes back with problems. Feel free to adapt it to your needs if necessary.
## Setting Up Automatic Analysis with Postfix
The following won't necessary work command for command, but should give you enough information about what is necessary.
### Building
First you have to clone and build the binary:sudo git clone https://github.com/drewag/dmarc-analyzer.git /etc/postfix/dmarc-analyzer
cd /etc/postfix/dmarc-analyzer
swift package update
swift build -c release
sudo chmod 777 -R .
Then you have to setup the options file:### Configure Options
Create /etc/postfix/dmarc-analyzer/dmarc-options.json
{
"sourceEmail": "[email protected]",
"problemEmail": "[email protected]",
"approvedServers": [
"12.345.67.89",
"2600:0000::0000:0000:0000:0000",
]
}
List as many approved server IP addresses as necessary.### Configure Postfix
First, add an alias to feed into the binary: /etc/aliases
dmarcanalyzer: "|/etc/postfix/dmarc-analyzer/.build/release/analyze /etc/postfix/dmarc-analyzer/dmarc-options.json"
Then refresh the aliasessudo newaliases
Then you have to setup a virtual alias:
[email protected] [email protected]
Then postmap that filesudo postmap /etc/postfix/virtual
Finally reload postfixsudo postfix reload