_Reported by plaintextfield on 16 Jun 2014 09:13 UTC as Trac ticket #1489949_
Same bug as [http://trac.roundcube.net/ticket/1489888]. Re-opening it because it was closed without any fix.
Standard 1.0.1 installation, config.inc.php was configured only, no default.inc.php additions. SMTP port is 587 (STARTTLS default), smtp_server was set as 'tls://localhost'.
SMTP debug log:
Recv: 220 ###### ESMTP Postfix
Send: EHLO ######
Recv: 250-######
Recv: 250-PIPELINING
Recv: 250-SIZE 10240000
Recv: 250-ETRN
Recv: 250-STARTTLS
Recv: 250-ENHANCEDSTATUSCODES
Recv: 250-8BITMIME
Recv: 250 DSN
Send: MAIL FROM:<test@######>
Recv: 530 5.7.0 Must issue a STARTTLS command first
Send: RSET
Recv: 530 5.7.0 Must issue a STARTTLS command first
Send: QUIT
Recv: 221 2.0.0 Bye
Why is roundcube not offering STARTTLS even when explicitly advised to do so?
_Keywords: SMTP TLS STARTTLS_
_Migrated-From: http://trac.roundcube.net/ticket/1489949_
_Comment by @alecpl on 16 Jun 2014 09:35 UTC_
Works for me. Is openssl extension installed/loaded on this installation? Here's what Net_SMTP code does check before STARTTLS command:
if ($tls && version_compare(PHP_VERSION, '5.1.0', '>=') &&
extension_loaded('openssl') && isset($this->_esmtp['STARTTLS']) &&
strncasecmp($this->host, 'ssl://', 6) !== 0)
From your info I see that only extension_loaded('openssl') might not be true on your system. Also as stated in #1489888 you need to have smtp_user and smtp_pass set.
_Status changed by @alecpl on 16 Jun 2014 09:35 UTC_
new => closed
It happened to me on Postfix+Dovecot+RoundCube. In my settings, Dovecot is doing sasl authentication. My solution: I added
`// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';
// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';
`
No more starttls issue for me
@tennom Tnx! After upgraded to rc 1.3 I had strange error sending email, so I switch the default host to tls://mail.maildomain.com with port 587, where I have the encryption forced.
Enabling the logs, I had:
I solved using %u and %p as you suggested.
If you use TLS on port 465 you'll run into the same issue but the error will be even more cryptic:
postfix/smtps/smtpd[855]: NOQUEUE: reject: RCPT from unknown[]: 554 5.7.1 <>: Recipient address rejected: Access denied; from=<> to=<> proto=ESMTP helo=<>
Adding user and pass parameters fixed it for me too, but I don't understand how issuing STARTTLS and authenticating are related...
Most helpful comment
It happened to me on Postfix+Dovecot+RoundCube. In my settings, Dovecot is doing sasl authentication. My solution: I added
`// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';
// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';
`
No more starttls issue for me