Skip to content
/ MailLogSentinel Public template

Lightweight Postfix SASL log watchdog. Under systemd, it tails mail logs incrementally (near-real time), appends normalized events to a CSV, daily email summarizes activity, and export to SQLite database.

License

Notifications You must be signed in to change notification settings

monozoide/MailLogSentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

MailLogSentinel

MailLogSentinel Banner

Lightweight Postfix authentication watchdog - Monitor failed SASL attempts, get daily email reports, export to database.

GitHub Actions Status GitHub top language Python 3.x Issues Welcome


Hacktoberfest 2025 good first issue help wanted Python release


Table of Contents


🎯 What it does

MailLogSentinel monitors your Postfix server for authentication failures in real-time:

  • πŸ“Š Tracks failed login attempts with IP geolocation
  • πŸ“§ Sends daily email summaries with top offenders
  • πŸ’Ύ Stores events in CSV (+ optional SQL export)
  • πŸš€ Runs as lightweight systemd service

Perfect for small to medium mail servers wanting simple, effective monitoring without complex SIEM solutions.

πŸ“‹ Prerequisites

  • Linux with systemd and syslog
  • Python 3.10+
  • Postfix with SASL authentication
  • sudo access for installation

⚑ Quick Start

1. Clone & Install

git clone https://github.com/monozoide/MailLogSentinel.git
cd MailLogSentinel

# Install scripts and libraries
chmod +x bin/*.py && chmod +x lib/maillogsentinel/*.py
sudo cp bin/*.py /usr/local/bin/
sudo cp -r lib/maillogsentinel /usr/local/lib/

2. Run Interactive Setup

sudo python3 /usr/local/bin/maillogsentinel.py --setup --interactive

The setup wizard will:

  • βœ… Configure paths and email settings
  • βœ… Install systemd services
  • βœ… Set up daily reporting schedule
  • βœ… Initialize geolocation databases

3. Verify Installation

# Check service status
systemctl status maillogsentinel.service

# View live logs
journalctl -fu maillogsentinel.service

4. First time run

python3 /usr/local/bin/maillogsentinel.py
```bash


### 5. Test email report manually
```bash
python3 /usr/local/bin/maillogsentinel.py --report

πŸ“Š Sample Output

Daily email report example

πŸ’£ Basic Commands

Command Description
maillogsentinel --report Send email report now
maillogsentinel --reset Archive data & restart monitoring
maillogsentinel --version Show version
maillogsentinel --help Show all options

πŸ“š Documentation

🀝 Contributing

Contributions welcome! Please check our Contributing Guide.

Caution

The use of AI tools is permitted, provided that the contributor uses them in a reasonable manner.

Roadmap

You can follow the MailLogSentinel roadmap on the project page: MailLogSentinel Roadmap

πŸ“„ License

GNU GPL v3 - See LICENSE file.

πŸ’– Support

If you find this useful, consider supporting development:

Liberapay receiving

30% of donations are redistributed to other open source projects.


Quick Links: Issues Β· Wiki Β· Releases


We have no right to believe that freedom can be won without a struggle.

Che Guevara

About

Lightweight Postfix SASL log watchdog. Under systemd, it tails mail logs incrementally (near-real time), appends normalized events to a CSV, daily email summarizes activity, and export to SQLite database.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •