Re: When is a new mail not unseen?

2019-12-24 Thread Aki Tuomi


 
 
  
   
  
  
   
On 24/12/2019 12:26 Philip Colmer  wrote:
   
   

   
   

   
   

 



 
  On Tue, 24 Dec 2019 at 09:28, Philip Colmer <
  philip.col...@linaro.org> wrote:
  
 
 
  
   

 
  
   
  
  
   
I'm working on switching over to getting Postfix to deliver via lmtp but the above seems to me to be a good manual workflow to emulate what should be happening and it concerns me that Dovecot still says there are no unseen messages ...
   
   

   
   
Philip
   
   

   
  
 

   
  
 
 
  
 
 
  I've completed the work to update Postfix and Dovecot to use LMTP and the test message is now being delivered with UNSEEN=1, so thank you for the suggestions and comments provided.
 
 
  
 
 
  Regards
 
 
  
 
 
  Philip
 
 
  
 

   
  
  
   
  
  
   This is because you are not using dovecot-lda / lmtp for delivery. Either use those, or set mailbox_list_index=no.
  
  
   
  
  
   Status uses list index, when available, to optimize status lookups. 
  
  
   ---
Aki Tuomi
   
 



Re: When is a new mail not unseen?

2019-12-24 Thread Philip Colmer
On Tue, 24 Dec 2019 at 09:28, Philip Colmer 
wrote:

>
> I'm working on switching over to getting Postfix to deliver via lmtp but
> the above seems to me to be a good manual workflow to emulate what should
> be happening and it concerns me that Dovecot still says there are no unseen
> messages ...
>
> Philip
>
>
I've completed the work to update Postfix and Dovecot to use LMTP and the
test message is now being delivered with UNSEEN=1, so thank you for the
suggestions and comments provided.

Regards

Philip


Re: When is a new mail not unseen?

2019-12-24 Thread Philip Colmer
On Tue, 24 Dec 2019 at 08:04, Aki Tuomi  wrote:

>
> On 23/12/2019 22:17 Michael < m...@hemathor.de> wrote:
>
>
> On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
>
> change your configuration to use some more optimized mailbox
> format and configure postfix to deliver over dovecot-lda or
> lmtp.
>
> or, since you already use doveadm, tell dovecot to index your mailbox
> manually before your 'doveadm status' command:
>
> doveadm -v index -q -u local-it-support INBOX
>
> greetings...
>
>
> dovecot updates indexes automatically when mailbox is opened. If
> mailbox_list_index=yes deliveries should be done using dovecot-lda or lmtp,
> or set mailbox_list_index=no.
>

Consider the following scenario:

* mailbox_list_index=yes
* I send a test mail
* delivery is made by Postfix straight to mbox
* after delivery is made, I run "doveadm -v index -q -u local-it-support
INBOX"

If I then run "doveadm mailbox status -u local-it-support all INBOX", what
would expect "unseen" to be? 0 or 1?

Personally, I would expect it to be 1, but it isn't. It is 0.

I'm working on switching over to getting Postfix to deliver via lmtp but
the above seems to me to be a good manual workflow to emulate what should
be happening and it concerns me that Dovecot still says there are no unseen
messages ...

Philip


Re: When is a new mail not unseen?

2019-12-24 Thread Aki Tuomi


 
 
  
   
  
  
   
On 23/12/2019 22:17 Michael <
m...@hemathor.de> wrote:
   
   

   
   

   
   
On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
   
   

 change your configuration to use some more optimized mailbox


 format and configure postfix to deliver over dovecot-lda or


 lmtp.

   
   
or, since you already use doveadm, tell dovecot to index your mailbox
   
   
manually before your 'doveadm status' command:
   
   

   
   
doveadm -v index -q -u local-it-support INBOX
   
   

   
   
greetings...
   
  
  
   
  
  
   dovecot updates indexes automatically when mailbox is opened. If mailbox_list_index=yes deliveries should be done using dovecot-lda or lmtp, or set mailbox_list_index=no.
  
  
   ---
Aki Tuomi
   
 



Re: When is a new mail not unseen?

2019-12-23 Thread Michael

On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
change your configuration to use some more optimized mailbox 
format and configure postfix to deliver over dovecot-lda or 
lmtp.


or, since you already use doveadm, tell dovecot to index your mailbox 
manually before your 'doveadm status' command:


doveadm -v index -q -u local-it-support INBOX

greetings...


Re: When is a new mail not unseen?

2019-12-23 Thread Michael

On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
change your configuration to use some more optimized mailbox 
format and configure postfix to deliver over dovecot-lda or 
lmtp.


or, since you already use doveadm, tell dovecot to index your mailbox 
manually before your 'doveadm status' command:


 doveadm -v index -q -u local-it-support INBOX

greetings...


Re: When is a new mail not unseen?

2019-12-23 Thread Michael

On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
change your configuration to use some more optimized mailbox 
format and configure postfix to deliver over dovecot-lda or 
lmtp.


or, since you already use doveadm, tell dovecot to index your mailbox 
manually before your 'doveadm status' command:


doveadm -v index -q -u local-it-support INBOX

greetings...


Re: When is a new mail not unseen?

2019-12-23 Thread Michael

On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
change your configuration to use some more optimized mailbox 
format and configure postfix to deliver over dovecot-lda or 
lmtp.


or, since you already use doveadm, tell dovecot to index your mailbox 
manually before your 'doveadm status' command:


doveadm -v index -q -u local-it-support INBOX

greetings...


Re: When is a new mail not unseen?

2019-12-23 Thread Michael

On Monday, December 23, 2019 11:22:27 AM CET, Sami Ketola wrote:
change your configuration to use some more optimized mailbox 
format and configure postfix to deliver over dovecot-lda or 
lmtp.


or, since you already use doveadm, tell dovecot to index your mailbox 
manually before your 'doveadm status' command:


doveadm -v index -q -u local-it-support INBOX

greetings...


Re: When is a new mail not unseen?

2019-12-23 Thread Sami Ketola


> On 23 Dec 2019, at 11.57, Philip Colmer  wrote:
> 
> I'm trying to diagnose a really strange situation where certain emails, when 
> submitted to the mailbox by Postfix, are not considered to be unseen by 
> Dovecot.
> 
> During testing, I've shut down anything else on the server that might want to 
> access the mailbox. I submit the email to the local postfix instance which 
> then says it has delivered it to the mailbox:
> 
> Dec 23 09:51:35 ip-10-35-194-108 postfix/smtpd[3283]: connect from 
> localhost[127.0.0.1]
> Dec 23 09:51:35 ip-10-35-194-108 postfix/smtpd[3283]: 5A0BF40261: 
> client=localhost[127.0.0.1]
> Dec 23 09:51:35 ip-10-35-194-108 postfix/cleanup[3286]: 5A0BF40261: 
> message-id=<20191223095135.5a0bf40...@servicedesk.linaro.org 
> >
> Dec 23 09:51:35 ip-10-35-194-108 postfix/smtpd[3283]: disconnect from 
> localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
> Dec 23 09:51:35 ip-10-35-194-108 postfix/qmgr[1660]: 5A0BF40261: 
> from=mailto:philip.col...@linaro.org>>, size=702, 
> nrcpt=1 (queue active)
> Dec 23 09:51:35 ip-10-35-194-108 postfix/local[3287]: 5A0BF40261: 
> to=, relay=local, delay=0.06, 
> delays=0.04/0.02/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
> Dec 23 09:51:35 ip-10-35-194-108 postfix/qmgr[1660]: 5A0BF40261: removed
> 
> I then use this command to query the state of the mailbox:
> 
> sudo doveadm mailbox status -u local-it-support all INBOX
> 
> and get this response:
> 
> INBOX messages=142 recent=0 uidnext=5596 uidvalidity=1455577845 unseen=0 
> highestmodseq=1163 vsize=11315688 guid=2a997739f55ac2560d18e171d23e 
> firstsaved=1577094051
> 
> What can be happening that means that Dovecot doesn't treat a newly delivered 
> message as unseen?
> 
> Installation details:
> # 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.21 (92477967)
> # OS: Linux 4.15.0-1041-aws x86_64 Ubuntu 18.04.3 LTS
> auth_verbose = yes
> auth_verbose_passwords = yes
> disable_plaintext_auth = no
> listen = 127.0.0.1
> mail_location = mbox:~/mail:INBOX=/var/mail/%u

You are not using dovecot to deliver mails but instead postfix is writing 
directly to some mbox file and there is no mailbox access by the user.
In this case how do you expect dovecot to detect the new mai and update 
indexesl?

change your configuration to use some more optimized mailbox format and 
configure postfix to deliver over dovecot-lda or lmtp.

Sami