# IMAP Login impossible, but webmail works fine

**URL:** <https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613>\
**Category:** uncategorized\
**Created:** [June 26, 2015, 4:12pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613 "2015-06-26T16:12:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![h8h](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/h8h/32/34_2.png) [@h8h](https://discourse.mailinabox.email/u/h8h)\
**Post date:** [June 26, 2015, 4:12pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/1 "2015-06-26T16:12:04Z")

</div>

I’ve already solved this odd behaviour by changing the password at the admin form.

My box was under attack (many false login attempts) . At that time a user tried to sign on and dovecot slow responses. The user gets a failure from outlook and was not able to login anymore. But webmail just works fine. I told him to change the password on the roundcube password form, but the password form also says that the current password is wrong. The last attempt I did was to change the password at the miab admin interface and everything works out fine.

Is there another authentication mechansim for roundcube / php? I don’t think so, but any thoughts?

Thanks so far, have a nice weekend

🕶  
H8H

---

<div class="post-metadata">

**Author:** ![JoshData](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/joshdata/32/2153_2.png) [@JoshData](https://discourse.mailinabox.email/u/JoshData)\
**Post date:** [June 26, 2015, 8:27pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/2 "2015-06-26T20:27:06Z")

</div>

No it’s the same login system. There was another thread about character encoding issues making things work differently between Roundcube and IMAP though.

---

<div class="post-metadata">

**Author:** ![h8h](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/h8h/32/34_2.png) [@h8h](https://discourse.mailinabox.email/u/h8h)\
**Post date:** [June 28, 2015, 3:15pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/3 "2015-06-28T15:15:02Z")

</div>

Ok thanks, but its not the encoding issue, becaue everything works fine until someone Dos the box …

---

<div class="post-metadata">

**Author:** ![radek](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@radek](https://discourse.mailinabox.email/u/radek)\
**Post date:** [June 28, 2015, 5:50pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/4 "2015-06-28T17:50:34Z")

</div>

Hi, can you find some error log messages?

```
# cat /var/log/syslog | grep drop

```

I am thinking about process\_limit: [Mailserver Limits](https://discourse.mailinabox.email/t/mailserver-limits/228)

---

<div class="post-metadata">

**Author:** ![h8h](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/h8h/32/34_2.png) [@h8h](https://discourse.mailinabox.email/u/h8h)\
**Post date:** [June 28, 2015, 7:31pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/5 "2015-06-28T19:31:11Z")

</div>

Sorry, logs are essential for this business though here they are:

```auto
Jun 22 05:37:16 srv dovecot: imap-login: Error: socket(/var/run/dovecot/config) failed: Cannot allocate memory
Jun 22 05:37:16 srv dovecot: imap-login: Error: socket(/var/run/dovecot/config) failed: Cannot allocate memory
Jun 22 05:37:16 srv dovecot: imap-login: Fatal: Error reading configuration: net_connect_unix(/var/run/dovecot/config) failed: Cannot allocate memory
Jun 22 05:37:16 srv dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Jun 22 05:37:17 srv dovecot: pop3-login: Error: socket(pop3) failed: Cannot allocate memory
Jun 22 05:37:17 srv dovecot: pop3-login: Error: net_connect_unix(pop3) failed: Cannot allocate memory
Jun 22 05:37:17 srv dovecot: pop3-login: Internal login failure (pid=9957 id=1) (internal failure, 1 successful auths): user=<xxx>, method=PLAIN, rip=xxx, lip=xxx, TLS, session=
Jun 22 05:38:06 srv postfix/smtpd[9969]: warning: connect to private/tlsmgr: Cannot allocate memory
Jun 22 05:38:06 srv postfix/smtpd[9969]: warning: problem talking to server private/tlsmgr: Cannot allocate memory
Jun 22 05:38:07 srv postfix/smtpd[9969]: warning: connect to private/tlsmgr: Cannot allocate memory
Jun 22 05:38:07 srv postfix/smtpd[9969]: warning: problem talking to server private/tlsmgr: Cannot allocate memory
Jun 22 05:38:07 srv postfix/smtpd[9969]: warning: no entropy for TLS key generation: disabling TLS support
Jun 22 05:38:07 srv postfix/smtpd[9970]: fatal: inet_addr_local[getifaddrs]: getifaddrs: Cannot allocate memory
Jun 22 05:38:08 srv postfix/smtpd[9969]: warning: connect to private/anvil: Cannot allocate memory
Jun 22 05:38:08 srv postfix/smtpd[9969]: warning: problem talking to server private/anvil: Cannot allocate memory
Jun 22 05:38:08 srv postfix/smtpd[9969]: warning: SASL: Connect to private/auth failed: Cannot allocate memory
Jun 22 05:38:08 srv postfix/smtpd[9969]: fatal: no SASL authentication mechanisms
Jun 22 05:38:08 srv postfix/master[9349]: warning: process /usr/lib/postfix/smtpd pid 9970 exit status 1
Jun 22 05:38:08 srv postfix/master[9349]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Jun 22 05:38:09 srv postfix/master[9349]: warning: process /usr/lib/postfix/smtpd pid 9969 exit status 1

```

First login attempt by an authorized user (via outlook 2013)

```auto
Jun 22 08:02:31 srv dovecot: auth: Error: PLAIN(xxx,xxxx,<xxx>): Request 10617.1 timed out after 150 secs, state=1

```

Next try (via outlook 2013)

```auto
Jun 22 08:04:02 srv dovecot: auth: Error: PLAIN(xxx,xxxx,<xxx>): Request 10628.1 timed out after 150 secs, state=1

```

After dovecot / postfix restart, he tries again (via outlook 2013)

```auto
imap-login: Disconnected (auth failed, 9 attempts in 109 secs): user=<xxx>, method=PLAIN, rip=xxxx, lip=xxx, TLS: Disconnected, session=<xxx>
Jun 22 10:10:54 srv dovecot: imap-login: Disconnected: Too many invalid commands (no auth attempts in 0 secs): user=<>, rip=xxx, lip=xxx, session=<xxx>

```

But login via webmail / localhost works fine for him

```auto
Jun 22 11:17:47 srv dovecot: imap-login: Login: user=xxxx, method=PLAIN, rip=::1, lip=::1, mpid=xxxx, TLS, session=<xxx>
Jun 22 11:17:47 srv dovecot: imap(xxxx): Disconnected: Logged out in=91 out=908

```

Not webmail / outlook 2013

```auto
Jun 22 11:17:51 srv dovecot: imap-login: Disconnected (auth failed, 1 attempts in 7 secs): user=<xxxxx>, method=PLAIN, rip=xxx, lip=xxx, TLS: Disconnected, session=<xxxx>

```

---

<div class="post-metadata">

**Author:** ![radek](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@radek](https://discourse.mailinabox.email/u/radek)\
**Post date:** [June 28, 2015, 8:13pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/6 "2015-06-28T20:13:45Z")

</div>

> Cannot allocate memory

Looks like you have not enough free RAM. Check memory consumption on that machine and let us know.

---

<div class="post-metadata">

**Author:** ![h8h](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/h8h/32/34_2.png) [@h8h](https://discourse.mailinabox.email/u/h8h)\
**Post date:** [June 28, 2015, 8:23pm UTC](https://discourse.mailinabox.email/t/imap-login-impossible-but-webmail-works-fine/613/7 "2015-06-28T20:23:54Z")

</div>

Thanks. Thats another issue, I’ve 3GB of Ram but I think the tcp numsocks are the main problem. But the most significant problem is that the sqlite database gets corrupted or something else broke and I don’t know why the user is able to login via webmail and not via an email client. He does not change anything nor password or email connection settings.

ATM the box uses 650MB

```auto
             total used free shared buffers cached
Mem: 4.0G 1.0G 3.0G 172M 0B 377M
-/+ buffers/cache: 646M 3.4G
Swap: 3.0G 0B 3.0G

```

or more human unreadable

```auto
             total used free shared buffers cached
Mem: 4194304 1050956 3143348 176344 0 387104
-/+ buffers/cache: 663852 3530452
Swap: 3145728 0 3145728

```
