Opened 5 years ago
Closed 5 years ago
#1484883 closed Bugs (fixed)
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 (3)
Change History (15)
comment:1 Changed 5 years ago by till
- Milestone changed from 0.1.1 to 0.2-stable
comment:2 Changed 5 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?
comment:3 Changed 5 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.
comment:4 follow-up: ↓ 5 Changed 5 years ago by robin
I cannot reproduce this. My server is FreeBSD with postfix (TLS and SASL auth), my client is Debian Etch.
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 5 years 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.
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 5 years 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
comment:7 in reply to: ↑ 6 Changed 5 years 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'.
comment:8 Changed 5 years ago by robin
I just added a patch (#1484883.200812170953.patch) to enable the 'tls://' prefix in Net/SMTP. Please test.
comment:9 Changed 5 years ago by robin
Added a better patch, actually using the boolean _usetls :)
Changed 5 years ago by alec
comment:10 Changed 5 years ago by alec
Please, test my patch (SMTP.patch), I think it's better.
comment:11 Changed 5 years ago by alec
- Component changed from Core functionality to SMTP connection
comment:12 Changed 5 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
My version of patch applied in [44ea3fd4].

We don't support TLS currently, postponed!