Overview
Discover what makes SquirrelMail powerful
SquirrelMail is a classic, PHP‑based webmail client that has remained relevant for more than two decades. It presents a lightweight, server‑side application that interfaces with standard IMAP/SMTP mail servers, offering users an email experience comparable to desktop clients while running entirely within a web browser. From a developer’s standpoint, the project is notable for its long‑standing commitment to backward compatibility—evidenced by regular updates that bring support for the latest PHP releases (PHP 8 as of 2021, and earlier patches for PHP 5.4/5.5). This makes it a dependable choice for environments that must run legacy code alongside newer stacks.
Pure PHP implementation
IMAP/SMTP integration
Plugin architecture
User‑level configuration
Overview
SquirrelMail is a classic, PHP‑based webmail client that has remained relevant for more than two decades. It presents a lightweight, server‑side application that interfaces with standard IMAP/SMTP mail servers, offering users an email experience comparable to desktop clients while running entirely within a web browser. From a developer’s standpoint, the project is notable for its long‑standing commitment to backward compatibility—evidenced by regular updates that bring support for the latest PHP releases (PHP 8 as of 2021, and earlier patches for PHP 5.4/5.5). This makes it a dependable choice for environments that must run legacy code alongside newer stacks.
Key Features
- Pure PHP implementation – No external binaries or native extensions are required; the entire codebase is written in PHP 5.x/7.x syntax, making it trivial to deploy on shared hosting or custom LAMP stacks.
- IMAP/SMTP integration – Uses PHP’s IMAP and SMTP extensions to fetch, send, and organize mail. Supports multiple folders, message threading, and MIME parsing.
- Plugin architecture – A modular plugin system allows developers to extend functionality (e.g., the “Mail Fetch” or “Junk Email Filter” plugins) by placing PHP files in a dedicated directory and enabling them via a simple config flag.
- User‑level configuration – Each user can customize themes, signature blocks, and mailbox layout through a web interface; settings are stored in a lightweight SQLite or MySQL database.
- Security hooks – Built‑in mechanisms for handling phishing and spam detection, with the ability to plug in external filters or API calls.
Technical Stack
| Layer | Technology |
|---|---|
| Web server | Apache, Nginx (via PHP‑FPM) |
| Language | PHP 5.4+ / 7.x (compatibility for PHP 8 in recent snapshots) |
| Mail protocol | IMAP/SMTP through PHP extensions |
| Storage | SQLite (default), MySQL, PostgreSQL via PDO for configuration and session data |
| Front‑end | HTML5/CSS3, minimal JavaScript (jQuery for UI helpers) |
| Packaging | Source tarballs; optional Docker images available in community repos |
The core of SquirrelMail is a collection of PHP scripts that render the UI and handle business logic. It does not rely on any heavy frameworks, which keeps the footprint small (≈ 5 MB of code) and eases static analysis or code review.
Core Capabilities & APIs
- Message API – Exposes functions such as
SquirrelMail_imap_fetch_overview()andSquirrelMail_mailbox_send_message(), which developers can call directly from custom plugins or external scripts. - Event hooks – Plugins register callbacks for events like
preLogin,postLogout, ormessageSent. This allows deep integration without modifying the core codebase. - REST‑like endpoints – While not a full REST API, SquirrelMail’s AJAX handlers (e.g.,
ajax.php) provide JSON responses for tasks such as fetching message bodies or updating mailbox settings. - Configuration API – The
config.phpfile is parsed by the application; developers can programmatically update settings or generate user‑specific config files for automated deployments.
Deployment & Infrastructure
SquirrelMail is designed to run on virtually any LAMP stack. It requires PHP with the IMAP extension enabled and a writable directory for temporary files. For scalable deployments:
- Horizontal scaling – Multiple instances can be load‑balanced behind a reverse proxy; session data is stored in the database, ensuring consistency across nodes.
- Containerization – Official Docker images (or community‑maintained ones) encapsulate the PHP runtime and web server, simplifying CI/CD pipelines.
- High‑availability – By storing configuration in a shared database and using sticky sessions or distributed session stores, the application can survive node failures.
Integration & Extensibility
The plugin system is the linchpin of SquirrelMail’s extensibility. Each plugin resides in plugins/ and contains a manifest file (plugininfo.php) that declares metadata, dependencies, and event hooks. Developers can:
- Create lightweight extensions that add new menu items or modify the message view.
- Hook into IMAP operations to inject custom headers, perform analytics, or integrate with external identity providers.
- Leverage the existing “Mail Fetch” plugin as a template for writing IMAP clients that pull mail from other protocols (POP3, MBOX).
Because the code is open source under a permissive license (BSD‑2), there are no vendor lock‑ins, and the community actively maintains security patches.
Developer Experience
- Documentation – The project provides a comprehensive developer guide, API references, and plugin development tutorials. While the documentation is older in style, it covers all core concepts.
- Community – Mailing lists and forums remain active; the project hosts a bounty system for feature requests, encouraging community contributions.
- Testing – The codebase includes unit tests (PHPUnit) and integration tests for core functionality, making it easier to adopt in test‑driven workflows.
Use Cases
- Enterprise intranet – Organizations that require a webmail client with strict control over the codebase can deploy SquirrelMail on their internal servers, integrating it with existing LDAP/Active Directory for authentication.
- Custom mail portals – Service providers can bundle SquirrelMail with additional plugins (e.g., calendar, contact sync) to offer a turnkey webmail solution
Open SourceReady to get started?
Join the community and start self-hosting SquirrelMail today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
Restreamer
Free, self‑hosted live stream distribution platform
Davis
Modern, feature‑packed DAV server with admin UI
Mylar3
Automated comic book downloader and organizer

Jami
Peer‑to‑peer encrypted communication for all devices
Transmission
Fast, free BitTorrent client for all platforms
Tracim
Collaborative workspace for teams