Ticket #1484883 (closed Bugs: fixed)

Opened 3 years ago

Last modified 21 months ago

SMTP/TLS

Reported by: UKTamo Owned by:
Priority: 5 Milestone: 0.2-stable
Component: SMTP connection Version: 0.1-stable
Severity: normal Keywords:
Cc:

Description

I'm trying to configure my RoundCube for SMTP TLS... I have tried the tls://smtphost.domainname.com configuration.

I receive the error: [11-Mar-2008 10:13:47 +0000] SMTP Error: SMTP error: Connection failed: Failed to connect socket: in /sites/roundcube/program/steps/mail/func.inc on line 1416 [11-Mar-2008 10:25:33 +0000] SMTP Error: SMTP error: Connection failed: Failed to connect socket: in /sites/roundcube/program/steps/mail/func.inc on line 1416

Attachments

#1484883.200812170953.patch (1.5 KB) - added by robin 21 months ago.
Enable TLS in Net/SMTP
#1484883.200812171020.patch (1.7 KB) - added by robin 21 months ago.
Add TLS support to Net_SMTP
SMTP.patch (1.3 KB) - added by alec 21 months ago.

Change History

  Changed 2 years ago by till

  • milestone changed from 0.1.1 to 0.2-stable

We don't support TLS currently, postponed!

  Changed 2 years ago by estadtherr

It looks like Net_SMTP will do STARTTLS when authenticating if no authentication mechanisms were supported over the initial cleartext connection. Is there more support necessary, such as STARTTLS with an unauthenticated connection?

  Changed 2 years ago by dan

./program/lib/Net/SMTP.php appears to try STARTTLS for PHP_VERSION>='5.1.0' and if the server supports it. The SMTP server should not offer authentication until after STARTTLS has been issued.

follow-up: ↓ 5   Changed 21 months ago by robin

I cannot reproduce this. My server is FreeBSD with postfix (TLS and SASL auth), my client is Debian Etch.

in reply to: ↑ 4 ; follow-up: ↓ 6   Changed 21 months ago by cheungpat

Replying to robin:

I cannot reproduce this. My server is FreeBSD with postfix (TLS and SASL auth), my client is Debian Etch.

This didn't work for me before but it seems working now. The server is running Debian testing (lenny) and Postfix 2.5.5 with TLS+SASL AUTH enabled.

in reply to: ↑ 5 ; follow-up: ↓ 7   Changed 21 months ago by cheungpat

Replying to cheungpat:

This didn't work for me before but it seems working now. The server is running Debian testing (lenny) and Postfix 2.5.5 with TLS+SASL AUTH enabled.

Nah... false hope... my bad... it doesn't work for me still... sorry

main.inc.php:

$rcmail_config['smtp_server'] = 'tls://127.0.0.1';
$rcmail_config['smtp_port'] = 587;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = '';
$rcmail_config['smtp_helo_host'] = '';

error:

[17-Dec-2008 09:45:23 +0800] SMTP Error: SMTP error: Connection failed:
Failed to connect socket:  in /var/www/roundcubemail/program/steps/mail/func.inc
on line 1246 (POST /mail/?_task=mail&_action=send)

And I am sure Postfix is listening on 587 with TLS enabled.

# telnet localhost 587
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 <host> ESMTP Postfix (Debian/GNU)
EHLO <host>
250-<host>
250-PIPELINING
250-SIZE 52428800
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
STARTTLS
220 2.0.0 Ready to start TLS

in reply to: ↑ 6   Changed 21 months ago by robin

Replying to cheungpat:

$rcmail_config['smtp_server'] = 'tls://127.0.0.1';

I don't think 'tls://' will work.

Looking at the code in program/lib/Net/SMTP.php, the SMTP module will try TLS only if AUTH is not available without it. I think we can close this ticket, because it's about non-existing functionality, and create a new ticket 'make Net/SMTP use TLS'.

Changed 21 months ago by robin

Enable TLS in Net/SMTP

  Changed 21 months ago by robin

I just added a patch (#1484883.200812170953.patch) to enable the 'tls://' prefix in Net/SMTP. Please test.

Changed 21 months ago by robin

Add TLS support to Net_SMTP

  Changed 21 months ago by robin

Added a better patch, actually using the boolean _usetls :)

Changed 21 months ago by alec

  Changed 21 months ago by alec

Please, test my patch (SMTP.patch), I think it's better.

  Changed 21 months ago by alec

  • component changed from Core functionality to SMTP connection

  Changed 21 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

My version of patch applied in r2170.

Note: See TracTickets for help on using tickets.