<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Performing Email Log Analysis

## Commands

| Command | Description |
|---|---|
| `Get-MessageTrackingLog` | Search Exchange message tracking logs |
| `Search-UnifiedAuditLog` | Query unified audit log for email events |
| `Get-MailFlowStatusReport` | Get mail flow delivery statistics |
| `postcat -q <queue_id>` | Inspect Postfix queue message content |
| `postlog` | Parse and filter Postfix log entries |
| `journalctl -u postfix` | Query systemd journal for Postfix logs |
| `Get-TransportService` | Check transport service log configuration |

## Agent Script

```bash
# node agent.js parse --logfile <value>
# node agent.js search --logfile <value> --query <value>
# node agent.js stats --logfile <value>
```
