Phase 4: MDaemon log source adapter (D-0013, D-0025) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/mdaemon-source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Implements the MDaemon log source adapter (D-0013 scope, D-0025 transport), the third Phase 4 data source. Format knowledge was derived from a real day of production MDaemon v26.0.3 logs supplied by Hannah; committed fixtures are fully sanitized.
Viegard.Sources.MDaemonLogs:SessionTranscriptParser(SMTP-in/out, IMAP, POP3, Screening): banner skipping,Ddd YYYY-MM-DD HH:MM:SS.mmm: NN:lines, connection-accepted / 535-auth-failure / host-screening / location-screening extraction with source IPs.DynScrnParser(Dynamic Screening compact format): hex message-code mapping;Blocking IP:ban decisions with reasons,Mgmt Addentries, enforcement chatter and TrustedIP noise flagged droppable.MDaemonLogSource(IDataSource+ health): configurable file patterns per log kind, per-file byte-offset resume viaISourceOffsetStore, per-day rotation handling, baseline-to-end on first sight unlessIngestExistingOnFirstRun.MDaemonEventNormalizer: line DTO ->MDaemonLogEventpayload with IP entity refs; fail-closed on malformed input.MDaemonDetectionRulesscoring AuthenticationFailed 0.4, IpBlocked 0.9 (MDaemon already decided), ScreeningBlocked 0.6, AccessRefused 0.2. Because the correlator keys on IP entities, MDaemon evidence and nginx evidence about the same address merge into one incident automatically.Deployment note: this adapter is designed to run in a satellite pipeline instance on the MDaemon Windows host per D-0025 (sources role only, shared Postgres over LAN). Live satellite deployment is tracked in TODO.md.
Fixes #
How was this tested?
dotnet build Viegard.slnx- 0 errors, 0 warningsdotnet test Viegard.slnx- 197/197 pass including 18 live PostgreSQL integration testsImplementation drafted by a coding agent against a detailed spec, independently reviewed and re-verified.
Checklist