IMAP not working

simonjones

Verified User
Joined
Feb 20, 2014
Messages
9
Hi I am running centos php exim amd dovecot I just installed imap and get the error

Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed.

both in php and ssh

Code:
'./configure' '--with-apxs2' '--with-config-file-scan-dir=/usr/local/lib/php.conf.d' '--with-curl=/usr/local/lib' '--with-gd' '--enable-gd-native-ttf' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=mysqlnd' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=mysqlnd' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xsl' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-sockets' '--enable-soap' '--enable-mbstring' '--with-icu-dir=/usr/local/icu' '--with-imap=p=/usr/local/imap-2007f' '--with-imap-ssl' '--enable-intl'

Code:
Protocols	dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp

Code:
IMAP c-Client Version	2004
SSL Support	enabled
Kerberos Support	enabled

Is what my php info is saying so I am at a loss??
 
Hello,

What has PHP in common with IMAP server? Do you mean you try to authenticate and connect to IMAP server from a PHP script or what? Did you check mail logs on your server?
 
mail logs are showing nothing

The mail logs are showing nothing
Yes i am connecting with a php script that i know works on 6 other servers at rackspace and hostgator
 
If there is nothing in logs (even no lines syaing about wrong password), then the script is blocked I guess, it even does not connect to IMAP server. Firewall is it maybe. Or wrong port, host.
 
mm odd

seems to let me login via ssh
but when running php seems to throw this error

Code:
Feb 25 10:16:42 domainname dovecot[16093]: auth-worker(29429): shadow([email protected],127.0.0.1): unknown user
Feb 25 10:16:42 domainname dovecot[16093]: auth-worker(29429): passwd([email protected],127.0.0.1): unknown user
Feb 25 10:16:42 domainname dovecot[16093]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29430, secured, session=<V8683jXzkgB/AAAB>
 
According to logs authentication was successful. Please do not get confused with phrase "unknown user", as it's OK also ( ore information regarding it http://help.directadmin.com/item.php?id=175).

Probably you need to enable displaying of errors in PHP and see what might it be wrong there, as well as you might want to enable debug mode in dovecot.
 
mm going to check that out but i keep getting

Code:
Feb 25 10:52:36 domainname dovecot[29930]: auth-worker(29990): shadow([email protected],195.13.249.197): unknown user
Feb 25 10:52:36 domainname dovecot[29930]: auth: Error: passwd-file([email protected],195.13.249.197,<l17BXjbzQwDDDfnF>): stat(/etc/virtual/domainname.com/passwd) failed: No such file or directory

Although i checked /etc/virtual/domainname.com/passwd does exist.

It is also showing up in bruteforce logs each time.

php errors are all turned on i never turn them off just says the standard php error
Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed.

mm so close but so far lol
 
And are you able to authenticate with those mail credentials in a webmail (roundcube) or from your PC?

What are permissions:

Code:
ls -la /etc/virtual/domainname.com/passwd
ls -ld /etc/virtual/domainname.com/
ls -ld /etc/virtual/
?
 
Back
Top