~rjarry/aerc#171: 
Emails flag only updated on opening aerc not with :check-mail

If I mark an email as important ( Star ) on another device say K9 then use :check-mail on an already opened aerc it checks for new emails but doesn't update the flag. If I quit aerc and open it again it shows that emails flagged as important. It seems :check-email doesn't update the flags ????

Status
RESOLVED FIXED
Submitter
~justinesmithies
Assigned to
Submitted
1 year, 1 month ago
Updated
1 year, 1 month ago
Labels
bug maildir

~rjarry closed duplicate ticket #172 1 year, 1 month ago

~rjarry 1 year, 1 month ago

Hi,

The :mark command does not alter the email flags, it only selects a message. The star (*) you see in the email flags is only a visual indicator that the message is selected. To flag an email as "important", you need to use :flag.

~justinesmithies 1 year, 1 month ago*

Sorry I've not explained correctly. When I open aerc I see my emails on the right and some have a ! Flag which if I view them on my mobile say with k9 mail they show as starred ie message is marked ( flagged ) as important. If I say mark ( flag ) an email in k9mail as starred ( important ) and then switch to my laptop already running aerc and type :check-mail the flag on that email isn't updated. It only updates If I exit aerc and start it again.

~rjarry 1 year, 1 month ago

I assume you are using the imap backend? I believe :check-mail only updates the message counts for all folders, not the message flags nor headers. The current folder's messages should be automatically updated, including their flags.

https://asciinema.org/a/YLIgPCsnq10Tl9RP1srhshEmw

~justinesmithies 1 year, 1 month ago

Yes I am using IMAP via isync ( mbsync ) to allow offline reading.

~rjarry 1 year, 1 month ago

You are not using the imap backend, then. With maildir://, :check-mail doesn't do anything unless you define check-mail-cmd in accounts.conf.

https://git.sr.ht/~rjarry/aerc/tree/0.15.0/item/doc/aerc-accounts.5.scd#L38-40

~justinesmithies 1 year, 1 month ago

My question is though should :check-email update the flags too though ? As it stands flags only update if they've been changed on another computers email client if I exit aerc on this PC and start aerc again. Whereas I'd have thought that running the command :check-email would have obvs checked for new email and updated the flags too ? I thought it might be an mbsybc issue but it can't be as exiting aerc and running it up again displays the correct flags.

~justinesmithies 1 year, 1 month ago

Apologies in accounts.conf I have:

check-mail-cmd = mbsync -q gmail && msmtp-runqueue.sh

~rjarry 1 year, 1 month ago

Could you share your configuration after redacting any private information? Including aerc.conf and accounts.conf. Also, what version of aerc are you running?

Thanks.

~justinesmithies 1 year, 1 month ago

Sure my dots are here and I apologise in advance if it's a rookie mistake by myself. I'm using the latest git master of aerc too from the aur package aerc-git.

https://codeberg.org/JustineSmithies/hyprland-dotfiles/src/branch/master

~justinesmithies 1 year, 1 month ago*

Oh hang on is it because I have the line cache-headers = true in accounts.conf ? Answer is no doesn't make a difference.

Found this info:

https://lists.sr.ht/~rjarry/aerc-devel/patches/33009

~rjarry 1 year, 1 month ago

No, cache-headers is only for IMAP.

I think that this is caused by a recent commit 91ac21ac61558. Basically, the current folder is only refetched if the message count has increased.

I assume that you will also have the same issue when deleting/moving messages from another client.

I'll assign this to Tim :)

~justinesmithies 1 year, 1 month ago

Glad I wan't totally getting it wrong and it is indeed a bug ;)

Cool so I don't need the line cache-headers = true if I'm using maildir:// then is that correct ?

~rjarry 1 year, 1 month ago

Yes, cache-headers is ignored unless you are running with the imap:// backend. You can remove it.

~rjarry 1 year, 1 month ago

~justinesmithies, can you have a look at this patch to see if it fixes the issue?

https://lists.sr.ht/~rjarry/aerc-devel/patches/40706

Thanks

~rjarry REPORTED FIXED 1 year, 1 month ago

Tim Culverhouse referenced this ticket in commit ef4504e.

Register here or Log in to comment, or comment via email.