Roundcube Community Forum

 

SMTP Error (530) 5.7.0 Must issue a STARTTLS command first

Started by SipriusPT, November 23, 2016, 12:31:48 PM

Previous topic - Next topic

SipriusPT

Hello guys,

I am trying to use port 587 in roundcubemail running in the same machine as my mail server, and i am always receiving this error:

QuoteSMTP Error (530): Failed to set sender "X" (5.7.0 Must issue a STARTTLS command first).

I have already changed at master.cf from postfix,

Quotesmtpd_tls_security_level=encrypt

to

Quotesmtpd_tls_security_level=may

and nothing happen, and i have already 'submission' uncommented. Those was the solutions that i have found to solve this problem, but till now no result here.

Main.cf: http://pastebin.com/aEtC0AJt

Master.cf: http://pastebin.com/023uu2T8

Config.inc.php: http://pastebin.com/F2aenRum

Default.inc.php (IMAP and SMTP configs): http://pastebin.com/nFvmFNf9

System specs:
1. PHP Version 5.6.25
2. Postfix
4. Dovecot
3. MacOS 10.12

And i dont know if it is related but i cannot login through IMAP port 993. With that port i am getting,

QuoteIMAP Error: Login failed for X from 127.0.0.1(X-Forwarded-For: 192.168.1.1). Empty startup greeting (localhost:993) in /Library/Server/Web/Data/Sites/Default/program/lib/Roundcube/rcube_imap.php on line 193 (POST /?_task=login&_action=login)

I am only able to use ports 25 and 143 without SSL.

Never saw this error before, and i think that what is causing it is something with PHP or roundcube but i dont know exactly what can be.

alec

$config['smtp_server'] = 'tls://localhost'; For imap issue it looks like a problem on imap server side.

SipriusPT

Quote from: alec on November 23, 2016, 01:10:23 PM
$config['smtp_server'] = 'tls://localhost'; For imap issue it looks like a problem on imap server side.

Thanks alec, after you said that i notice in SMTP comments that warning in config.inc.php and defautl.inc.php.

I am still unable to use that port. I will have to check my imap server dovecot and smtp server postfix.


TomHsiung


guihin

STARTTLS ist not the same like TLS an uses another port an protocol.
For me this configuration worked well on ubuntu 22.04 with postfix, dovecot, nginx and letsencrypt.

# SMTP
$config['smtp_server'] = 'ssl://mail.server.tld';  # maybe localhost works too
$config['smtp_port'] = 465;
$config['smtp_timeout'] = 5;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
$config['smtp_conn_options'] = [
  'ssl' => [
    'verify_peer' => true,
    'verify_depth' => 3,
    'peer_name' => 'mail.server.tld',
    'cafile' => '/etc/ssl/certs/ca-certificates.crt'
  ],
];