Bug 317790 - kmail triggers lots of "disconnected/no auth attempts" log entries in Dovecot
Summary: kmail triggers lots of "disconnected/no auth attempts" log entries in Dovecot
Status: RESOLVED DUPLICATE of bug 316840
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.10
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-03 17:16 UTC by Kevin Bader
Modified: 2013-09-13 19:32 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Bader 2013-04-03 17:16:08 UTC
While kmail seems to work with my dovecot server, sometimes dovecot fills the logs with a couple of messages like the following every second:

dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=999.99.99.99, lip=888.88.88.88, TLS, session=< sLcaRpHX9ABREGnJ >

The session is a different string on every line and the user field is never filled. The only ways to stop the messages is shutting down the offending akonadi system or restarting dovecot.

Important to note:
- logging in and using dovecot works, with various clients and also with this akonadi/kmail client
- ssl = required, disable_plaintext_auth = yes

I really don't know why this happens, especially since logging in works (the dovecot wiki says that this message means that the client is not configured for TLS, which is obviously not the case). I appreciate any hints if you think this is not a bug but a configuration error instead :-)

Best,
Kevin

PS: I'm setting the severity to normal instead of minor as this bug (if it is one) generates megabytes of log files on my server every day.

Reproducible: Sometimes




The client:
$ kmail --version
Qt: 4.8.4
KDE Development Platform: 4.10.00
KMail: 4.10

The server:
$ uname -r
2.6.32-16-pve
$ dovecot --version
2.1.7
$ dovecot -n:
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-16-pve x86_64 Ubuntu 12.10
auth_cache_size = 2 M
auth_cache_ttl = 1 weeks
auth_master_user_separator = *
dict {
  quota = pgsql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 8
first_valid_uid = 999
hostname = mail.example.com
last_valid_gid = 8
last_valid_uid = 999
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot ready
mail_gid = mail
mail_home = /var/vmail/%d/%n
mail_location = maildir:~/mail
mail_uid = vmail
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_default = /var/lib/dovecot/sieve/default.sieve
  sieve_dir = ~/sieve
}
postmaster_address = postmaster@example.com
protocols = imap sieve
quota_full_tempfail = yes
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 993
  }
  process_min_avail = 2
  service_count = 0
}
service managesieve-login {
  inet_listener sieve {
    port = 2000
  }
  service_count = 0
}
ssl = required
ssl_cert = </etc/ssl/example.com.pem
ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
ssl_key = </etc/ssl/example.com.key
userdb {
  args = uid=999 gid=8
  driver = static
}
protocol lda {
  mail_plugins = " sieve"
}
protocol imap {
  mail_max_userip_connections = 30
}
Comment 1 Ajay Ramaswamy 2013-04-06 02:51:11 UTC
seems to be a duplicate of 315382
Comment 2 Kevin Bader 2013-04-06 09:29:14 UTC
(In reply to comment #1)
> seems to be a duplicate of 315382

That may be, but please note that there is no "Disconnected for inactivity" message for my client in the logs. However, I noticed that now the log is full of this:

Apr  4 12:34:05 server dovecot: imap-login: Login: user=<me@example.com>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.4, mpid=15037, TLS, session=<Yc6DgobZZQC8pTmY>
Apr  4 12:34:05 server dovecot: imap(me@example.com): Disconnected: Logged out in=29 out=411
Apr  4 12:34:07 server dovecot: imap-login: Login: user=<me@example.com>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.4, mpid=15039, TLS, session=<C7WpgobZaAC8pTmY>
Apr  4 12:34:07 server dovecot: imap(me@example.com): Disconnected: Logged out in=44 out=509
Apr  4 12:34:13 server dovecot: imap-login: Login: user=<me@example.com>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.4, mpid=15044, TLS, session=<C1v9gobZbQC8pTmY>
Apr  4 12:34:13 server dovecot: imap-login: Login: user=<me@example.com>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.4, mpid=15045, TLS, session=<Y3L9gobZbgC8pTmY>
Apr  4 12:34:13 server dovecot: imap(me@example.com): Disconnected: Logged out in=233 out=854
Apr  4 12:34:13 server dovecot: imap(me@example.com): Disconnected: Logged out in=533 out=55517
Apr  4 12:34:31 server dovecot: imap-login: Login: user=<me@example.com>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.4, mpid=15049, TLS, session=<sx0LhIbZdgC8pTmY>
Apr  4 12:34:31 server dovecot: imap(me@example.com): Disconnected: Logged out in=460 out=1892
[and so on]

As you can see this happens quite often. I also don't understand why remote IP and local IP is always the same.
Comment 3 Marco Springer 2013-04-09 10:22:17 UTC
"Apr 09 12:06:30 server dovecot[13887]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip={ext_ip}, lip={int_ip}, TLS, session=<fEEXterZAgDZd+iC>"

This is repeated multiple times per second, indefinitely.
This is, until I stop akonadi through "akonadictl stop".
After a few seconds, akonadi is completely stopped and the messages stop at the server side.

When I issue a "akonadictl start", everything starts up perfectly normal and all is working normal again.

When a connection issue arises, only for a minute or so, the dovecot server gets spammed at again coming from kmail/akonadi, requiring me to stop/start akonadi again.

Sounds like some piece of "connection checking" code that ends up in an endless loop?
Comment 4 Martti Laaksonen 2013-05-11 08:42:13 UTC
openSUSE 12.2
KDE 4.10.2

I recently upgraded my IMAP server from dovecot 1.2.17 to 2.1.7 and have been following the mail logs much more frequently to find out possible upgrade related configuration issues .

I too have noticed several times now how mail logs are filled with these 

imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=333.333.333.333, lip=444.444.444.44, TLS, session=<vN7z+mrc0QAKxcoM>

errors after dovecot had disconnected the akonadi IMAP session due to inactivity.

Below is short excerpt from mail log from this morning (grep Disconnected /var/log/mail|uniq -c -w 40):
      1 May 11 08:59:01 antique dovecot: imap(xxxxxxx): Disconnected for inactivity in=10266 out=29478
      7 May 11 08:59:01 antique dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<vN7z+mrc0QAKxcoM>
     41 May 11 08:59:02 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<X2T3+mrc2AAKxcoM>
     47 May 11 08:59:03 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<N5gG+2rcAQAKxcoM>
     47 May 11 08:59:04 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<MOYV+2rcMAAKxcoM>
     45 May 11 08:59:05 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<h1Ml+2rcXwAKxcoM>
     47 May 11 08:59:06 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<x5E0+2rcjAAKxcoM>
     47 May 11 08:59:07 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<SeVD+2rcuwAKxcoM>
     47 May 11 08:59:08 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<UC1T+2rc6gAKxcoM>
     47 May 11 08:59:09 antique dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=333.333.333.333, lip=444.444.444.444, TLS, session=<dzhi+2rcGQAKxcoM>

I also checked older mail logs from before the dovecot upgrade and found similar errors from those too, so I don't think it's a dovecot problem as such.

So, idle disconnect from dovecot side seems to cause akonadi to go to an endless loop trying to connect several times every second.

Restarting dovecot "fixes" the problem for a while, but also seems to cause some weird problems in Kontact/Kmail, like e.g. selecting some other folder than inbox just hangs with folder icon being replaced with a busy icon (or whatever it is called) and its contents is not shown.
Comment 5 Martti Laaksonen 2013-05-11 13:35:43 UTC
Some additional info that might be interesting.

Enabling/disabling the interval mail checking feature in the akonadi IMAP connection settings does not seem to have any effect, the problem still appears (quite frequently in fact).

I also increased the dovecot imap service idle_kill timeout from its default 1 minute to 1 hour, but to no avail.

Prompted by an earlier comment, I tried the 'akonadictl stop/start' trick instead of restarting dovecot when the disconnect/login issue happened again.

After issuing the commands I left the terminal open and when the problem appeared again this got printed to it:
A message was received from the server with no job to handle it: "* BYE Disconnected for inactivity. " "(2a2042594520446973636f6e6e656374656420666f7220696e61637469766974792e20)"
Comment 6 jda 2013-05-31 12:34:15 UTC
I have thousands of these imap-login: Disconnected (no auth attempts) in my log files as well.
Comment 7 Stefan Borggraefe 2013-06-05 11:10:10 UTC
I also see this bug with KMail 4.10.3 (Kubuntu 13.04 packages) and Dovecot 1.2.15 from Debian 6.0.
Comment 8 Stefan Borggraefe 2013-06-05 13:16:40 UTC
For me this only happens when I use IMAPS over port 993.

I do not see this Dovecot log message when using STARTTLS over port 143.
Comment 9 Daniel Vrátil 2013-06-14 19:43:25 UTC

*** This bug has been marked as a duplicate of bug 316840 ***