Author Topic: smtp doesn't work with either lamp install or docker on any server I've tried..?  (Read 2619 times)

Offline baj702

  • Newbie
  • *
  • Posts: 3
When I try and send an email from the installer (Sent Test Email), roundcube just sits there and spins with a message at the bottom of the browser: waiting for 192.168.1.20...

After the timeout value (a couple of minutes) I get an error in /var/log/apache2/error.log
[php7:notice] [pid 10535] [client 192.168.1.19:60228] ERROR: Invalid response code received from server (-1), referer: http://192.168.1.20/roundcube/installer/index.php?_step=3

Nothing about this is logged in /var/www/roundcube/logs or /var/log/syslog
I have in the config:
  smtp_log = true;
  smtp_debug = true;
And I'm using the correct format for the smtp server:
  tls://mail.mydomain.com
Nothing is printed in the browser console.

I thought maybe something wasn't configured correctly, so I also tried with the docker image, and I get the exact same thing.

I also tried with the docker image installed on a different host, and I get the exact same thing.
I also tried accessing the docker image from different hosts, and I get the exact same thing.

Rainloop works.

At first, I was getting postfix errors in syslog, something along the line that I needed to have more parameters in smtpd_relay_restrictions. I added those, and I stopped getting postfix errors. But this shouldn't even be concerned with postfix? Maybe it's trying to relay through postfix? I have postfix hard coded to only email system logs to me. But the docker image should be all self contained, so I don't know what's going on with that...?

This is with the latest version.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Quote
But this shouldn't even be concerned with postfix? Maybe it's trying to relay through postfix?

If tls://mail.mydomain.com is your postfix server then yes its going to be connecting to postfix. Roundcube has to connect to an SMTP server to send emails. One other thing you might check is what kind of certificate your postfix server is using. if its a self signed cert or may be a letsencrypt one then you will need to use the the rc config param `smtp_conn_options` to disable certificate verification.

Quote
I have postfix hard coded to only email system logs to me. But the docker image should be all self contained, so I don't know what's going on with that...?

I believe that the roundcube docker image only contains roundcube, nothing else. The config section in the readme mentions a config for the smtp server https://github.com/roundcube/roundcubemail-docker#configurationenvironment-variables
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline baj702

  • Newbie
  • *
  • Posts: 3
Thanks for the reply. I'm not hosting the smtp server. I am trying to have it connect to yahoo mails smtp server. I've also tried others where I have email accounts where I can auth to send smtp.

That's why I don't know why it maybe was trying to relay through postfix. Maybe not, but the behavior seems like it's waiting for something...

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Quote
I am trying to have it connect to yahoo mails smtp server. I've also tried others where I have email accounts where I can auth to send smtp.
But earlier you said:
Quote
And I'm using the correct format for the smtp server:
  tls://mail.mydomain.com
Its hard to give advice without knowing what exactly you are trying to do. For example if you have configured Roundcube to connect to `tls://mail.mydomain.com` but mail.mydomain.com is actually an alias of Yahoo's SMTP servers then a TLS connection will not work unless you have also disabled certificate verification - as the hostname and the common name on the cert will never match.
Quote
Maybe not, but the behavior seems like it's waiting for something...
Can you telnet from the web server running Roundcube to the SMTP server? May be there is a firewall or some other connection restriction in the way.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline baj702

  • Newbie
  • *
  • Posts: 3
I have email at various places, including yahoo mail and also via bluehost @ mail.mydomain.com. So, I've tried connecting to all of them, with no luck

Rainloop works perfect. There isn't a firewall on the host that roundcube is installed on, and at the router all outgoing traffic is allowed.
« Last Edit: September 08, 2019, 03:43:13 AM by baj702 »