On 23 Dec 2019, at 11.57, Philip Colmer <philip.colmer@linaro.org> 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.5A0BF40261@servicedesk.linaro.org <mailto:20191223095135.5A0BF40261@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=<philip.colmer@linaro.org <mailto:philip.colmer@linaro.org>>, size=702, nrcpt=1 (queue active) Dec 23 09:51:35 ip-10-35-194-108 postfix/local[3287]: 5A0BF40261: to=<local-it-support@localhost>, 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=2a997739f55ac2560d180000e171d23e 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