Force immediate IMAP synchronization for individual mailboxes on demand, using FreeScout's native fetch engine.
In FreeScout installations with many mailboxes, the sequential fetch cycle can take several minutes to complete. This creates two common scenarios where waiting is not acceptable:
- Time-sensitive emails: 2FA codes, password resets, and similar emails expire before the target mailbox is reached in the fetch cycle.
- On-demand refresh: The installation runs infrequent fetch intervals (5–10 minutes or more) which works well for normal workloads, but occasionally a specific mailbox needs an immediate update — a client is waiting, an important email just arrived, or a deadline is approaching.
SyncNow adds a "Sync Now" button to each IMAP mailbox. When clicked, it immediately triggers a full synchronization for that specific mailbox as a background process, without waiting for the general fetch cycle or interfering with it.
- FreeScout >= 1.8.131
- PHP >= 8.0
- Download the latest release from GitHub Releases
- Extract to
Modules/SyncNow/ - Activate the module in FreeScout's Modules page — migrations run automatically
Go to Manage » Settings » SyncNow to configure:
- Sync Cooldown — Minimum seconds between forced syncs for the same mailbox. Set to 0 to disable. Administrators bypass this limit. Default: 60 seconds.
- History Retention — Number of days to keep sync history records. Set to 0 to keep records indefinitely. Default: 90 days.
- History Limit — Maximum number of records shown in the mailbox history view. Default: 100.
By default only administrators can trigger forced syncs. To allow regular users:
- Go to Manage » Users » [User] » Permissions
- Enable "Force sync mailboxes"
The user must also have access to the mailbox they want to sync.
In web/FPM environments, the PHP binary is auto-detected. If auto-detection fails, set the path explicitly in your .env file:
SYNCNOW_PHP_BINARY=/usr/bin/php8.2
- Navigate to any IMAP mailbox
- Click "Sync Now" in the sidebar menu
- The sync page opens showing the last sync summary and history
- Click the "Sync Now" button to trigger an immediate sync
- A modal opens with a real-time log of the fetch operation
- On completion, the result summary shows status, emails fetched, and duration
- Close the modal — the page reloads automatically to reflect the new sync
Administrators can view the sync history across all mailboxes, with filters by mailbox, user, and status. This view is accessible from the Settings page (Manage » Settings » SyncNow).
Feel free to use and modify this module for your needs! This is open source software and you're encouraged to adapt it to your requirements.
Contributions are welcome! If you have ideas for improvements or find any issues:
- Bug Reports, Questions & Feature Requests: GitHub Issues
- Pull Requests: Code contributions are appreciated
- Documentation: Help improve the docs
If you find this module useful and would like to support its development, please feel free to sponsor this project via GitHub Sponsors.
Your support helps maintain and improve this project. Thank you! 🙏
- Developer: Raimundo Alba
- GitHub: @rabsym
- Built for: FreeScout — The free self-hosted help desk & shared mailbox
⭐ If you find this module useful, please star it on GitHub!
GNU Affero General Public License v3.0 — see the LICENSE file for details.
Settings page (cooldown, retention, history limit). Cooldown enforcement with countdown. Global sync history for administrators. Security improvements.
Control centre index page. Global history view. Automatic page reload on modal close.
Real-time modal with live log. Audit log table. Per-mailbox history. PHP CLI auto-detection. Localization.
Initial release. Forced IMAP sync using FreeScout's native fetch engine. Sync Now button. Per-user permission control.