A high-performance Postfix mail log analysis system with a FastAPI backend and a Next.js 14 frontend.
- Real-time Dashboard: Overview of email volume, success rates, and bounces.
- Log Correlation: Robust parsing and correlation of Postfix logs (including rotated files).
- Suspicious Activity Detection: Automatically flags high-bounce senders and rejected messages.
- Modern UI: Built with Shadcn/UI, Recharts, and Framer Motion for a premium experience.
- Navigate to the root directory.
- Install dependencies:
pip install -r backend/requirements.txt
- Run the backend as a module:
The API will be available at http://localhost:8001
python -m backend.main
- Navigate to the
frontend/directory:cd frontend - Install dependencies:
npm install
- Run the development server:
The UI will be available at http://localhost:3001
npm run dev
backend/: FastAPI application, SQLAlchemy models, and Postfix log parser.frontend/: Next.js application with Shadcn/UI components.logs/: Directory where your Postfixmail.logfiles should be placed.mail_analyzer.db: SQLite database generated after processing logs.
- ModuleNotFoundError: Ensure you have installed the requirements. If the error persists, try
pip install sqlalchemy fastapi uvicorn pydantic python-multipart python-dateutil. - ImportError (Relative Imports): Always run the backend from the root directory using the
-mflag:python -m backend.main.
