Skip to content

Allow IMAP sync intervals as low as 1 minute#325

Open
hammaschlach wants to merge 1 commit into
rustmailer:mainfrom
hammaschlach:feature/imap-poll-interval
Open

Allow IMAP sync intervals as low as 1 minute#325
hammaschlach wants to merge 1 commit into
rustmailer:mainfrom
hammaschlach:feature/imap-poll-interval

Conversation

@hammaschlach

Copy link
Copy Markdown

Summary

This PR lowers the minimum allowed incremental IMAP synchronization interval from 10 minutes to 1 minute.

The scheduler already supports arbitrary minute-based intervals, but both the frontend and backend validation enforced a minimum of 10 minutes. This change only updates the validation and corresponding user-facing messages.

Changes

  • Lower backend validation from 10 to 1 minute
  • Lower frontend validation from 10 to 1 minute
  • Update validation tests
  • Update localization strings to reflect the new minimum interval

Compatibility

This change is fully backwards compatible.
Existing configurations continue to work unchanged.

Testing

  • Backend successfully builds (cargo build --release)
  • Frontend successfully builds (pnpm build)
  • Updated frontend validation tests

@rustmailer

Copy link
Copy Markdown
Owner

Changing it to 1 minute shouldn't cause any major issues. The background process scans the account every 10 seconds to determine whether a sync task should be triggered. Could you tell me about your use case? Why do you need it to be as frequent as 1 minute?

@hammaschlach

Copy link
Copy Markdown
Author

Thanks!

My main use case is near real-time archiving for small self-hosted installations.

Many users only archive one or two IMAP accounts and would like newly received messages to appear in Bichon much sooner than after 10 minutes. Waiting up to 10 minutes feels unnecessarily long in those scenarios, while a 1-minute interval still seems like a reasonable compromise.

Since the scheduler already wakes up every 10 seconds and the synchronization logic already supports arbitrary minute-based intervals, I thought lowering the validation limit from 10 to 1 minute would be a small, backwards-compatible improvement without changing the scheduling architecture.

Of course, I understand that polling every minute is not appropriate for every deployment, which is why this PR only lowers the minimum configurable value rather than changing the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants