• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved Proplems with closing SMTP port 25

Martin73

Basic Pleskian
I have tried to harden my mail settings and did following things:

I have set in /usr/share/postfix/main.cf
smtpd_tls_auth_only = yes

This is the error log from Roundcube:
Code:
[08-Mar-2018 08:14:51 UTC] ERROR: SMTP server does not support authentication ()
[08-Mar-2018 08:14:51 +0000]: <206vkuds> SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1648 (POST /?_task=mail&_unlock=loading1520496890784&_lang=de_DE&_framed=1&_action=send)

Then I removed the setting smtpd_tls_auth_only = yes and changed the file /usr/share/psa-roundcube/config/defaults.inc.php to:
Code:
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
//$config['smtp_server'] = 'localhost';
$config['smtp_server'] = 'tls://localhost';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
//$config['smtp_port'] = 25;
$config['smtp_port'] = 587;

It was not possible the send an email with Roundcube. What do I have to do? I will only use port 587 or 465. Thank you in advance.
 
Last edited:
I have changed again the setting in /etc/postfix/master.cf (the path in my first posting is wrong).
Code:
smtp_use_tls = yes
smtpd_tls_auth_only = yes

The test with my email client was successful.

After this step I changed the file /usr/share/psa-roundcube/config/defaults.inc.php to:
Code:
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
//$config['smtp_server'] = 'localhost';
$config['smtp_server'] = 'tls://mail.example.com';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
//$config['smtp_port'] = 25;
$config['smtp_port'] = 587;

This part is important:
Code:
$config['smtp_server'] = 'tls://mail.example.com';

The entry must be for the correct mailserver. Now it's possible to check the certificate. The test with Roundcube was also successful. Everything works.
 
Back
Top