Dovecot: Mails flagged as read get flagged as unread
Hi all
We experience some unexpected behavior with dovecot. It happens that emails marked as read get marked as unread (MUA is Thunderbird on port 143). Unfortunately this happens randomly, reproducing this issue is difficult. We could not find any pattern, it happens rarely.
We are running dovecot version 2.2.24 on Debian Jessie (backports repository). /root@dovecot01:~# dovecot --version// //2.2.24 (a82c823)/
Our Setup: /ha-proxy01 -> dovecot-proxy01 (proxy=yes) -> dovecot01 (proxy=no) traffic on different ports to different servers.
- IP is used for multiple services (ports). We use the haproxy to send
/ Below the configuration (IMAPC is active for migration purposes).
Do you have any recommendations where we could focus for troubleshooting? I found some posts about mbox_lazy_writes causing similar issues. However we use mdbox in our setup.
If we enable rawlog for what log patterns should we search?
Your Inputs are highly appreciated!
Thanks and Regards plataleas
*----- haproxy configuration ------
*frontend frontend_mail.company.org-143 bind 10.100.189.34:143 mode tcp default_backend backend_mail.company.org-143 backend backend_mail.company.org-143 mode tcp balance source server dovecot-proxy01.company.org dovecot-proxy01.company.org:10143 check send-proxy-v2 server dovecot-proxy02.company.org dovecot-proxy02.company.org:10143 check send-proxy-v2 backup
*----- config Dovecot Proxy -----*
/root@dovecot-proxy01:~# dovecot -n # 2.2.24 (a82c823): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.13 (7b14904) # OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@* default_client_limit = 5000 default_process_limit = 500 disable_plaintext_auth = no haproxy_trusted_networks = 10.10.189.28,10.10.189.29 imap_capability = IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS listen = 10.10.189.25 mail_location = mdbox:%h/mdbox mail_max_userip_connections = 0 mail_plugins = zlib mdbox_rotate_size = 10 M 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 = INBOX. separator = . } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { gzip_save_level = 6 pop3_migration_mailbox = POP3-MIGRATION-NS/INBOX sieve = file:~/sieve;active=~/.dovecot.sieve zlib_save = gz } protocols = imap pop3 lmtp service imap-login { inet_listener imap_haproxy { address = 10.10.189.25 haproxy = yes port = 10143 } inet_listener imaps_haproxy { address = 10.10.189.25 haproxy = yes port = 10993 ssl = yes } } service lmtp { inet_listener lmtp { address = 10.10.189.25 port = 24 } } service pop3-login { inet_listener pop3_haproxy { address = 10.10.189.25 haproxy = yes port = 10110 } inet_listener pop3s_haproxy { address = 10.10.189.25 haproxy = yes port = 10995 ssl = yes } } ssl_ca =
/root@dovecot-proxy01:~# grep -v '^ *\(#.*\)\?$' /etc/dovecot/dovecot-ldap.conf.ext// //uris = ldaps://ldap.comany.org// //dn = 'cn=ldap-reader,ou=customers,dc=company,dc=org'// //dnpass = upser_password// //sasl_bind = no// //tls = no// //auth_bind = yes// //base = ou=customers,dc=company,dc=org// //user_attrs = =home=/data/vmails/%Ld/%Ln,=uid=10000,=gid=10000,mailquota=quota_rule=*:storage=%$G// //user_filter = (&(uid=%u)(pfAccountStatus=active))// //pass_attrs = uid=user,userPassword=password,pfmailHost=host,=proxy_maybe=yes// //pass_filter = (&(uid=%u)(pfAccountStatus=active))// /
*-------------config Dovecot LDA---------*
/root@dovecot01:~# dovecot -n /
# 2.2.24 (a82c823): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.13 (7b14904) # OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@* default_client_limit = 5000 default_process_limit = 500 disable_plaintext_auth = no haproxy_trusted_networks = 10.10.189.28,10.10.189.29 imapc_features = rfc822.size imapc_host = mail-direct.company.org imapc_list_prefix = INBOX imapc_user = %u listen = 10.10.189.42 mail_location = mdbox:%h/mdbox mail_max_userip_connections = 0 mail_plugins = zlib mail_prefetch_count = 20 mdbox_rotate_size = 10 M namespace { hidden = yes list = no location = pop3c: prefix = POP3-MIGRATION-NS/ } 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 = INBOX. separator = . } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { gzip_save_level = 6 pop3_migration_ignore_missing_uidls = yes pop3_migration_mailbox = POP3-MIGRATION-NS/INBOX sieve = file:~/sieve;active=~/.dovecot.sieve zlib_save = gz } pop3c_host = mail-direct.company.org pop3c_password = # hidden, use -P to show it protocols = imap pop3 lmtp service imap-login { inet_listener imap_haproxy { address = 10.10.189.42 haproxy = yes port = 10143 } inet_listener imaps_haproxy { address = 10.10.189.42 haproxy = yes port = 10993 ssl = yes } } service lmtp { inet_listener lmtp { address = 10.10.189.42 port = 24 } } service pop3-login { inet_listener pop3_haproxy { address = 10.10.189.42 haproxy = yes port = 10110 } inet_listener pop3s_haproxy { address = 10.10.189.42 haproxy = yes port = 10995 ssl = yes } } ssl_ca =
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 6 Dec 2016, plataleas wrote:
We experience some unexpected behavior with dovecot. It happens that emails marked as read get marked as unread (MUA is Thunderbird on port 143). Unfortunately this happens randomly, reproducing this issue is difficult. We could not find any pattern, it happens rarely.
does your user(s) access these mailboxes from two or more clients simultaneously - either from the same account or as shared mailboxes?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBWEaBc3z1H7kL/d9rAQI71gf/Y0U/GNaxJO2nEQFfTjXMzb68NfH4x7Nn lMFhb+HJjqLIb8VfBFbEEMx2fTcxH0Aq4QxdapnCpT8GSJWx6Eu2/XycnothrXpV y96UUMcCP4CGS5w6ezdJyFQxmapp6XNCZ3FU+tm5J54Vpe2dX5q60+xAY+yPog3E obf1/VXjfLy++ubUcv0LGhgkBbmYlsAR4v5Ht2Er8ArfyIOzNhbbmneDAemL+nIE IdzXmeLuEEY0xTrp5K6jFWe4Q+h6Zt+Q/R+5PXSj67s0e6wPeO/0/bPXdnDJHITJ DqT1vrMZpCXD5fInNVU85mjhjrY/1iu1AbbJCjRuMkHCfJz2YwCi4Q== =YcKj -----END PGP SIGNATURE-----
Hi Steffen
Thanks for the reply!
- Users are accessing from multiple devices simultaneously
- Each user has his own mailbox, we do not use shared mailboxes
regards
On 12/06/2016 10:14 AM, Steffen Kaiser wrote:
On Tue, 6 Dec 2016, plataleas wrote:
We experience some unexpected behavior with dovecot. It happens that emails marked as read get marked as unread (MUA is Thunderbird on port 143). Unfortunately this happens randomly, reproducing this issue is difficult. We could not find any pattern, it happens rarely.
does your user(s) access these mailboxes from two or more clients simultaneously - either from the same account or as shared mailboxes?
-- Steffen Kaiser
Hi, There is a plugin "mail_log" that you can use to audit what users/user agents are doing, probably mail_log_events flag_change is helpful?
-- peter
Am 2016-12-06 um 10:24 schrieb plataleas:
Hi Steffen
Thanks for the reply!
- Users are accessing from multiple devices simultaneously
- Each user has his own mailbox, we do not use shared mailboxes
regards
On 12/06/2016 10:14 AM, Steffen Kaiser wrote:
On Tue, 6 Dec 2016, plataleas wrote:
We experience some unexpected behavior with dovecot. It happens that emails marked as read get marked as unread (MUA is Thunderbird on port 143). Unfortunately this happens randomly, reproducing this issue is difficult. We could not find any pattern, it happens rarely.
does your user(s) access these mailboxes from two or more clients simultaneously - either from the same account or as shared mailboxes?
-- Steffen Kaiser
Does this correspond with some index damage in logs? We did have some of these in 2.2.6.0 ("Missing middle file seq=.." followed by reindexing and "lost Recent state" message), with 2.2.7 these seem to have stopped appearing.
On 06.12.2016 13:34, Peter Chiochetti wrote:
Hi, There is a plugin "mail_log" that you can use to audit what users/user agents are doing, probably mail_log_events flag_change is helpful?
Hi all
Thanks for your valuable Inputs!
@Peter: we did enable the logs with flag_change. We will try to catch the logs when the issue appears. We try hard to reproduce, but it happens rarely.
@Alex: in the logs we do not see any message "Missing middle file seq=..". But we will check this more in detail.
Does the "mbox_lazy_writes" settings only affects the mbox backed? In our case we use mdbox, thus disabling this setting would not have any effect, right?
regards plataleas
On 12/06/2016 11:34 AM, Peter Chiochetti wrote:
Hi, There is a plugin "mail_log" that you can use to audit what users/user agents are doing, probably mail_log_events flag_change is helpful?
participants (4)
-
Alexey Asemov (Alex/AT)
-
Peter Chiochetti
-
plataleas
-
Steffen Kaiser