Internal project · Implemented foundation
A bounded company inbox over real operational mailboxes.
The Globalogs admin can review selected mailbox context and connect conversations to leads without turning MongoDB into a mail server.
- 01Operating problem
Who is doing the work, what breaks, and why it matters.
- 02System decision
Boundaries, data ownership, safeguards, and the smallest useful scope.
- 03Evidence
What exists, what was verified, what remains limited, and the next decision.
The operating problem
The system starts with a condition that needs to change.
Company inquiries arrive through real mailboxes, while lead and submission context lives in the application. Copying entire mailboxes into the product would add privacy, synchronization, MIME, and attachment risk.
Constraints that shaped the work
- Mailcow remains authoritative for mail storage, folders, flags, MIME, and attachments.
- Only the configured general, sales, and support mailboxes are available.
- Email HTML, remote images, raw MIME, and attachment bytes must not render in the admin.
Decisions and approach
- Cache bounded message metadata in MongoDB and fetch safe plain text on demand.
- Reply through the mailbox that received the message and preserve threading headers.
- Link messages to CRM records explicitly instead of inferring identity from names or domains.
System boundary
Implementation stack
ImapFlow · Nodemailer · MongoDB · Next.js · React
Supportable evidence
- Repeated mailbox refreshes use mailbox, folder, UIDVALIDITY, and UID identity to avoid duplicate metadata.
- The UI renders React-escaped plain text and lists attachment metadata without downloading bytes.
- Admin APIs remain protected by the existing signed CMS session and origin checks.
Known limits
- Sent-folder synchronization, attachment downloads, arbitrary folders, staff assignment, and mailbox administration are deliberately out of scope.
- Provider availability still depends on correctly configured server-only mailbox credentials.
Lessons carried forward
- An operational inbox integration is safer when the mail provider remains the source of truth.
- A small metadata bridge can create useful CRM context without cloning an email platform.
Bring your operating context
A useful project conversation starts with the work, not a technology shopping list.
Share the current process, systems involved, failure point, and the result you need. We will help identify a credible first scope.