-
Notifications
You must be signed in to change notification settings - Fork 15
Basic IMAP Mailboxes
Connect the ticketing inbox to a plain mailbox β a hosting/cPanel inbox, Fastmail, Zoho, mxroute, Migadu, or any server that speaks IMAP + SMTP β using just a username and password, with no OAuth app registration.
Configure this under Tickets β Settings β Mailboxes β Provider: Basic IMAP. For the Microsoft 365 / Google Workspace connection modes, see Mailbox Authentication.
Microsoft 365 and Google Workspace both authenticate through an enterprise identity platform β an Azure/Entra app registration or a Google Cloud OAuth client. That's the right choice for those tenants, but it's overkill (or simply unavailable) when your 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 for reading and SMTP for sending
For these there's no OAuth to configure β you hand FreeITSM a host, a login and a password, and it reads mail into tickets and sends replies like any other mailbox.
Once connected, a basic IMAP mailbox behaves like every other one β inbound email becomes tickets, replies thread back, whitelisting and (on multi-company installs) sender-domain routing all apply. Under the hood:
| Concern | Microsoft / Google | Basic IMAP |
|---|---|---|
| Auth | OAuth 2.0 β app registration, client ID/secret, sign-in or client-credentials | Username + password, per connection. No app registration, no sign-in |
| Reading mail | Graph API / Gmail API over HTTPS | PHP imap_* functions (search UNSEEN, fetch, flag) |
| Sending replies | Graph / Gmail send endpoints | SMTP with auth (SSL or STARTTLS) |
| Credentials stored | Client secret + OAuth tokens (encrypted) | 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 |
Inbound mail is fetched with a peek (messages aren't marked read until your configured post-import action runs), MIME bodies and attachments are decoded, and everything is normalised to the same internal shape the Microsoft/Google connectors produce β so nothing downstream needs to know which provider a ticket came from.
- Tickets β Settings β Mailboxes β Add mailbox.
- Set Provider to Basic IMAP / SMTP. The OAuth fields (client ID/secret, redirect URI, scopes, Authenticate button) disappear β basic IMAP needs none of them.
- Fill in:
-
Display name and Target mailbox (the address, e.g.
support@yourdomain.com) -
IMAP server / port / encryption β e.g.
imap.yourhost.com,993, SSL/TLS (STARTTLS on143and plaintext are also supported) - Username and Password β usually the full email address and its mailbox password
-
SMTP server / port / encryption β e.g.
smtp.yourhost.com,587, STARTTLS (implicit SSL on465also supported) - The usual shared settings: folder (default
INBOX), max emails per check, and the post-import / rejected-email actions
-
Display name and Target mailbox (the address, e.g.
- Save. There's no sign-in step β click the Check emails (envelope) icon to pull mail immediately, or let the scheduled poll do it. The mailbox shows a Connected badge and reads straight from the target inbox.
App passwords. If your provider offers an app-specific password (many do for IMAP/SMTP access), prefer it over your main account password β it's scoped to mail and easy to revoke.
Basic IMAP needs PHP's imap extension enabled β neither current provider requires it (both are pure HTTPS/cURL). On most hosts this is a one-line change:
-
cPanel / WHM β MultiPHP INI Editor β enable
imap -
Debian/Ubuntu β
sudo apt install php-imap && sudo phpenmod imap, then restart PHP-FPM/Apache β but see the PHP 8.4 note below if you are on Debian 13 or later -
WAMP/XAMPP β uncomment
extension=imapinphp.iniand restart
The imap extension was removed from PHP core in PHP 8.4.0 (it wrapped an abandoned C library) and moved to PECL. That is a change to PHP itself, so it affects every operating system β it is not a Windows quirk. Where you feel it depends on when your distribution moved to 8.4:
| Platform | PHP | Status |
|---|---|---|
| Debian 12 (bookworm) | 8.2 | β
apt install php-imap
|
| Debian 13 (trixie) and later | 8.4 | π΄ No php-imap package β not in trixie, not in trixie-backports. Only an experimental PECL rebuild |
| Ubuntu 24.04 LTS (noble) | 8.3 | β
apt install php-imap
|
| Ubuntu 25.10 (questing) and later | 8.4 | β
apt install php8.4-imap (universe β Ubuntu packages the PECL build) |
| Windows / WAMP / XAMPP on 8.4 | 8.4 | |
| Any platform, any PHP | β |
sudo pecl install imap then add extension=imap
|
π΄ Debian 13 is the one that has no clean answer.
sudo apt install php-imapβ the command in the list above β simply fails there; the package does not exist. Build it withpecl install imap(you will needlibc-client-devandlibkrb5-dev), pull theexperimentalpackage, or use one of the two OAuth providers instead, neither of which needs the extension at all.
There's no php_imap.dll in your PHP ext\ folder and nothing to uncomment. You have to add it manually:
- Download the extension from PECL: https://pecl.php.net/package/imap/1.0.3/windows
-
Pick the build that matches your PHP exactly. Check yours with
php -i | findstr /C:"Thread Safety" /C:"Architecture" /C:"Zend Extension Build". WAMP and XAMPP run Apache, which on Windows is always the Thread Safe (TS) build β so choose the TS, x64, VS17 DLL (e.g.php_imap-1.0.3-8.4-ts-vs17-x64). The Non-Thread-Safe (NTS) build will not load under Apache. - Copy
php_imap.dllinto your PHPext\folder (e.g.C:\wamp64\bin\php\php8.4.0\ext\). - Add
extension=imapto the Apachephp.ini. On WAMP that'sphpForApache.iniin the PHP version folder (thebin\php.iniunder Apache is a symlink to it). - Restart Apache (WAMP tray β Restart All Services).
β οΈ Know what you're accepting on Windows. php.net states plainly: "The IMAP extension is not thread-safe; it should not be used with ZTS builds." Apache on Windows is a ZTS (thread-safe) build, so the TS DLL above is the only one that will load β and it's the one php.net advises against. In practice it works, and it's what everyone running IMAP on WAMP does, but it is a known-unsupported combination rather than a supported one. For a production Windows install, prefer one of the two OAuth providers (neither needs the extension) or run PHP-FPM/NTS behind IIS or nginx.
If the extension is missing, the mailbox reports a clear error on the first check rather than failing silently.
- Passwords, not tokens. A stored mailbox password is a long-lived credential. FreeITSM encrypts it at rest (as it does OAuth client secrets) and never sends it back to the browser, but unlike OAuth there's no scoped, revocable token β use an app-specific password where you can.
- 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.
- Sending is HTML, no outbound attachments. Replies, SLA-breach notifications and template emails send as HTML (the same as the Gmail path). Attaching files to outbound replies isn't supported on the basic-IMAP path.
- Provider quirks. IMAP folder naming and SMTP submission ports vary between hosts; expect a little per-provider tuning (e.g. the folder name for "move imported mail here").
| Symptom | Cause | Fix |
|---|---|---|
| "The PHP IMAP extension is not enabledβ¦" |
imap extension missing |
Enable it (see Server requirement above) and re-check |
| "IMAP connection failedβ¦" | Wrong host/port/encryption, or bad credentials | Verify the IMAP server/port, try an app password, confirm SSL vs STARTTLS matches the port (993 = SSL, 143 = STARTTLS) |
| Replies fail: "SMTP connection β¦ failed" / "SMTP error" | Wrong SMTP host/port/encryption, or the provider blocks the submission port | Check the SMTP server/port (587 = STARTTLS, 465 = SSL); some hosts require the "authenticated SMTP" / submission service to be enabled |
| Mail read but never leaves the inbox | Post-import action is mark read | Expected β set the imported-email action to delete or move-to-folder if you'd rather it left the inbox |
- Mailbox Authentication β the Microsoft 365 & Google Workspace OAuth connection modes
- Tickets β the module these mailboxes feed
- Security β how mailbox credentials are encrypted at rest
- Multi-Tenancy: Email routing & mailboxes β pinned vs shared-intake mailboxes, sender-domain routing
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)