Email Archiving in SuiteCRM

Hi @Sophie_g ,

This issue usually occurs when SuiteCRM intermittently fails to fetch or archive emails due to background job, mailbox, or configuration issues. Here’s a structured way to troubleshoot it.

Check Scheduler and Cron Setup

SuiteCRM’s email archiving depends entirely on the background scheduler.

Verify that the cron job is running every few minutes:

cd /var/www/html/suitecrm && php -f cron.php > /dev/null 2>&1

Go to Admin → Schedulers and confirm that:

“Check Inbound Mailboxes” and related jobs are Active and show recent successful runs.

No jobs are marked as failed or overdue.

If the scheduler isn’t running, SuiteCRM will simply skip email fetching.

Review Inbound Email Configuration

Go to Admin → Inbound Email and run the Test Connection.
Confirm:

IMAP hostname, port, and SSL options are correct.

“Only Fetch Unread” is disabled (messages marked read before SuiteCRM fetches them will be skipped).

The correct folder (usually INBOX) is selected.

If the mailbox was recently migrated or credentials updated, delete and recreate the inbound account to reset IMAP pointers.

Validate Outbound / Sent Archiving Settings

In Admin → Email Settings and each user’s Profile → Email Settings, ensure “Archive Sent Emails” is enabled if you need sent emails archived.
Confirm SMTP credentials are valid.

Examine Logs (Enable Debug Temporarily)

Set log_level to “debug” in config.php and reproduce the issue.

SuiteCRM 7.x Logs:
suitecrm.log (root) or /public/legacy or /logs/legacy

SuiteCRM 8.x Logs:
/var/log/prod.log or /log/prod

Web/PHP Logs:
Apache → /var/log/apache2/error.log
Nginx → /var/log/nginx/error.log
PHP → php_error.log

Look for keywords like IMAP, archiver, inbound, or timeout.
If you see “job succeeded but no fetch,” the scheduler may be skipping due to message flags or size limits.

Common Root Causes

Cron/scheduler not executing

Mailbox authentication or SSL certificate expired

PHP memory/timeout limits too low for large messages

Special characters or emojis in subjects (encoding issue)

Mailbox quota reached or IMAP server throttling requests

UIDVALIDITY change after mailbox migration (requires re-adding mailbox)

Quick Fixes

Confirm cron and scheduler are working

Re-test inbound connection and re-save credentials

Temporarily disable “Only Fetch Unread”

Increase PHP limits (max_execution_time, upload_max_filesize, etc.)

Run Quick Repair and Rebuild after config changes

Recreate inbound mailbox record if IMAP index mismatch is suspected

Related Community Threads

If you can share your SuiteCRM version (7.x or 8.x) and a short excerpt from suitecrm.log around the missed email timestamp, we can help pinpoint the exact cause.
In most cases, ensuring the cron and “Check Inbound Mailboxes” scheduler are running reliably resolves this behavior.