Author Topic: Login to webmail failed !!  (Read 7297 times)

Offline DWH

  • Newbie
  • *
  • Posts: 5
Login to webmail failed !!
« on: March 25, 2014, 07:36:41 PM »
My home server setup is running:
Ubuntu 13.10.2
Roundcube 0.9.2-2
Mysql 5.5.35-0
dovecot-postfix, 2.1.7-7 all mail server delivery agent stack provided by Ubuntu server team

My question is:
Why cant I log into webmail on my roundcube installation.
I have looked for answer's for this a long time, now I have to ask for help.
Yep, newbie here, so please be gentle.

I will provide any further information you may need to help me out, and your help will be greatly appreciated.
Which logs, and where to find them, do you need. ??
I made a picture with this post of the login error I get.
The error is in Danish and says "connection to email server failed" when I try to login.
DWH
« Last Edit: March 26, 2014, 04:20:52 AM by DWH »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Login to webmail failed !!
« Reply #1 on: March 26, 2014, 02:23:25 PM »
whats in your Roundcube error log? are you sure that you have configured the default_host option in your config file correctly and that there are no firewall or php restrictions preventing your webserver from talking to your imap server?

by default Roundcube logs are in [roundcube root]/logs. you should see one called errors. if there isnt an "error" log in there then most likely you have not installed Roundcube correctly, you have not granted permission for the webserver user to write to the logs directory.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: Login to webmail failed !!
« Reply #2 on: March 26, 2014, 04:08:10 PM »
You might also try loging in using just the first part of your email address, not the entire address. Depending on how the server host is defined in the Roundcube config, the entire address may not be needed.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline DWH

  • Newbie
  • *
  • Posts: 5
Re: Login to webmail failed !!
« Reply #3 on: March 27, 2014, 04:59:59 PM »
Thanks for reply.

I tried login with name only and I got the same error.

-------------------------------------------------------------------------
I found the roundcube log here /var/log/roundcube/errors

[27-Mar-2014 14:41:54 UTC] PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/roundcube/program/lib/Roundcube/rcube_config.php on line 435


[27-Mar-2014 14:41:54 UTC] PHP Warning:  strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/roundcube/program/lib/Roundcube/rcube_session.php on line 132


[27-Mar-2014 14:41:54 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1019


[27-Mar-2014 14:41:54 +0000]: IMAP Error: Login failed for ringo from 93.167.70.11. Could not connect to ssl:tmh.mailed.dk:143: php_network_getaddresses: getaddrinfo failed: Navn eller tjeneste ukendt in /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 (POST /roundcube/?_task=login&_action=login)


[27-Mar-2014 14:41:54 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/roundcube/program/lib/Roundcube/rcube_db.php on line 759
------------------------------------------------------------------------------------------

Here is the php file with line 184 /usr/share/roundcube/program/lib/Roundcube/rcube_imap.php

Code: [Select]
       // write error log
        else if ($this->conn->error) {
            if ($pass && $user) {
                $message = sprintf("Login failed for %s from %s. %s",
                    $user, rcube_utils::remote_ip(), $this->conn->error);

                rcube::raise_error(array('code' => 403, 'type' => 'imap',
"This is line 184"   'file' => __FILE__, 'line' => __LINE__,
                    'message' => $message), true, false);
            }

-----------------------------------------------------------------------------------------

I see the IMAP login error, but i dont know how or where to correct it.
Also, I have some time zone warnings.
And, how do i configure the default_host option in my config file correctly ?

My roundcube install dir is /usr/share/roundcube.
Do you need more logs ?

Please help
« Last Edit: March 27, 2014, 05:58:41 PM by DWH »

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: Login to webmail failed !!
« Reply #4 on: March 27, 2014, 06:54:00 PM »
Your host connection (ssl:tmh.mailed.dk:143) is wrong. If you are really using SSL over port 143, try setting default_host to: ssl://tmh.maild.dk:143 instead.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline DWH

  • Newbie
  • *
  • Posts: 5
Re: Login to webmail failed !!
« Reply #5 on: March 28, 2014, 04:23:08 AM »
My domain name is actually mailed.dk, not maild.dk. and tmh is the hostname of the mail server.
I will try // in front. Whats the name of the host config file where I need to add the //

Offline DWH

  • Newbie
  • *
  • Posts: 5
Re: Login to webmail failed !!
« Reply #6 on: March 28, 2014, 04:47:17 AM »
When I put // in front in this config file /roundcube/main.inc.php
like so:

Code: [Select]
// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$rcmail_config['default_host'] ='ssl://tmh.mailed.dk';

It looks like //tmh.mailed.dk' ; is commented out (blue text) ?

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: Login to webmail failed !!
« Reply #7 on: March 28, 2014, 11:22:49 AM »
That's probably just syntax coloring added by whatever text editor you are using. Don't worry about it.

As reference, my string reads as:

$rcmail_config['default_host'] = 'ssl://mailhost.domain.name:993';
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline DWH

  • Newbie
  • *
  • Posts: 5
Re: Login to webmail failed !!
« Reply #8 on: March 28, 2014, 05:07:10 PM »
Thank you.

What service(s) do I need to restart after editing default host.

I thinking maybe I use the wrong user to log in. Which user do I log in with, I am not really sure.
Up till now I have used my main ubuntu user which I also used to create everything on my server.
« Last Edit: March 28, 2014, 05:58:59 PM by DWH »