-
Notifications
You must be signed in to change notification settings - Fork 15
Basic IMAP Mailboxes
Connecting a plain mailbox β a hosting/cPanel inbox, Fastmail, a generic mail.example.com account with a username and password β instead of Microsoft 365 or Google Workspace.
Note
Status: planned (roadmap). As of this writing FreeITSM connects mailboxes only via Microsoft 365 (Microsoft Graph API) or Google Workspace (Gmail API), both of which require an OAuth app registration. Basic IMAP/SMTP is not built yet. This page captures the design so it can be built and then turned into a setup guide. See Mailbox Authentication for what exists today.
Both current providers assume an enterprise identity platform β an Azure/Entra app registration or a Google Cloud OAuth client. That's the right choice for Microsoft 365 and Workspace tenants, but it's overkill (or simply unavailable) for a smaller operation whose support address lives on:
- a web-hosting mailbox (cPanel/Plesk,
mail.yourdomain.com) - an independent provider (Fastmail, Zoho, mxroute, Migadu, β¦)
- any server that speaks IMAP + SMTP with a username and password
For these, there's no OAuth to configure β you just want to hand FreeITSM a host, a login, and a password.
The mailbox pipeline is already provider-branched end to end ($mailbox['provider'] is microsoft or google today). Adding imap as a third provider follows the exact pattern the Gmail connector established: a self-contained helper whose functions normalise every message to the same internal shape, so nothing downstream (ticket creation, attachments, whitelist, multi-tenancy routing) needs to change.
| Concern | Microsoft / Google (today) | Basic IMAP (planned) |
|---|---|---|
| Auth | OAuth 2.0 β app registration, client ID/secret, sign-in or client-credentials | Username + password, per connection. No app registration, no sign-in dance |
| Reading mail | Graph API / Gmail API over HTTPS | PHP imap_* functions (imap_open, search UNSEEN, fetch, flag) |
| Sending replies | Graph / Gmail send endpoints | SMTP with auth (STARTTLS/SSL) |
| Credentials stored | Client secret + OAuth tokens (encrypted) | IMAP/SMTP password (encrypted at rest, same as the client secret) |
| "Right inbox" safeguards | Alias/identity checks (Graph /me) β see auth page |
Not applicable β the login is the mailbox |
Reading over IMAP is straightforward. Sending is not β IMAP is receive-only, so replies go out over SMTP, and correct SMTP (auth, STARTTLS, MIME multipart, attachments) is the part worth getting right rather than hand-rolling. The intended approach is a small, self-contained SMTP sender (e.g. PHPMailer) invoked from the same provider branch the Gmail send path already uses.
Basic IMAP requires PHP's imap extension to be enabled β neither current provider needs it (both are pure HTTPS/cURL). On WAMP/most hosts this is a one-line php.ini toggle, but self-hosters should expect to enable it.
Under Tickets β Settings β Mailboxes, choosing Provider = Basic IMAP will show a simpler form than the OAuth providers β no redirect URI, scopes, or Authenticate button:
-
IMAP: server, port (usually
993), encryption (ssl) - Login: username + password
-
SMTP (for replies): server, port (usually
587), encryption (tls) - The usual shared settings: display name, target address, folder, max emails per check, post-import action
- Passwords, not tokens. A stored mailbox password is a long-lived credential. FreeITSM encrypts it at rest (as it does client secrets), but unlike OAuth there's no scoped, revocable token β if the provider offers an app-specific password, prefer that.
- No alias/identity safeguards. The Microsoft delegated-mode protections against "reading the wrong inbox" don't apply here: the login you give is the mailbox, full stop.
- Provider quirks. IMAP folder naming and SMTP submission ports vary between hosts; expect a little per-provider tuning.
- Mailbox Authentication β the Microsoft 365 & Google Workspace connection modes that exist today
- Tickets β the module these mailboxes feed
- Security β how mailbox credentials are encrypted at rest
- Multi-Tenancy: Email routing & mailboxes β pinned vs shared-intake mailboxes
FreeITSM β an open-source IT Service Management platform Β· github.com/edmozley/freeitsm Β· MIT licence
- Installation
- β° Scheduled tasks (cron jobs)
- Architecture
- AI Providers
- Internationalisation (i18n)
- Timezones & Time Handling
- Theming & Dark Mode
- β¨οΈ Command palette (βK)
- π Searching inside tickets
- π Attached documents
- MobileβFriendly
-
Security
- Layer 1 β which modules you can enter
- β³ π§© Module Access Control
- β³ π οΈ Module Access β Developer Guide
- Layer 2 β what you can administer
- β³ π Roles & Permissions
- β³ π οΈ Roles β Developer Guide
- β³ π€ Why capabilities are constants
- Layer 3 β the System module
- β³ π Admin Access Control
- Hardening
- β³ π Security review response 2026-08
- β³ π‘οΈ Security hardening 2026-08
- β³ π οΈ Security hardening 2026-08 β Developer Guide
- β³ π‘οΈ Round three β plain English
- β³ π οΈ Round three β Developer Guide
- Single Sign-On (SSO)
- ποΈ LDAP & Active Directory
- Browser Extension
- API Reference
-
π REST API β how it works
- β³ π« REST API: Tickets
- β³ π» REST API: Assets
- β³ π΄ REST API: Problems
- β³ π REST API: Changes
- β³ π REST API: Knowledge
- β³ β REST API: Tasks
- β³ ποΈ REST API: CMDB
- β³ π REST API: Contracts
- β³ ποΈ REST API: Calendar
- β³ πΏ REST API: Software
- β³ π¦ REST API: Service Status
- β³ βοΈ REST API: Morning Checks
- β³ π REST API: Forms
- β³ βοΈ REST API: Workflow
- β³ πΊοΈ REST API: Network Mapper
- β³ π§ Using the API docs page
- β³ π OpenAPI specification
- β³ β OpenAPI: kept correct
- β³ π οΈ Maintaining the catalogue
- Watchtower
-
Tickets
- β³ Mailbox Authentication
- β³ π€ Email send log
- β³ Basic IMAP mailboxes
- β³ Email rendering & images
- β³ SLA Management
- β³ WhatsApp channel
- β³ π¬ Web chat channel
- β³ π£ Slack channel
- β³ π Linking tickets
- β³ ποΈ Canned responses
- β³ βοΈ Limiting replies to particular senders
- β³ βοΈ Email signatures
- β³ π The public web address
- β³ π’ Ticket numbering
- β³ π Raising a ticket for someone else
- β³ π Merging tickets
- β³ β Splitting tickets
- β³ β Selecting several tickets
- β³ π οΈ Snoozing tickets β Developer Guide
- β³ π₯ Collision detection
- β³ β±οΈ Time tracking
- Problem Management
- Tasks
- Assets
- Knowledge
- Change Management
- Calendar
- Morning Checks
- Reporting
- Software
- Forms
- Contracts
- Service Status
- π Notifications
- π¨ War Room
- Self-Service Portal
- LMS
- Process Mapper
- CMDB
- Network Mapper
- Workflows
- Issue trackers (Jira, Azure DevOps)
- System
-
Overview
- β³ π Progress tracker
- β³ Concepts & vocabulary
- β³ Email routing & mailboxes
- β³ Settings: global vs per-company
- β³ Users & self-service
- β³ Staff cross-company access
- β³ Worked examples
- β³ Pitfalls & gotchas
- β³ Scope: what it's for
- β³ π οΈ Developer Guide (make a module multi-company)
- β³ ποΈ Case study: CMDB (a linked graph)
- β³ π§ͺ Test harness (prove it's isolated)