Recurring “Usage Statistics File Loader Task” and “Mail Delivery Failed” Errors

I have been receiving recurring emails from my OJS installation regarding “Mail delivery failed” and “Usage statistics file loader task - Error.”

Here is the timeline:

  • I received the first “Mail delivery failed” email on July 29, 2026.

  • Starting from September 10, 2026, I began receiving the “Mail delivery failed” emails more frequently.

  • I received the first “Usage statistics file loader task - Error” email on September 3, 2026, and I have continued receiving these emails since then.

The Usage Statistics Loader log consistently shows the following error:

[Error] Skipped log file usage_events_20260319.log because statistics from that month have already been calculated.
To recalculate statistics for a previous month, you must restore all of that month's log files and use the CLI tool to reprocess statistics.

For example, the latest log from September 25, 2026 shows:

[2026-09-25 02:49:02] [Notice] Task process started.
[2026-09-25 02:49:02] [Notice] File /home/rxcompound8949/ojs-files/usageStats/processing/usage_events_20260924.log was moved to dispatch folder.
[2026-09-25 02:49:02] [Error] Skipped log file usage_events_20260319.log because statistics from that month have already been calculated.
[2026-09-25 02:49:02] [Notice] The background jobs that will process the log files and store the statistics data have been dispatched.
[2026-09-25 02:49:02] [Notice] Task process stopped.

A similar error appeared in the logs on September 3, September 10, and September 23.

The daily usage-statistics files appear to be moving to the dispatch folder successfully, but the old usage_events_20260319.log file continues to generate the error.

I am also receiving Mail Delivery Failed messages when OJS tries to send these notifications to my Gmail address. Gmail reports:

550-5.7.27 Your email has been blocked because SPF authentication didn't pass
SPF [gmail.com] with ip: [172.241.25.214] = did not pass

The OJS sender is currently configured as:

hassanwaheed21@gmail.com

Could you please advise on the following?

  1. Why does OJS continue trying to process usage_events_20260319.log even though the statistics for that month have already been calculated?

  2. Where should this old log file be located, and what is the correct/safe way to handle it?

  3. Should the file be moved to another usageStats directory, or should it be reprocessed using the CLI?

  4. Is the Gmail SPF error related to the OJS scheduled-task error, or is this a separate mail configuration issue?

  5. What would be the recommended configuration for OJS email notifications to avoid these Gmail delivery failures?

I would appreciate any guidance on how to resolve these issues safely without affecting the existing usage statistics.

Thank you.