Author Topic: Authentication Error  (Read 8077 times)

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« on: December 16, 2010, 02:11:59 PM »
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:

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Authentication Error
« Reply #1 on: December 16, 2010, 11:51:38 PM »
Enable imap_debug and post the log here.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Authentication Error
« Reply #2 on: December 17, 2010, 03:00:17 AM »
This is SMTP error, so enable smtp_debug and post thge log here ;)

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Authentication Error
« Reply #3 on: December 17, 2010, 06:02:56 AM »
I'm to use to typing imap, sorry about that!

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #4 on: December 17, 2010, 03:07:59 PM »
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':

Code: [Select]
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:carlos@domain.tld
250 2.1.0 Ok
RCPT TO:some.email@gmail.com
554 5.7.1 <some.email@gmail.com>: 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:

Code: [Select]
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

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #5 on: December 17, 2010, 04:17:28 PM »
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

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #6 on: December 20, 2010, 11:43:55 AM »
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.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Authentication Error
« Reply #7 on: December 20, 2010, 12:04:10 PM »
Your server requires TLS connection. So, add tls:// prefix in smtp_server config option in Roundcube.

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #8 on: December 20, 2010, 12:57:18 PM »
I did. Here are my SMTP parameters in main.inc.php:

Code: [Select]
$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'.
« Last Edit: December 20, 2010, 01:05:11 PM by CarlosinFL »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Authentication Error
« Reply #9 on: December 20, 2010, 01:40:44 PM »
What PHP version? What Roundcube version? Do you have openssl module for PHP enabled?

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #10 on: December 20, 2010, 04:55:47 PM »
Quote from: alec;31908
What 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.

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #11 on: December 21, 2010, 03:08:05 PM »
When I tried to send, I checked the RC logs and here's what I have:

Code: [Select]
[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:

Code: [Select]
// 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.
« Last Edit: December 21, 2010, 03:12:33 PM by CarlosinFL »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Authentication Error
« Reply #12 on: December 22, 2010, 06:29:47 AM »
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)

Offline CarlosinFL

  • Full Member
  • ***
  • Posts: 78
Authentication Error
« Reply #13 on: December 22, 2010, 08:46:58 AM »
Quote from: alec;31970
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)


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?

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Authentication Error
« Reply #14 on: December 22, 2010, 09:22:05 AM »
Right, you can install php-openssl module on http server or disable TLS on postfix.