# dovecot imap only listen by localhost ?



## cesjr (May 23, 2016)

Hi guys
I have install dovecot-1.2 as my imap server , I can login by localhost , but when I try to login by
http://10.1.2.26/roundcube , it fails ,the logs show :

`tail /var/log/dovecot-debug.log`

```
May 23 09:39:46 imap-login: Info: Disconnected (auth failed, 1 attempts): user=<fbismc@test.com.tw>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
```

`tail /var/log/dovecot.log`

```
May 18 16:39:26 auth-worker(default): Error: pam(fbismc@test.com.tw,127.0.0.1): pam_authenticate() failed: authentication error
```

I think it should be shows IP with *10.1.2.26* and user *fbismc* without *@test.com.tw
*
Test log:

```
Trying 127.0.0.1...
Connected to gate2.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a001 logout
* BYE Logging out
a001 OK Logout completed.
Connection closed by foreign host
```


```
Trying 10.1.2.26...
Connected to 10.1.2.26.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a001 logout
* BYE Logging out
a001 OK Logout completed.
Connection closed by foreign host.
```


----------



## Crest (May 23, 2016)

There is no good reason to use dovecot 1.x in a new setup and most documentation you'll find is written for dovecot 2.1.x or even dovecot 2.2.x.


----------



## cesjr (May 24, 2016)

I was found the solution:
change roundcube config.inc.php ,and comment the following setting

```
//$config['username_domain'] = 'test.com.tw';
```
Then ,the authentication will be success !
On the other side ,if I want to use *username@test.com.tw *to login IMAP , how should I do ?


----------

