When is a new mail not unseen?
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> 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>, 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 mail_privileged_group = mail namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } protocols = " imap" ssl = no ssl_cert = </etc/dovecot/private/dovecot.pem ssl_client_ca_dir = /etc/ssl/certs ssl_key = # hidden, use -P to show it userdb { driver = passwd }
Note that we are not using SSL because Dovecot is only accessible locally within the server.
Thank you for any suggestions or comments.
Regards
Philip
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
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...
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...
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...
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...
On Tue, 24 Dec 2019 at 08:04, Aki Tuomi <aki.tuomi@open-xchange.com> wrote:
On 23/12/2019 22:17 Michael < ml@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
On Tue, 24 Dec 2019 at 09:28, Philip Colmer <philip.colmer@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
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...
participants (4)
-
Aki Tuomi
-
Michael
-
Philip Colmer
-
Sami Ketola