Roundcube Community Forum

 

Authentication Error

Started by CarlosinFL, December 16, 2010, 02:11:59 PM

Previous topic - Next topic

CarlosinFL

I've got RC installed and working great with Postfix, Dovecot, Apache, & PostgreSQL however when I try and send, I get a pink error on the RC page that says:

SMTP Error 250: Authentication Error

I'm logged in and can receive & read all new and old messages via IMAP however when I compose and or reply to an older message is when I get the error above. I watched the logs on my mail server to see if I can get more info about what's failing when I try and send but the /var/log/mail.log shows only me logging in with a successful TLS session and nothing more. What I am doing wrong and or missing? :confused:

SKaero

Enable imap_debug and post the log here.

alec

This is SMTP error, so enable smtp_debug and post thge log here ;)

SKaero

I'm to use to typing imap, sorry about that!

CarlosinFL

I have not done the SMTP debug yet but just from basic troubleshooting, I think I know what the problem is. My mail server is rejecting my web server from sending mail due to 'relay access denied':

root@www:# telnet mail.domain.tld 25
Trying 211.113.101.135...
Connected to mail.domain.tld.
Escape character is '^]'.
220 mail.domain.tld ESMTP Postfix
EHLO www.domain.tld
250-mail.domain.tld
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM:[email protected]
250 2.1.0 Ok
RCPT TO:[email protected]
554 5.7.1 <[email protected]>: Relay access denied
quit
221 2.0.0 Bye


Now the above was my web server on the same network / same subnet trying to access my mail server.

mail - 192.168.1.200 / 211.113.101.135
www - 192.168.1.201 / 211.113.101.136

Above addresses are internal IP / external static IP.

However when I look in my mail server logs, I see:

Dec 17 14:27:45 mail dovecot: imap-login: Login: user=, method=PLAIN, rip=211.113.101.136, lip=192.168.0.200, mpid=8013, TLS
Dec 17 14:27:45 mail dovecot: imap(carlos): Disconnected: Logged out bytes=94/885

CarlosinFL

OK so I fixed the DNS issue above but sadly that did not change anything. I enabled smtp_debug on Postfix just for the IP that roundcube was installed and requesting from <192.168.0.201> and below is what I got:

Dec 17 16:05:50 mail postfix/smtpd[1604]: connect from Sedo Domain Parking - Sedo GmbH[192.168.0.201]
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostname: Sedo Domain Parking - Sedo GmbH ~? 127.0.0.0/8
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostaddr: 192.168.0.201 ~? 127.0.0.0/8
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostname: Sedo Domain Parking - Sedo GmbH ~? 192.168.0.0/24
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostaddr: 192.168.0.201 ~? 192.168.0.0/24
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 220 mail.domain.tld ESMTP Postfix
Dec 17 16:05:50 mail postfix/smtpd[1604]: watchdog_pat: 0x26abbf0
Dec 17 16:05:50 mail postfix/smtpd[1604]: < Sedo Domain Parking - Sedo GmbH[192.168.0.201]: EHLO 192.168.0.201
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-mail.domain.tld
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-PIPELINING
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-SIZE 20480000
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-VRFY
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-ETRN
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_list_match: Sedo Domain Parking - Sedo GmbH no match
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_list_match: 192.168.0.201: no match
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-STARTTLS
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-ENHANCEDSTATUSCODES
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250-8BITMIME
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250 DSN
Dec 17 16:05:50 mail postfix/smtpd[1604]: watchdog_pat: 0x26abbf0
Dec 17 16:05:50 mail postfix/smtpd[1604]: < Sedo Domain Parking - Sedo GmbH[192.168.0.201]: RSET
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 250 2.0.0 Ok
Dec 17 16:05:50 mail postfix/smtpd[1604]: watchdog_pat: 0x26abbf0
Dec 17 16:05:50 mail postfix/smtpd[1604]: < Sedo Domain Parking - Sedo GmbH[192.168.0.201]: QUIT
Dec 17 16:05:50 mail postfix/smtpd[1604]: > Sedo Domain Parking - Sedo GmbH[192.168.0.201]: 221 2.0.0 Bye
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostname: Sedo Domain Parking - Sedo GmbH ~? 127.0.0.0/8
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostaddr: 192.168.0.201 ~? 127.0.0.0/8
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostname: Sedo Domain Parking - Sedo GmbH ~? 192.168.0.0/24
Dec 17 16:05:50 mail postfix/smtpd[1604]: match_hostaddr: 192.168.0.201 ~? 192.168.0.0/24
Dec 17 16:05:50 mail postfix/smtpd[1604]: disconnect from Sedo Domain Parking - Sedo GmbH[192.168.0.201]
Dec 17 16:05:50 mail dovecot: imap(carlos): Disconnected: Logged out bytes=12/341

CarlosinFL

Can anyone help me understand this? I don't understand why and I think it's related to the main.inc.php file. This has to be an issue specific to RC only because when I install Thunderbird on the same server as RC, it works fine.

alec

Your server requires TLS connection. So, add tls:// prefix in smtp_server config option in Roundcube.

CarlosinFL

#8
I did. Here are my SMTP parameters in main.inc.php:

$rcmail_config['smtp_server'] = 'tls://mail.domain.tld';

$rcmail_config['smtp_port'] = 25;

$rcmail_config['smtp_user'] = '%u';

$rcmail_config['smtp_pass'] = '%p';

$rcmail_config['smtp_auth_type'] = '';

$rcmail_config['smtp_auth_cid'] = null;

$rcmail_config['smtp_auth_pw'] = null;

$rcmail_config['smtp_helo_host'] = '';

$rcmail_config['smtp_timeout'] = 0;

Maybe someone else's eyes will see what I am missing. I've tried 'tls://192.168.0.201' & 'tls://mail.domain.tld'.

alec

What PHP version? What Roundcube version? Do you have openssl module for PHP enabled?

CarlosinFL

Quote from: alec;31908What PHP version? What Roundcube version? Do you have openssl module for PHP enabled?

PHP5 - 5.3.3-6
RoundCube - 0.5 Beta
OpenSSL - 0.9.8o-4

I don't know if the openssl module for PHP is enabled but I checked in '/etc/php5/apache2/php.ini' & didn't find anything match when I search for 'openssl'. I would be very worried if the installer check let me proceed if I was missing requirements. When I did the install, it said everything was met and working fine.

CarlosinFL

#11
When I tried to send, I checked the RC logs and here's what I have:

[21-Dec-2010 15:05:46 -0500]: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/webmail/program/steps/mail/func.inc on line 1515 (POST /webmail/?_unlock=loading1292961946080?_task=mail&_action=send)
Here is what I have in main.inc.php:

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = 'PLAIN';

I don't know if I need the 'XXX' between the entry or what? Some have them in the config and others don't. Very confusing. My SMTP isn't using SASL, just TLS.

alec

Openssl is an optional module, but you need it. Run Installer again and check if you have this module installed (you can do this also by executing `php -m` command)

CarlosinFL

Quote from: alec;31970Openssl is an optional module, but you need it. Run Installer again and check if you have this module installed (you can do this also by executing `php -m` command)

I'm assuming this is on my web server where RC is installed and not my mail server which only has Postfix / Dovecot installed and nothing more, right?

alec

Right, you can install php-openssl module on http server or disable TLS on postfix.