# Graph Report - . (2026-08-12) ## Corpus Check - 130 files · ~65,011 words - Verdict: corpus is large enough that graph structure adds value. ## Summary - 1025 nodes · 2084 edges · 69 communities (57 shown, 12 thin omitted) - Extraction: 79% EXTRACTED · 21% INFERRED · 0% AMBIGUOUS · INFERRED: 434 edges (avg confidence: 0.8) - Token cost: 88,541 input · 0 output ## Community Hubs (Navigation) - Domain Access Web Requests - Admin User & Session Management - IMAP Fetch/Append Protocol Types - Dashboard & Login Tests - Admin Web UI Add-Forms - Spam/DKIM Verification & Attachments - Mailbox App Passwords & Schema - DKIM Web Routes & Tests - DKIM Key Management - Admin Session Auth Middleware - Webmail Session Auth Middleware - Mailbox Alias SMTP Tests - Mailbox CRUD Queries - Dashboard Web UI - Email Log Persistence - Mailboxes Web UI Handlers - Admin Dashboard & Deployment Docs - TLS Cert & Mailstore Master Key - Mailbox Rules/Lists/Sessions Queries - Mailbox App Password Auth - Mailbox Message Storage Queries - Sender/Domain/IP Lookup Queries - SPF Heuristic Tests - DKIM Key CRUD - Domain CRUD - Sender CRUD - Outbound Relay Delivery - Mailbox Allow/Block List - IP Whitelist CRUD - Config Loading & Settings - Mailbox Session/WebAuthn Queries - Toolbox Logger & Utilities - Mailbox Alias Queries - DKIM Key Queries - SMTP Server Listeners - Auth/Custom Header Models - Logger Levels - SMTP Backend & Session - Relay Email Logging - Filter Rule Evaluation - List/Edit Web UI Pages - Login & MFA Setup Pages - Webmail Auth Handlers - Domain DKIM/Sender Counts - SMTP Management JS - Login Server Middleware - Mailstore Quota Status - DKIM Management JS - Logs & Message Viewer Pages - Deployment Scripts - Error Page - Server Settings Page - Project Root ## God Nodes (most connected - your core abstractions) 1. `setFlash()` - 66 edges 2. `newTestApp()` - 35 edges 3. `parseTime()` - 34 edges 4. `HashPassword()` - 33 edges 5. `Session` - 26 edges 6. `DB` - 25 edges 7. `startTestServer()` - 23 edges 8. `Base Layout Template` - 23 edges 9. `requireDomainAccess()` - 22 edges 10. `writeJSON()` - 21 edges ## Surprising Connections (you probably didn't know these) - `main()` --calls--> `Load()` [INFERRED] main.go → internal/config/config.go - `main()` --calls--> `AbsoluteSQLitePath()` [INFERRED] main.go → internal/config/config.go - `main()` --calls--> `Open()` [INFERRED] main.go → internal/db/schema.go - `main()` --calls--> `LoadOrCreateMasterKey()` [INFERRED] main.go → internal/mailstore/mailstore.go - `main()` --calls--> `ResolveBanner()` [INFERRED] main.go → internal/smtpserver/server.go ## Import Cycles - None detected. ## Hyperedges (group relationships) - **Optional MFA / Second-Factor Setup Flow** — readme_admin_dashboard_login, internal_webui_templates_account_account_settings_page, internal_webui_templates_account_totp_mfa_section, internal_webui_templates_account_passkey_management [INFERRED 0.85] - **Delegated Admin Management CRUD Flow** — internal_webui_templates_admins_manage_admins_page, internal_webui_templates_add_admin_add_admin_page, internal_webui_templates_edit_admin_edit_admin_access_page [INFERRED 0.85] - **Domain DNS / DKIM / SPF Verification Workflow** — internal_webui_templates_dkim_dkim_key_management_page, internal_webui_templates_domains_domain_management_page, internal_webui_templates_add_domain_add_domain_page [INFERRED 0.80] - **IP Whitelist Management Flow** — internal_webui_templates_ips_ips_list_page, internal_webui_templates_edit_ip_edit_ip_whitelist_page, internal_webui_templates_sidebar_email_sidebar_navigation [INFERRED 0.80] - **Multi-Factor Authentication Flow** — internal_webui_templates_login_login_page, internal_webui_templates_login_mfa_login_mfa_page, internal_webui_templates_totp_setup_totp_setup_page [INFERRED 0.80] - **Sender Management Flow** — internal_webui_templates_senders_senders_list_page, internal_webui_templates_edit_sender_edit_sender_page, internal_webui_templates_sidebar_email_sidebar_navigation [INFERRED 0.80] - **Mailbox Management Flow (Aliases, App Passwords, Lists, Rules)** — internal_webui_templates_mailboxes_mailboxes_list_page, internal_webui_templates_edit_mailbox_edit_mailbox_page, internal_webui_templates_mailbox_aliases_aliases_page, internal_webui_templates_mailbox_apppasswords_app_passwords_page, internal_webui_templates_mailbox_lists_allow_block_list_page, internal_webui_templates_mailbox_rules_filter_rules_page [INFERRED 0.85] - **Self-Service Webmail Login-to-Account Flow** — internal_webui_templates_webmail_login_login_page, internal_webui_templates_webmail_login_mfa_mfa_verification_page, internal_webui_templates_webmail_totp_setup_totp_setup_page, internal_webui_templates_webmail_account_account_dashboard_page [INFERRED 0.85] - **Admin Base Layout Template System** — internal_webui_templates_base_base_layout, internal_webui_templates_dashboard_dashboard_page, internal_webui_templates_mailboxes_mailboxes_list_page, internal_webui_templates_add_mailbox_add_mailbox_page, internal_webui_templates_edit_mailbox_edit_mailbox_page, internal_webui_templates_mailbox_aliases_aliases_page, internal_webui_templates_mailbox_apppasswords_app_passwords_page, internal_webui_templates_mailbox_lists_allow_block_list_page, internal_webui_templates_mailbox_rules_filter_rules_page, internal_webui_templates_sidebar_email_sidebar_navigation [INFERRED 0.85] ## Communities (69 total, 12 thin omitted) ### Community 0 - "Domain Access Web Requests" Cohesion: 0.06 Nodes (39): Request, requireDomainAccess(), scopeFromContext(), domainRemovedMessage(), Request, ResponseWriter, App, isValidDomainName() (+31 more) ### Community 1 - "Admin User & Session Management" Cohesion: 0.05 Nodes (22): AdminSession, AdminUser, WebAuthnCredential, Time, DB, Duration, Row, newSessionToken() (+14 more) ### Community 2 - "IMAP Fetch/Append Protocol Types" Cohesion: 0.06 Nodes (40): AppendData, AppendOptions, CopyData, Envelope, ExpungeWriter, FetchOptions, FetchResponseWriter, FetchWriter (+32 more) ### Community 3 - "Dashboard & Login Tests" Cohesion: 0.10 Nodes (50): HashPassword(), T, TestDashboardShowsMailboxNearQuota(), T, TestLoginRequiresTOTPWhenEnabled(), TestLoginSuccessWithoutMFA(), TestLoginWrongPasswordRejected(), createMailboxFor() (+42 more) ### Community 4 - "Admin Web UI Add-Forms" Cohesion: 0.06 Nodes (54): Add Admin Page, Add Domain Page, Add IP Whitelist Page, Add Mailbox Form, Add Mailbox Page, Add Sender Page, Manage Admins Page, Base Layout Template (+46 more) ### Community 5 - "Spam/DKIM Verification & Attachments" Cohesion: 0.06 Nodes (37): VerifyInbound(), CheckRspamd(), CheckDNSBL(), SpamScore(), attachmentStoragePath(), cleanMessageIDPrefix(), Time, parseMessage() (+29 more) ### Community 6 - "Mailbox App Passwords & Schema" Cohesion: 0.07 Nodes (38): GreetingData, GenerateAppPassword(), DB, DB, migrateAddedColumns(), Open(), Client, T (+30 more) ### Community 7 - "DKIM Web Routes & Tests" Cohesion: 0.11 Nodes (24): Request, ResponseWriter, App, isAjax(), writeJSON(), T, TestIsValidDomainName(), TestVerificationRecordNameAndValue() (+16 more) ### Community 8 - "DKIM Key Management" Cohesion: 0.07 Nodes (29): DNSRecord, Manager, FuncMap, encodeKeyPair(), GenerateSelector(), DB, New(), rawBase64FromPEM() (+21 more) ### Community 9 - "Admin Session Auth Middleware" Cohesion: 0.11 Nodes (22): clearSessionCookie(), ResponseWriter, setSessionCookie(), clearPendingMFACookie(), Request, ResponseWriter, App, isStrongPassword() (+14 more) ### Community 10 - "Webmail Session Auth Middleware" Cohesion: 0.12 Nodes (19): clearMailboxSessionCookie(), ResponseWriter, setMailboxSessionCookie(), clearMailboxPendingMFACookie(), Request, ResponseWriter, App, pendingMailboxMFAID() (+11 more) ### Community 11 - "Mailbox Alias SMTP Tests" Cohesion: 0.16 Nodes (30): createAlias(), Backend, T, TestLocalDeliveryToAliasLandsInOwningMailbox(), TestMailboxAppPasswordCannotSendAsReceiveOnlyAlias(), TestMailboxAppPasswordCanSendAsEnabledAlias(), TestMailboxAppPasswordCanSendAsPrimaryButNotArbitraryAddress(), Backend (+22 more) ### Community 12 - "Mailbox CRUD Queries" Cohesion: 0.11 Nodes (6): Mailbox, MailboxWithDomain, DB, Row, scanMailbox(), Store ### Community 13 - "Dashboard Web UI" Cohesion: 0.16 Nodes (13): authLogDomain(), emailDomain(), emailOrBareDomain(), Request, ResponseWriter, App, Request, ResponseWriter (+5 more) ### Community 14 - "Email Log Persistence" Cohesion: 0.15 Nodes (8): EmailAttachment, EmailLog, EmailRecipientLog, DB, Row, scanEmailLog(), DB, App ### Community 15 - "Mailboxes Web UI Handlers" Cohesion: 0.29 Nodes (5): Request, ResponseWriter, App, parseQuotaGB(), localPartOf() ### Community 16 - "Admin Dashboard & Deployment Docs" Cohesion: 0.13 Nodes (16): Account Settings Page, Passkey / WebAuthn Management, TOTP MFA Section, Admin Dashboard Login, LICENSE, mailgoserver (Go Binary), nginx Reverse Proxy Setup, pymta-smtp.service (+8 more) ### Community 17 - "TLS Cert & Mailstore Master Key" Cohesion: 0.16 Nodes (12): CreateOptions, LoadOrCreateMasterKey(), CreateSSLContext(), GenerateSelfSignedCert(), Config, EnsureFolderExists(), GetLogger(), absPath() (+4 more) ### Community 18 - "Mailbox Rules/Lists/Sessions Queries" Cohesion: 0.19 Nodes (7): MailboxAllowBlockEntry, MailboxAppPassword, MailboxFilterRule, MailboxSession, MailboxWebAuthnCredential, DB, Time ### Community 19 - "Mailbox App Password Auth" Cohesion: 0.18 Nodes (4): DB, CheckPassword(), Server, Session ### Community 20 - "Mailbox Message Storage Queries" Cohesion: 0.21 Nodes (5): MailboxMessage, DB, Time, Time, parseTime() ### Community 21 - "Sender/Domain/IP Lookup Queries" Cohesion: 0.22 Nodes (6): Domain, DB, WhitelistedIP, Row, WhitelistedIP, scanDomain() ### Community 22 - "SPF Heuristic Tests" Cohesion: 0.31 Nodes (11): T, TestEvalSPF(), TestSpamScoreArithmetic(), CheckSPF(), domainOf(), evalSPF(), lookupSPFRecord(), matchA() (+3 more) ### Community 23 - "DKIM Key CRUD" Cohesion: 0.23 Nodes (3): DKIMKeyWithDomain, DB, scanDKIMKeysWithDomain() ### Community 25 - "Sender CRUD" Cohesion: 0.18 Nodes (3): Sender, SenderWithDomain, DB ### Community 26 - "Outbound Relay Delivery" Cohesion: 0.29 Nodes (8): domainOf(), DB, Duration, File, Relay, New(), prepareEmailForRecipient(), Result ### Community 27 - "Mailbox Allow/Block List" Cohesion: 0.24 Nodes (4): DB, matchesAllowBlock(), domainPart(), equalFold() ### Community 28 - "IP Whitelist CRUD" Cohesion: 0.20 Nodes (3): WhitelistedIPWithDomain, DB, WhitelistedIP ### Community 29 - "Config Loading & Settings" Cohesion: 0.27 Nodes (8): defaultKV, AbsoluteSQLitePath(), GenerateSettingsIni(), File, Load(), T, TestAbsoluteSQLitePath(), TestGenerateAndLoadRoundTrip() ### Community 30 - "Mailbox Session/WebAuthn Queries" Cohesion: 0.20 Nodes (3): DB, Duration, newMailboxSessionToken() ### Community 31 - "Toolbox Logger & Utilities" Cohesion: 0.31 Nodes (7): Configure(), GenerateMessageID(), GetCurrentTime(), File, Time, parseLevel(), Level ### Community 33 - "DKIM Key Queries" Cohesion: 0.43 Nodes (4): DKIMKey, DB, Row, scanDKIMKey() ### Community 34 - "SMTP Server Listeners" Cohesion: 0.32 Nodes (7): Backend, Config, File, Server, NewPlainServer(), NewTLSServer(), ResolveBanner() ### Community 35 - "Auth/Custom Header Models" Cohesion: 0.43 Nodes (4): AuthLog, CustomHeader, WhitelistedIP, Time ### Community 37 - "SMTP Backend & Session" Cohesion: 0.33 Nodes (4): Backend, DB, Session, Store ### Community 38 - "Relay Email Logging" Cohesion: 0.33 Nodes (4): File, Relay, overallStatus(), peerIP ### Community 39 - "Filter Rule Evaluation" Cohesion: 0.50 Nodes (3): Store, matchCondition(), FilterAction ### Community 40 - "List/Edit Web UI Pages" Cohesion: 0.50 Nodes (5): Edit IP Whitelist Entry Page, Edit Sender Page, Client-side IP Detection (ifconfig.me), Whitelisted IPs List Page, Senders List Page ### Community 41 - "Login & MFA Setup Pages" Cohesion: 0.40 Nodes (5): First Login / Set Up Account Page, Login Page, Login MFA Verification Page, Passkey/WebAuthn Login Flow, TOTP Authenticator Setup Page ### Community 42 - "Webmail Auth Handlers" Cohesion: 0.50 Nodes (3): Handler, Request, App ### Community 44 - "SMTP Management JS" Cohesion: 0.50 Nodes (3): DNSVerification, FormValidation, SMTPManagement ## Knowledge Gaps - **47 isolated node(s):** `mailgoserver`, `defaultKV`, `WhitelistedIP`, `Store`, `Store` (+42 more) These have ≤1 connection - possible missing edges or undocumented components. - **12 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes. ## Suggested Questions _Questions this graph is uniquely positioned to answer:_ - **Why does `HashPassword()` connect `Dashboard & Login Tests` to `Domain Access Web Requests`, `Admin User & Session Management`, `Mailbox App Passwords & Schema`, `Admin Session Auth Middleware`, `Mailbox Alias SMTP Tests`, `Mailboxes Web UI Handlers`, `Mailbox Allow/Block List`?** _High betweenness centrality (0.224) - this node is a cross-community bridge._ - **Why does `parseTime()` connect `Mailbox Message Storage Queries` to `Mailbox Alias Queries`, `Admin User & Session Management`, `DKIM Key Queries`, `Auth/Custom Header Models`, `Mailbox CRUD Queries`, `Email Log Persistence`, `Mailbox Rules/Lists/Sessions Queries`, `Mailbox App Password Auth`, `Sender/Domain/IP Lookup Queries`, `DKIM Key CRUD`, `Domain CRUD`, `Sender CRUD`, `Mailbox Allow/Block List`, `IP Whitelist CRUD`?** _High betweenness centrality (0.186) - this node is a cross-community bridge._ - **Why does `Mailbox` connect `Mailbox CRUD Queries` to `Domain Access Web Requests`, `IMAP Fetch/Append Protocol Types`, `Dashboard & Login Tests`, `Spam/DKIM Verification & Attachments`, `Webmail Auth Handlers`, `Webmail Session Auth Middleware`, `Mailboxes Web UI Handlers`, `Mailbox Rules/Lists/Sessions Queries`, `Mailbox App Password Auth`?** _High betweenness centrality (0.151) - this node is a cross-community bridge._ - **Are the 64 inferred relationships involving `setFlash()` (e.g. with `.addAdmin()` and `.addAlias()`) actually correct?** _`setFlash()` has 64 INFERRED edges - model-reasoned connections that need verification._ - **Are the 29 inferred relationships involving `newTestApp()` (e.g. with `TestDashboardShowsMailboxNearQuota()` and `TestLoginRequiresTOTPWhenEnabled()`) actually correct?** _`newTestApp()` has 29 INFERRED edges - model-reasoned connections that need verification._ - **Are the 29 inferred relationships involving `parseTime()` (e.g. with `.GetAliasByEmail()` and `.GetAttachmentByID()`) actually correct?** _`parseTime()` has 29 INFERRED edges - model-reasoned connections that need verification._ - **Are the 32 inferred relationships involving `HashPassword()` (e.g. with `.SeedDefaultAdminIfEmpty()` and `newTestMailboxWithAppPassword()`) actually correct?** _`HashPassword()` has 32 INFERRED edges - model-reasoned connections that need verification._