Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roundcube can't send an email any more #5965

Closed
karstengit opened this issue Sep 25, 2017 · 14 comments
Closed

Roundcube can't send an email any more #5965

karstengit opened this issue Sep 25, 2017 · 14 comments

Comments

@karstengit
Copy link

I am using the combination dovecot and exim with TLS encryption.
Roundcube can connect to the imap and show all the mails with

$config['default_host'] = 'mydomain.com';
$config['default_port'] = 143;
$config['imap_auth_type'] = 'PLAIN';

but i can't send any email!
I tried out every combination but it does not work!
I always get an error like: SMTP Fehler (-1): Die Verbindung ist fehlgeschlagen.
or another error.
Sometimes i get an error in the log of Exim like
TLS error on connection from localhost [::1] (gnutls_handshake): A TLS fatal alert has been received.

My last setting is:
$config['smtp_server'] = 'tls://%d';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'PLAIN';

Then i get no error, but the page keeps standing forever in "sending" ...

Older versions of roundcube in 2014 did work before.

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

That's probably not Roundcube issue. Maybe you have to use smtp_conn_options. What PHP version?

@karstengit
Copy link
Author

Debian uses PHP Version 7.0.19-1
My first try was to install roundcube with the debian package, but it failed with the mariadb database.
I think all dependent packages should be installed.

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

Is there any error in Roundcube error log? Did you try disabling cert/host validation via smtp_conn_options?

@karstengit
Copy link
Author

karstengit commented Sep 26, 2017

O.K. I found the error log. Last entry:
`[25-Sep-2017 17:45:59 Europe/Berlin] ERROR: Failed to connect socket: Die Operation ist jetzt in Bearbeitung ()

[25-Sep-2017 17:45:59 +0200]: SMTP Error: Connection failed: Failed to connect socket: Die Operation ist jetzt in Bearbeitung in /---l/program/lib/Roundcube/rcube.php on line 1665 (POST /cubemail/?_task=mail&_unlock=loading1506354318923&_lang=de&_framed=1&_action=send)`

How smtp_conn_options should be used?
I already tried it with the example in the config file
$config['smtp_conn_options'] = array(
'ssl' => array(
'verify_peer' => true,
'verify_depth' => 3,
'cafile' => '/etc/openssl/certs/exim.cert.pem',
),
);
but with no success.

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

I think "failed to connect socket" has nothing to do with TLS. Still does not look like Roundcube issue.

@alecpl alecpl closed this as completed Sep 26, 2017
@karstengit
Copy link
Author

karstengit commented Sep 26, 2017

Why other PHP software can mail without any problem?

Just this mail program can't.

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

Are you sure %d resolves to the valid hostname?

@karstengit
Copy link
Author

No - i am not sure about anything.
Because i don't understand this mass of parameters needed.
It seems localhost is able to send mails in a standard way in programs like forum, wiki, etc.

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

Then don't use variables, but set proper hostname and make sure it resolves to proper IP address.

@karstengit
Copy link
Author

Trying the old version 0.9.5. now.
After login a blank screen.
Trying with PHP 5.3 causes "session not guilty" in every case.

Roundcube seems not to be usable with Debian 9.0 any more. :-(

@karstengit
Copy link
Author

The IP is not really clear.
The webmailer should be used either from Intranet with 192.168.1.x and via Dynamic IP from outside.
I tried both: Setting localhost, and DynDNS Name.
Nothing works!

@alecpl
Copy link
Member

alecpl commented Sep 26, 2017

It does not matter from where do you connect to Roundcube. It matters where Roundcube is installed.

@karstengit
Copy link
Author

karstengit commented Sep 26, 2017

The server has an Intranet IP.
Trying actual roundcube with PHP 5.3 causes a blank screen.
I altered it back to the standard PHP 7.0 and trying to send an email causes again

[26-Sep-2017 16:33:53 Europe/Berlin] ERROR: Die Operation ist jetzt in Bearbeitung (115)
[26-Sep-2017 16:33:53 Europe/Berlin] ERROR: Failed to connect socket: Die Operation ist jetzt in Bearbeitung ()
[26-Sep-2017 16:33:53 +0200]: SMTP Error: Connection failed: Failed to connect socket: Die Operation ist jetzt in Bearbeitung in /.../program/lib/Roundcube/rcube.php on line 1665 (POST /.../?_task=mail&_unlock=loading1506436390747&_lang=de&_framed=1&_action=send)

There is no chance to understand what is going wrong?
I have no idea how to test the connection.

This is very ugly because reading via IMAP works perfect.
Only SMTP fails.
But when i send an email for instance with joomla in PHP 7 on the same server it works without any problem !?
There can't be a problem with PHP or Exim - the problem is in the code / configuration of roundcube.

@karstengit
Copy link
Author

karstengit commented Sep 26, 2017

As i have written it runs before the server upgrade in the old roundcube with the following configuration:

$rcmail_config['smtp_server'] = '';
$rcmail_config['smtp_port'] = 25;
$rcmail_config['smtp_user'] = '';
$rcmail_config['smtp_pass'] = '';
$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;

Simple and without no complication.
Of course i tried every combination of not encrypted SMTP access in the current version too.
Then there was always an error in the frontend like
SMTP Fehler (250): Die Authentisierung ist fehlgeschlagen.
with the log
[26-Sep-2017 17:00:20 Europe/Berlin] ERROR: SMTP server does not support authentication ()
[26-Sep-2017 17:00:20 +0200]: SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /.../program/lib/Roundcube/rcube.php on line 1665 (POST /.../?_task=mail&_unlock=loading1506438019928&_lang=de&_framed=1&_action=send)

My conclusion is now that roundcube can't be used anymore. :-(

@karstengit karstengit changed the title Roundcube can't send an email Roundcube can't send an email any more Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants