Dashboard widget unread mail doesn't sync

I installed new version of nextcloud mail-app 1.8.0. and now :
I get new mails, but I can’t see them in the new Dashboard widget ‘Unread mails’ (no more sync).
Only when I open mail app, sync is done and I receive the mails and as long as I do not read them they are now shown in the widget .

Sorry, but that’s useless: When I can’t see unread messages in Dasboard widget before I open mail app and check mails, what is the wiget for ???

The mails should be synced/read out when opening dashboard and should bei shown in the widget “unread mails” ! I think that’s the expected behaviour .
Sorry. Or is it a bug ?

regards, Joe

Mind being a bit more considerate with your wording? Your passive aggressive messages won’t make us fix your misconfigured setup faster.

Check your cron. It’s either completely missing or not run often enough.Mail does sync it background otherwise.

Hi Christoph,

how is it supposed to work actually?
I checked the console when in the dashboard, only rooms API is called regularly
There is no callback for the Unread-Mail-Widget

My cron is running every 5 minutes. I don´t see any errors in the nc-log.
After manually refreshing the dashboard page, one API call per mailbox is done
but the new mail is not shown

Jumping into the mail app, the new message is synced.
Jumping back to dashboard, it is then displayed.
What is the supposed workflow here?

Bildschirmfoto 2021-01-24 um 20.14.44

Sorry , offense was not my intent. I’m very thankfull for the nexcloud project as free and open source Software for everybody- thanks for your work so far.

My cron seems to work correctly and also running every 5 min. I can’t find a problem. As described by Rello, only when jumping into the mail app, the new message is synced and jumping back to dashboard, then it is displayed.

regards, Joe

The idea is that the cron will keep the database cache reasonably in sync, so when you open the dashboard you see a (close to identical) representation of IMAP. Loading the dashboard does not trigger a sync itself.

ok, then something is not working I guess. where to start searching? I don´t have any issues in the log

You can check if there is a background job for account sync and your account id in oc_jobs and when it was last run

what is defining the refresh rate of the jobs?
I can see both accounts in oc_jobs

cron just ran.
a1 is 5 minutes and a2 1 hour old.

3600s mail/SyncJob.php at c63a38f99ca2d1e061c2a3bcbe05552098d93b01 · nextcloud/mail · GitHub

ok, found it.
its a 1hr job

that explains it

same timing :wink:

1 Like

Good explanation.
I assume this is still the case since the Widget (and App) are pretty useless with missing/wrong data?
It might be a good idea to make this a setting so people can change the job time in the background.
If this does one operation per job, and one job per day, that would make a max of 365 jobs per year. So if im correct ill be waiting more then 3 years for Nextcloud to finally notice I changed approx 1k mails to read.

The full account is synchronized once an hour …