DMARCer is a high-performance, secure, and modular DMARC report analyzer written in Rust.
It extracts, validates, and processes DMARC XML reports from ZIP archives with best security practices.
- Fast & Secure: Leveraging Rust's performance and safety guarantees, DMARCer processes large DMARC reports quickly and reliably.
- Robust ZIP & XML Processing: The tool prevents common attacks including ZIP bombs, XML External Entity (XXE) attacks, and directory traversal exploits.
- Clear, Actionable Output: DMARCer presents detailed DMARC policy information and evaluation results for SPF and DKIM in table, -CSV-, or JSON format.
- Configurable & Extensible: Easily adjust security parameters (e.g., file size limits, decompression limits) via environment variables. Future enhancements may include integration with IMAP, webhooks, and ELK for centralized logging and monitoring.
- Comprehensive Testing: Includes a suite of automated tests covering security, configuration, and functionality. Integrated with GitHub Actions for continuous integration and delivery.
Clone the repository and build in release mode:
git clone https://github.com/szymczag/dmarcer.git
cd dmarcer
cargo build --release
DMARCer is a command-line tool. The basic usage is as follows:
dmarcer <FILE> [OPTIONS]
--output <table|csv|json>
: Specifies the output format. The default is table.--verbose
: Enables verbose logging for debugging purposes.
- Display output in table format (default):
./target/release/dmarcer path/to/report.zip
- Display output in JSON format:
./target/release/dmarcer path/to/report.zip --output json
Enable verbose logging:
./target/release/dmarcer path/to/report.zip --verbose
To run the complete test suite locally, execute:
cargo test --release
DMARCer uses GitHub Actions for continuous integration. Every push and pull request triggers a CI pipeline that builds the project and runs the test suite automatically.
DMARCer is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear, descriptive commit messages.
- Push your changes to your fork.
- Open a pull request detailing your changes.
For any questions or suggestions, please open an issue or contact the maintainer.
Enjoy DMARCer and happy analyzing!