UNSEEN flag issues with multiple clients

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

UNSEEN flag issues with multiple clients

Dovecot mailing list

Hi all,

I've been bugged by this issue for a while, and while I see that the
\UNSEEN flag is specified in the RFC to be reset once *any* client
connects and looks at a mailbox, I was wondering if there's a way to
change the behavior so that it's tracked on a per-client basis?

Or if there's even some way to turn it off so that both my iPhone mail
client and my main emacs viewmail mail client don't stomp over each
other when looking at my mail folder counts of unread messages.

My mail server is running Debian 9.11, which has dovecot
2.2.27-3+deb9u5 as the version.  I'm only running IMAP, no POP at
all.

Thanks,
John


Reply | Threaded
Open this post in threaded view
|

Re: UNSEEN flag issues with multiple clients

Dovecot mailing list


> On 1 Oct 2019, at 21.45, John Stoffel via dovecot <[hidden email]> wrote:
>
>
> Hi all,
>
> I've been bugged by this issue for a while, and while I see that the
> \UNSEEN flag is specified in the RFC to be reset once *any* client
> connects and looks at a mailbox, I was wondering if there's a way to
> change the behavior so that it's tracked on a per-client basis?
>
> Or if there's even some way to turn it off so that both my iPhone mail
> client and my main emacs viewmail mail client don't stomp over each
> other when looking at my mail folder counts of unread messages.
>
> My mail server is running Debian 9.11, which has dovecot
> 2.2.27-3+deb9u5 as the version.  I'm only running IMAP, no POP at
> all.


A SELECT INBOX updates \Seen flags, A EXAMINE INBOX does not.

there is no configurable value to change the behaviour. Maybe you can change your client to use EXAMINE instead of SELECT.

Sami

Reply | Threaded
Open this post in threaded view
|

Re: UNSEEN flag issues with multiple clients

Dovecot mailing list
>>>>> "Sami" == Sami Ketola via dovecot <[hidden email]> writes:

>> On 1 Oct 2019, at 21.45, John Stoffel via dovecot <[hidden email]> wrote:
>>
>>
>> Hi all,
>>
>> I've been bugged by this issue for a while, and while I see that the
>> \UNSEEN flag is specified in the RFC to be reset once *any* client
>> connects and looks at a mailbox, I was wondering if there's a way to
>> change the behavior so that it's tracked on a per-client basis?
>>
>> Or if there's even some way to turn it off so that both my iPhone mail
>> client and my main emacs viewmail mail client don't stomp over each
>> other when looking at my mail folder counts of unread messages.
>>
>> My mail server is running Debian 9.11, which has dovecot
>> 2.2.27-3+deb9u5 as the version.  I'm only running IMAP, no POP at
>> all.


Sami> A SELECT INBOX updates \Seen flags, A EXAMINE INBOX does not.

Sami> there is no configurable value to change the behaviour. Maybe
Sami> you can change your client to use EXAMINE instead of SELECT.

I kinda figured it wasn't an easy issue to address.  Since one of my
clients is an iPhone, I doubt I can fix that client.  :-)

But hmm... maybe it's not the iPhone causing problems, but my emacs
based mail client viewmail, and that I have the source for.  Thanks
for the hint, I'll see if I can chase this down more.

John


Reply | Threaded
Open this post in threaded view
|

Re: UNSEEN flag issues with multiple clients

Dovecot mailing list
>>>>> "John" == John Stoffel via dovecot <[hidden email]> writes:

>>>>> "Sami" == Sami Ketola via dovecot <[hidden email]> writes:
>>> On 1 Oct 2019, at 21.45, John Stoffel via dovecot <[hidden email]> wrote:
>>>
>>>
>>> Hi all,
>>>
>>> I've been bugged by this issue for a while, and while I see that the
>>> \UNSEEN flag is specified in the RFC to be reset once *any* client
>>> connects and looks at a mailbox, I was wondering if there's a way to
>>> change the behavior so that it's tracked on a per-client basis?
>>>
>>> Or if there's even some way to turn it off so that both my iPhone mail
>>> client and my main emacs viewmail mail client don't stomp over each
>>> other when looking at my mail folder counts of unread messages.
>>>
>>> My mail server is running Debian 9.11, which has dovecot
>>> 2.2.27-3+deb9u5 as the version.  I'm only running IMAP, no POP at
>>> all.


Sami> A SELECT INBOX updates \Seen flags, A EXAMINE INBOX does not.

Sami> there is no configurable value to change the behaviour. Maybe
Sami> you can change your client to use EXAMINE instead of SELECT.

John> I kinda figured it wasn't an easy issue to address.  Since one of my
John> clients is an iPhone, I doubt I can fix that client.  :-)

John> But hmm... maybe it's not the iPhone causing problems, but my emacs
John> based mail client viewmail, and that I have the source for.  Thanks
John> for the hint, I'll see if I can chase this down more.

So looking at the traces of my client, I see that it's doing (slightly
edited) sets of commands:

    VM OK Logged in
    VM LIST "" "*"
    * LIST (\HasNoChildren) "." postfix-users
    .
    .
    .
    * LIST (\HasNoChildren) "." INBOX
    VM OK List completed (0.000 + 0.000 secs).
    VM STATUS "INBOX" (MESSAGES RECENT)
    * STATUS INBOX (MESSAGES 1013 RECENT 0)
    .
    .
    .
    VM STATUS "postfix-users" (MESSAGES RECENT)
    * STATUS postfix-users (MESSAGES 1588 RECENT 6)
    VM OK Status completed (0.000 + 0.000 secs).
    VM LOGOUT


To look at all the mailboxes on the server and see how many RECENT
mails there are.  For the postfix-users list, I see that there are 6
recent messages.  And if I do the list of mailboxes command again, it
returns the same count.  Then if I go and look at the postfix-users
folder with my iphone, I see that I have 11 unseen messages.  And
without opening a single message, I went back to my other MUA and
listed the folders, and now I have 0 unseen messages for 'postfix-users'

I'll have to see if I can log the commands sent by my iPhone from the
server side to see what's going on here.  But as you can see, it's an
annoying behavior.

Thanks,
John
Reply | Threaded
Open this post in threaded view
|

Re: UNSEEN flag issues with multiple clients

Dovecot mailing list


On 2 Oct 2019, at 17.01, John Stoffel <[hidden email]> wrote:
To look at all the mailboxes on the server and see how many RECENT
mails there are.  For the postfix-users list, I see that there are 6
recent messages.  And if I do the list of mailboxes command again, it
returns the same count.  Then if I go and look at the postfix-users
folder with my iphone, I see that I have 11 unseen messages.  And
without opening a single message, I went back to my other MUA and
listed the folders, and now I have 0 unseen messages for 'postfix-users'

I'll have to see if I can log the commands sent by my iPhone from the
server side to see what's going on here.  But as you can see, it's an
annoying behavior.


It might be annoying but I know for a fact being a iPhone user myself that iPhone uses SELECT to open a folder and per-RFC dovecot then must update the flags.

Sami

Reply | Threaded
Open this post in threaded view
|

Re: UNSEEN flag issues with multiple clients

Dovecot mailing list
>>>>> "Sami" == Sami Ketola via dovecot <[hidden email]> writes:

Sami>     On 2 Oct 2019, at 17.01, John Stoffel <[hidden email]> wrote:
Sami>     To look at all the mailboxes on the server and see how many RECENT
Sami>     mails there are.  For the postfix-users list, I see that there are 6
Sami>     recent messages.  And if I do the list of mailboxes command again, it
Sami>     returns the same count.  Then if I go and look at the postfix-users
Sami>     folder with my iphone, I see that I have 11 unseen messages.  And
Sami>     without opening a single message, I went back to my other MUA and
Sami>     listed the folders, and now I have 0 unseen messages for 'postfix-users'
   
Sami>     I'll have to see if I can log the commands sent by my iPhone from the
Sami>     server side to see what's going on here.  But as you can see, it's an
Sami>     annoying behavior.

Sami> It might be annoying but I know for a fact being a iPhone user
Sami> myself that iPhone uses SELECT to open a folder and per-RFC
Sami> dovecot then must update the flags.

Blech!  That really sucks... is there a better mail client on the
iPhone which doesn't use SELECT?  Too bad dovecot doesn't support an
option to "do the right thing" when iOS mail reader connects.

Thanks for the info, it just confirms what I feared.
John